-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathContainerfile
More file actions
70 lines (59 loc) · 3.16 KB
/
Containerfile
File metadata and controls
70 lines (59 loc) · 3.16 KB
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
61
62
63
64
65
66
67
68
69
70
# --------------------------------------------------------------------------
# THIS FILE IS AUTOGENERATED - DO NOT EDIT MANUALLY
#
# Source: Containerfile.j2
# --------------------------------------------------------------------------
ARG BASE_VERSION=15
FROM ghcr.io/daemonless/base:${BASE_VERSION}
ARG FREEBSD_ARCH=amd64
ARG PACKAGES="python311 py311-pip py311-setuptools py311-sqlite3 py311-cryptography py311-feedparser py311-configobj py311-cherrypy py311-portend py311-chardet py311-pysocks py311-sabctools py311-guessit py311-puremagic py311-rarfile py311-apprise par2cmdline-turbo unrar 7-zip ca_root_nss"
ARG UPSTREAM_URL="https://api.github.com/repos/sabnzbd/sabnzbd/releases/latest"
ARG UPSTREAM_JQ=".tag_name"
ARG HEALTHCHECK_ENDPOINT="http://localhost:8080/api?mode=version"
ENV HEALTHCHECK_URL="${HEALTHCHECK_ENDPOINT}"
# --- Metadata (Injected by Generator) ---
LABEL org.opencontainers.image.title="SABnzbd" \
org.opencontainers.image.description="Free and easy binary newsreader that automates the downloading and processing of Usenet content." \
org.opencontainers.image.source="https://github.com/daemonless/sabnzbd" \
org.opencontainers.image.url="https://sabnzbd.org/" \
org.opencontainers.image.documentation="https://sabnzbd.org/wiki/" \
org.opencontainers.image.licenses="GPL-2.0-or-later" \
org.opencontainers.image.vendor="daemonless" \
org.opencontainers.image.authors="daemonless" \
io.daemonless.category="Downloaders" \
io.daemonless.port="8080" \
io.daemonless.volumes="/config,/downloads" \
io.daemonless.arch="${FREEBSD_ARCH}" \
io.daemonless.upstream-url="${UPSTREAM_URL}" \
io.daemonless.upstream-jq="${UPSTREAM_JQ}" \
io.daemonless.healthcheck-url="${HEALTHCHECK_ENDPOINT}" \
io.daemonless.packages="${PACKAGES}"
# Install dependencies
RUN pkg update && \
pkg install -y \
${PACKAGES} && \
pkg clean -ay && \
rm -rf /var/cache/pkg/* /var/db/pkg/repos/*
# Download and install SABnzbd from GitHub
RUN mkdir -p /app/sabnzbd && \
chmod 755 /app && \
SABNZBD_VERSION=$(fetch -qo - "${UPSTREAM_URL}" | jq -r "${UPSTREAM_JQ}") && \
echo "Downloading SABnzbd ${SABNZBD_VERSION}" && \
fetch -qo /tmp/sabnzbd.tar.gz "https://github.com/sabnzbd/sabnzbd/releases/download/${SABNZBD_VERSION}/SABnzbd-${SABNZBD_VERSION}-src.tar.gz" && \
LANG=C.UTF-8 tar xzf /tmp/sabnzbd.tar.gz -C /app/sabnzbd --strip-components=1 && \
test -f /app/sabnzbd/SABnzbd.py && \
chmod -R o+rX /app/sabnzbd && \
printf "UpdateMethod=docker\nPackageVersion=%s\nPackageAuthor=[daemonless](https://github.com/daemonless/daemonless)\n" "$SABNZBD_VERSION" > /app/sabnzbd/package_info && \
echo "$SABNZBD_VERSION" > /app/version && \
rm -f /tmp/sabnzbd.tar.gz
# Create directories
RUN mkdir -p /config /downloads/complete /downloads/incomplete && \
chown -R bsd:bsd /app/sabnzbd /config /downloads
# Copy service definition and init scripts
COPY root/ /
# Make scripts executable
RUN chmod +x /etc/services.d/sabnzbd/run /etc/cont-init.d/* 2>/dev/null || true
# --- Expose (Injected by Generator) ---
EXPOSE 8080
# --- Volumes (Injected by Generator) ---
VOLUME /config /downloads