Files
docker-nzbhydra2/Dockerfile
T

49 lines
1.4 KiB
Docker
Raw Normal View History

FROM lsiobase/ubuntu:bionic
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}"
2020-04-29 07:20:31 -05:00
LABEL maintainer="aptalca,nemchik"
2018-01-11 18:58:36 +00:00
# environment settings
ARG DEBIAN_FRONTEND="noninteractive"
2020-05-01 10:28:09 -05:00
ENV NZBHYDRA2_RELEASE_TYPE="Pre-Release"
2018-01-11 18:58:36 +00:00
RUN \
echo "**** install packages ****" && \
apt-get update && \
apt-get install -y \
2018-01-11 18:58:36 +00:00
curl \
2020-01-05 11:27:19 -05:00
jq \
2018-01-11 18:58:36 +00:00
unzip && \
apt-get install --no-install-recommends -y \
openjdk-11-jre-headless \
2020-01-03 13:22:25 -06:00
python3 && \
2020-02-12 11:25:27 -06:00
echo "**** install nzbhydra2 ****" && \
if [ -z ${NZBHYDRA2_RELEASE+x} ]; then \
NZBHYDRA2_RELEASE=$(curl -sX GET "https://api.github.com/repos/theotherp/nzbhydra2/releases" \
2020-05-01 09:58:19 -05:00
| jq -r '.[0] | .tag_name'); \
2019-01-09 00:07:15 -08:00
fi && \
2020-02-12 11:25:27 -06:00
NZBHYDRA2_VER=${NZBHYDRA2_RELEASE#v} && \
2018-01-11 18:58:36 +00:00
curl -o \
2020-02-12 11:25:27 -06:00
/tmp/nzbhydra2.zip -L \
"https://github.com/theotherp/nzbhydra2/releases/download/v${NZBHYDRA2_VER}/nzbhydra2-${NZBHYDRA2_VER}-linux.zip" && \
2020-05-01 10:28:09 -05:00
mkdir -p /app/nzbhydra2/bin && \
unzip /tmp/nzbhydra2.zip -d /app/nzbhydra2/bin && \
chmod +x /app/nzbhydra2/bin/nzbhydra2wrapperPy3.py && \
2020-05-01 13:56:08 -05:00
echo "ReleaseType=${NZBHYDRA2_RELEASE_TYPE}\nPackageVersion=${VERSION}\nPackageAuthor=linuxserver.io" > /app/nzbhydra2/package_info && \
2018-01-11 18:58:36 +00:00
echo "**** cleanup ****" && \
rm -rf \
/tmp/* \
/var/lib/apt/lists/* \
/var/tmp/*
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
2020-01-03 13:22:25 -06:00
VOLUME /config