Skip to content

Commit

Permalink
Merge branch 'main' of github.com:geek-cookbook/containers
Browse files Browse the repository at this point in the history
  • Loading branch information
funkypenguin committed Feb 10, 2025
2 parents 21e6746 + ff25b2e commit 8935d3a
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 24 deletions.
60 changes: 46 additions & 14 deletions apps/nzbhydra2/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,23 +1,55 @@
FROM ghcr.io/elfhosted/alpine:rolling@sha256:9fe67d87930b27bf9f7743ac1a4fe4d6b614d3ac94420babdffe243888a3e36d
FROM ghcr.io/elfhosted/ubuntu:rolling@sha256:224fbe07e825d0ee91b483bd8403be754971bd0d4813689dbeb28a2435ab46d6 as builder

ARG TARGETPLATFORM
ARG BUILDPLATFORM
# set version label
ARG VERSION
ARG CHANNEL
ARG NZBHYDRA2_RELEASE=${VERSION}

SHELL ["/bin/bash", "-o", "pipefail", "-c"]
# environment settings
ENV NZBHYDRA2_RELEASE_TYPE="Release" \
DEBIAN_FRONTEND="noninteractive"

#hadolint ignore=DL3018
RUN apk add --no-cache ca-certificates openjdk11-jre-headless python3
#hadolint ignore=DL3018,DL3059
RUN \
curl -fsSL -o /tmp/nzbhydra2.zip \
"https://github.com/theotherp/nzbhydra2/releases/download/v${VERSION}/nzbhydra2-${VERSION}-amd64-linux.zip" \
&& unzip -q /tmp/nzbhydra2.zip -d /app \
&& chown -R root:root /app \
&& chmod -R 755 /app \
&& rm -rf /tmp/*
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

# ports and volumes
EXPOSE 5076

VOLUME /config # needed for goss tests
USER 568
COPY ./apps/nzbhydra2/entrypoint.sh /entrypoint.sh
CMD ["/entrypoint.sh"]
Expand Down
10 changes: 1 addition & 9 deletions apps/nzbhydra2/ci/goss.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,9 @@
# https://github.com/aelsabbahy/goss/blob/master/docs/manual.md#process
process:
python3:
running: true

# https://github.com/aelsabbahy/goss/blob/master/docs/manual.md#port
port:
# https://github.com/aelsabbahy/goss/issues/149
tcp:5076:
listening: true
timeout: 30000
running: true

# https://github.com/aelsabbahy/goss/blob/master/docs/manual.md#http
http:
http://localhost:5076:
status: 200
timeout: 30000
2 changes: 1 addition & 1 deletion apps/nzbhydra2/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ test -f "/scripts/umask.sh" && source "/scripts/umask.sh"
#shellcheck disable=SC2086
exec \
/usr/bin/python3 \
/app/nzbhydra2wrapperPy3.py \
/app/nzbhydra2/nzbhydra2wrapperPy3.py \
--nobrowser \
--datafolder /config \
"$@"

0 comments on commit 8935d3a

Please sign in to comment.