-
-
Notifications
You must be signed in to change notification settings - Fork 15
/
Dockerfile
60 lines (53 loc) · 1.95 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
# syntax=docker/dockerfile:1
FROM ghcr.io/linuxserver/baseimage-ubuntu:noble
# set version label
ARG BUILD_DATE
ARG VERSION
ARG NZBHYDRA2_RELEASE
LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}"
LABEL maintainer="nemchik"
# environment settings
ENV NZBHYDRA2_RELEASE_TYPE="Release" \
DEBIAN_FRONTEND="noninteractive"
RUN \
echo "**** install packages ****" && \
apt-get update && \
apt-get install --no-install-recommends -y \
libfreetype6 \
python3 \
unzip && \
echo "**** install nzbhydra2 ****" && \
if [ -z ${NZBHYDRA2_RELEASE+x} ]; then \
NZBHYDRA2_RELEASE=$(curl -sX GET "https://api.github.com/repos/theotherp/nzbhydra2/releases/latest" \
| jq -r .tag_name); \
fi && \
NZBHYDRA2_VER=${NZBHYDRA2_RELEASE#v} && \
curl -o \
/tmp/nzbhydra2.zip -L \
"https://github.com/theotherp/nzbhydra2/releases/download/v${NZBHYDRA2_VER}/nzbhydra2-${NZBHYDRA2_VER}-amd64-linux.zip" && \
mkdir -p /app/nzbhydra2 && \
unzip /tmp/nzbhydra2.zip -d /app/nzbhydra2 && \
chmod +x /app/nzbhydra2/nzbhydra2wrapperPy3.py && \
if [ -f /app/nzbhydra2/core ]; then chmod +x /app/nzbhydra2/core; fi && \
echo "ReleaseType=${NZBHYDRA2_RELEASE_TYPE}\nPackageVersion=${VERSION}\nPackageAuthor=linuxserver.io" > /app/nzbhydra2/package_info && \
mkdir -p /defaults && \
curl -o \
/defaults/nzbhydra.yml -L \
"https://raw.githubusercontent.com/theotherp/nzbhydra2/v${NZBHYDRA2_VER}/core/src/main/resources/config/baseConfig.yml" && \
sed -i 's/mapIpToHost: true/mapIpToHost: false/' /defaults/nzbhydra.yml && \
printf "Linuxserver.io version: ${VERSION}\nBuild-date: ${BUILD_DATE}" > /build_version && \
echo "**** cleanup ****" && \
rm -rf \
/tmp/* \
/var/lib/apt/lists/* \
/var/tmp/* \
/var/log/* \
/app/nzbhydra2/upstart \
/app/nzbhydra2/rc.d \
/app/nzbhydra2/sysv \
/app/nzbhydra2/systemd
# copy local files
COPY root/ /
# ports and volumes
EXPOSE 5076
VOLUME /config