mirror of
https://github.com/linuxserver/docker-overseerr.git
synced 2026-02-23 00:00:48 +08:00
66 lines
1.9 KiB
Docker
66 lines
1.9 KiB
Docker
# syntax=docker/dockerfile:1
|
|
|
|
FROM ghcr.io/linuxserver/baseimage-alpine:3.22
|
|
|
|
# set version label
|
|
ARG BUILD_DATE
|
|
ARG VERSION
|
|
ARG OVERSEERR_VERSION
|
|
LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}"
|
|
LABEL maintainer="nemchik"
|
|
|
|
# set environment variables
|
|
ENV HOME="/config" \
|
|
TMPDIR=/run/overseerr-temp
|
|
|
|
RUN \
|
|
echo "**** install build packages ****" && \
|
|
apk add --no-cache --virtual=build-dependencies \
|
|
build-base \
|
|
python3 && \
|
|
echo "**** install runtime packages ****" && \
|
|
apk add --no-cache \
|
|
yarn && \
|
|
if [ -z ${OVERSEERR_VERSION+x} ]; then \
|
|
OVERSEERR_VERSION=$(curl -sX GET "https://api.github.com/repos/sct/overseerr/releases/latest" \
|
|
| awk '/tag_name/{print $4;exit}' FS='[""]'); \
|
|
fi && \
|
|
export COMMIT_TAG="${OVERSEERR_VERSION}" && \
|
|
curl -o \
|
|
/tmp/overseerr.tar.gz -L \
|
|
"https://github.com/sct/overseerr/archive/${OVERSEERR_VERSION}.tar.gz" && \
|
|
mkdir -p /app/overseerr && \
|
|
tar xzf \
|
|
/tmp/overseerr.tar.gz -C \
|
|
/app/overseerr/ --strip-components=1 && \
|
|
cd /app/overseerr && \
|
|
export NODE_OPTIONS=--max_old_space_size=2048 && \
|
|
CYPRESS_INSTALL_BINARY=0 yarn --frozen-lockfile --network-timeout 1000000 && \
|
|
yarn build && \
|
|
yarn install --production --ignore-scripts --prefer-offline && \
|
|
yarn cache clean && \
|
|
rm -rf \
|
|
/app/overseerr/src \
|
|
/app/overseerr/server && \
|
|
echo "{\"commitTag\": \"${COMMIT_TAG}\"}" > committag.json && \
|
|
rm -rf /app/overseerr/config && \
|
|
ln -s /config /app/overseerr/config && \
|
|
touch /config/DOCKER && \
|
|
printf "Linuxserver.io version: ${VERSION}\nBuild-date: ${BUILD_DATE}" > /build_version && \
|
|
echo "**** cleanup ****" && \
|
|
apk del --purge \
|
|
build-dependencies && \
|
|
rm -rf \
|
|
/tmp/* \
|
|
$HOME/.cache \
|
|
/app/overseerr/.next/cache/* \
|
|
/run/overseerr-temp
|
|
|
|
# copy local files
|
|
COPY root/ /
|
|
|
|
# ports and volumes
|
|
EXPOSE 5055
|
|
|
|
VOLUME /config
|