Files
seanime-docker/Dockerfile
2025-09-20 14:08:38 +01:00

42 lines
995 B
Docker

ARG TAG
FROM node:latest
# Install dependencies
RUN apt-get update && apt-get install -y \
curl \
wget \
build-essential \
golang \
&& rm -rf /var/lib/apt/lists/*
# Fetch the latest tag and download the source code
RUN curl -s https://api.github.com/repos/5rahim/seanime/releases/latest | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/' > tag.file && \
TAG=$(cat tag.file) && \
wget https://github.com/5rahim/seanime/archive/refs/tags/${TAG}.tar.gz && \
tar -xzvf ${TAG}.tar.gz && \
rm ${TAG}.tar.gz tag.file && \
mv seanime-* seanime
# Set working directory to the extracted source code
WORKDIR /seanime
# Build the web interface
RUN cd seanime-web && \
npm install && \
npm run build && \
mkdir -p ../web && \
mv out/* ../web/
# Build the server for Linux
RUN go build -o seanime -trimpath -ldflags="-s -w"
# Set up the data directory
VOLUME /DATA
# Expose the port
EXPOSE 43211
# Command to run the server
CMD ["./seanime"]