Files

61 lines
1.9 KiB
Docker
Raw Permalink Normal View History

2022-12-13 21:42:52 +01:00
# syntax=docker/dockerfile:1
2024-07-18 16:26:07 +01:00
FROM ghcr.io/linuxserver/baseimage-ubuntu:noble
2018-01-11 18:58:36 +00:00
# set version label
ARG BUILD_DATE
ARG VERSION
2020-02-12 11:25:27 -06:00
ARG NZBHYDRA2_RELEASE
2018-01-11 18:58:36 +00:00
LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}"
2022-04-18 22:14:13 +01:00
LABEL maintainer="nemchik"
2018-01-11 18:58:36 +00:00
# environment settings
2024-07-18 16:26:07 +01:00
ENV NZBHYDRA2_RELEASE_TYPE="Release" \
DEBIAN_FRONTEND="noninteractive"
2018-01-11 18:58:36 +00:00
RUN \
2022-04-18 22:14:13 +01:00
echo "**** install packages ****" && \
2022-12-13 21:42:52 +01:00
apt-get update && \
apt-get install --no-install-recommends -y \
2023-01-20 21:06:03 +00:00
libfreetype6 \
2022-12-13 21:42:52 +01:00
python3 \
2022-04-18 22:14:13 +01:00
unzip && \
echo "**** install nzbhydra2 ****" && \
if [ -z ${NZBHYDRA2_RELEASE+x} ]; then \
2022-12-13 23:52:26 +01:00
NZBHYDRA2_RELEASE=$(curl -sX GET "https://api.github.com/repos/theotherp/nzbhydra2/releases" \
2023-01-20 21:06:03 +00:00
| jq -r '.[0] | .tag_name'); \
2022-04-18 22:14:13 +01:00
fi && \
NZBHYDRA2_VER=${NZBHYDRA2_RELEASE#v} && \
curl -o \
2022-12-13 21:42:52 +01:00
/tmp/nzbhydra2.zip -L \
"https://github.com/theotherp/nzbhydra2/releases/download/v${NZBHYDRA2_VER}/nzbhydra2-${NZBHYDRA2_VER}-amd64-linux.zip" && \
2023-01-20 21:06:03 +00:00
mkdir -p /app/nzbhydra2 && \
unzip /tmp/nzbhydra2.zip -d /app/nzbhydra2 && \
chmod +x /app/nzbhydra2/nzbhydra2wrapperPy3.py && \
2023-01-22 19:59:28 +00:00
if [ -f /app/nzbhydra2/core ]; then chmod +x /app/nzbhydra2/core; fi && \
2022-12-13 21:42:52 +01:00
echo "ReleaseType=${NZBHYDRA2_RELEASE_TYPE}\nPackageVersion=${VERSION}\nPackageAuthor=linuxserver.io" > /app/nzbhydra2/package_info && \
mkdir -p /defaults && \
curl -o \
/defaults/nzbhydra.yml -L \
2023-01-20 21:06:03 +00:00
"https://raw.githubusercontent.com/theotherp/nzbhydra2/v${NZBHYDRA2_VER}/core/src/main/resources/config/baseConfig.yml" && \
2022-12-13 21:42:52 +01:00
sed -i 's/mapIpToHost: true/mapIpToHost: false/' /defaults/nzbhydra.yml && \
2024-07-18 16:26:07 +01:00
printf "Linuxserver.io version: ${VERSION}\nBuild-date: ${BUILD_DATE}" > /build_version && \
2022-04-18 22:14:13 +01:00
echo "**** cleanup ****" && \
rm -rf \
2022-12-13 21:42:52 +01:00
/tmp/* \
/var/lib/apt/lists/* \
/var/tmp/* \
2022-12-13 23:52:26 +01:00
/var/log/* \
2023-01-20 21:06:03 +00:00
/app/nzbhydra2/upstart \
/app/nzbhydra2/rc.d \
/app/nzbhydra2/sysv \
/app/nzbhydra2/systemd
2018-01-11 18:58:36 +00:00
# copy local files
COPY root/ /
# ports and volumes
2018-04-15 15:24:19 +02:00
EXPOSE 5076
2022-12-13 21:42:52 +01:00
2020-01-03 13:22:25 -06:00
VOLUME /config