-
-
Notifications
You must be signed in to change notification settings - Fork 13
/
Dockerfile
64 lines (57 loc) · 1.86 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# syntax=docker/dockerfile:1
FROM ghcr.io/linuxserver/baseimage-alpine:3.20
# 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/*
# copy local files
COPY root/ /
# ports and volumes
EXPOSE 5055
VOLUME /config