This repository has been archived by the owner on Sep 14, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
60 lines (48 loc) · 1.7 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
FROM alpine:3.12 AS nzbget-build
ARG NZBGET_VERSION=21.0
ARG NZBGET_SHA_512=af8f346b00cb13f33ce9c04c028effae0ae84e3909410619eddb0d89a895fcbeb1458177cee22991bbe5308a83759aa097dbc6c2398c385518e520a6bfeb647c
ADD https://github.com/nzbget/nzbget/archive/v${NZBGET_VERSION}.tar.gz \
/tmp/nzbget.tar.gz
RUN cd /tmp \
&& echo "${NZBGET_SHA_512} nzbget.tar.gz" > nzbget.tar.gz.sha512 \
&& sha512sum -c nzbget.tar.gz.sha512 \
&& tar xvzf nzbget.tar.gz \
&& mv nzbget-${NZBGET_VERSION} nzbget \
&& cd nzbget \
&& apk add --no-cache --update \
build-base \
libxml2-dev \
openssl-dev \
zlib-dev \
&& ./configure --disable-curses \
&& make \
&& mkdir -p /app/nzbget \
&& make prefix=/app/nzbget install
FROM padhihomelab/alpine-base:3.12_0.19.0_0.2
COPY --from=nzbget-build \
/app/nzbget/bin/nzbget \
/usr/bin/nzbget
COPY --from=nzbget-build \
/app/nzbget/share/nzbget/webui \
/nzbget/webui
COPY --from=nzbget-build \
/app/nzbget/share/nzbget/nzbget.conf \
/nzbget/webui/nzbget.conf.template
COPY nzbget.conf /
COPY nzbget-server.sh /usr/local/bin/nzbget-server
COPY setup-volume.sh /etc/docker-entrypoint.d/
RUN chmod +x /usr/bin/nzbget \
/usr/local/bin/nzbget-server \
/etc/docker-entrypoint.d/setup-volume.sh \
&& apk add --no-cache --update \
libssl1.1 \
libxml2 \
p7zip \
tzdata \
unrar \
zlib
EXPOSE 8080
VOLUME [ "/config", "/data", "/downloads/complete", "/downloads/incomplete" ]
CMD [ "nzbget-server" ]
HEALTHCHECK --start-period=10s --interval=30s --timeout=5s --retries=3 \
CMD ["nc", "-zv", "localhost", "6789"]