Skip to content

Commit

Permalink
Add comments to dockerfiles
Browse files Browse the repository at this point in the history
  • Loading branch information
HadrienPatte committed Nov 17, 2024
1 parent 06f2a38 commit 1e6a9fa
Show file tree
Hide file tree
Showing 5 changed files with 95 additions and 33 deletions.
24 changes: 18 additions & 6 deletions images/lidarr/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,29 @@ ARG UBUNTU_VERSION
# Install chisel and build rootfs with lidarr dependencies
RUN \
apt update \
&& apt install file curl --yes \
&& curl -L https://github.com/canonical/chisel/releases/download/${CHISEL_VERSION}/chisel_${CHISEL_VERSION}_linux_${TARGETARCH}.tar.gz \
| tar xzf - -C /usr/bin \
&& curl -LO --output-dir /usr/bin https://raw.githubusercontent.com/canonical/rocks-toolbox/main/chisel-wrapper \
&& apt install --yes \
# Needed to download chisel and chisel-wrapper \
curl \
# chisel-wrapper dependency \
file \
&& curl \
--location \
https://github.com/canonical/chisel/releases/download/${CHISEL_VERSION}/chisel_${CHISEL_VERSION}_linux_${TARGETARCH}.tar.gz \
| tar xzf - --directory /usr/bin \
&& curl \
--location \
--remote-name \
--output-dir /usr/bin \
https://raw.githubusercontent.com/canonical/rocks-toolbox/main/chisel-wrapper \
&& chmod +x /usr/bin/chisel-wrapper \
&& mkdir -p /rootfs/var/lib/dpkg \
&& chisel-wrapper --generate-dpkg-status /rootfs/var/lib/dpkg/status -- \
--release ubuntu-${UBUNTU_VERSION} \
--root /rootfs \
# Base filesystem \
base-files_base \
ca-certificates_data \
# lidarr dependencies \
libicu74_libs \
libsqlite3-0_libs \
libssl3t64_libs \
Expand All @@ -40,9 +52,9 @@ RUN \
'amd64') export ARCH='x64' ;; \
'arm64') export ARCH='arm64' ;; \
esac \
&& curl -L "https://github.com/Lidarr/Lidarr/releases/download/v${VERSION}/Lidarr.master.${VERSION}.linux-core-${ARCH}.tar.gz" \
&& curl --location "https://github.com/Lidarr/Lidarr/releases/download/v${VERSION}/Lidarr.master.${VERSION}.linux-core-${ARCH}.tar.gz" \
| tar xzf - -C / \
&& rm -rf /Lidarr/Lidarr.Update
&& rm -r /Lidarr/Lidarr.Update

FROM scratch
COPY --from=builder /rootfs /
Expand Down
26 changes: 19 additions & 7 deletions images/prowlarr/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,29 @@ ARG UBUNTU_VERSION
# Install chisel and build rootfs with prowlarr dependencies
RUN \
apt update \
&& apt install file curl --yes \
&& curl -L https://github.com/canonical/chisel/releases/download/${CHISEL_VERSION}/chisel_${CHISEL_VERSION}_linux_${TARGETARCH}.tar.gz \
| tar xzf - -C /usr/bin \
&& curl -LO --output-dir /usr/bin https://raw.githubusercontent.com/canonical/rocks-toolbox/main/chisel-wrapper \
&& apt install --yes \
# Needed to download chisel and chisel-wrapper \
curl \
# chisel-wrapper dependency \
file \
&& curl \
--location \
https://github.com/canonical/chisel/releases/download/${CHISEL_VERSION}/chisel_${CHISEL_VERSION}_linux_${TARGETARCH}.tar.gz \
| tar xzf - --directory /usr/bin \
&& curl \
--location \
--remote-name \
--output-dir /usr/bin \
https://raw.githubusercontent.com/canonical/rocks-toolbox/main/chisel-wrapper \
&& chmod +x /usr/bin/chisel-wrapper \
&& mkdir -p /rootfs/var/lib/dpkg \
&& chisel-wrapper --generate-dpkg-status /rootfs/var/lib/dpkg/status -- \
--release ubuntu-${UBUNTU_VERSION} \
--root /rootfs \
# Base filesystem \
base-files_base \
ca-certificates_data \
# prowlarr dependencies \
libicu74_libs \
libsqlite3-0_libs \
libssl3t64_libs \
Expand All @@ -40,9 +52,9 @@ RUN \
'amd64') export ARCH='x64' ;; \
'arm64') export ARCH='arm64' ;; \
esac \
&& curl -L "https://github.com/Prowlarr/Prowlarr/releases/download/v${VERSION}/Prowlarr.master.${VERSION}.linux-core-${ARCH}.tar.gz" \
| tar xzf - -C / \
&& rm -rf /Prowlarr/Prowlarr.Update
&& curl --location "https://github.com/Prowlarr/Prowlarr/releases/download/v${VERSION}/Prowlarr.master.${VERSION}.linux-core-${ARCH}.tar.gz" \
| tar xzf - --directory / \
&& rm -r /Prowlarr/Prowlarr.Update

FROM scratch
COPY --from=builder /rootfs /
Expand Down
26 changes: 20 additions & 6 deletions images/qbittorrent/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,26 @@ ARG UBUNTU_VERSION
# Install chisel and build rootfs
RUN \
apt update \
&& apt install file curl --yes \
&& curl -L https://github.com/canonical/chisel/releases/download/${CHISEL_VERSION}/chisel_${CHISEL_VERSION}_linux_${TARGETARCH}.tar.gz \
| tar xzf - -C /usr/bin \
&& curl -LO --output-dir /usr/bin https://raw.githubusercontent.com/canonical/rocks-toolbox/main/chisel-wrapper \
&& apt install --yes \
# Needed to download chisel and chisel-wrapper \
curl \
# chisel-wrapper dependency \
file \
&& curl \
--location \
https://github.com/canonical/chisel/releases/download/${CHISEL_VERSION}/chisel_${CHISEL_VERSION}_linux_${TARGETARCH}.tar.gz \
| tar xzf - --directory /usr/bin \
&& curl \
--location \
--remote-name \
--output-dir /usr/bin \
https://raw.githubusercontent.com/canonical/rocks-toolbox/main/chisel-wrapper \
&& chmod +x /usr/bin/chisel-wrapper \
&& mkdir -p /rootfs/var/lib/dpkg \
&& chisel-wrapper --generate-dpkg-status /rootfs/var/lib/dpkg/status -- \
--release ubuntu-${UBUNTU_VERSION} \
--root /rootfs \
# Base filesystem \
base-files_base \
ca-certificates_data \
&& useradd \
Expand All @@ -28,15 +39,18 @@ RUN \
nonroot \
&& rm /rootfs/etc/.pwd.lock \
&& mkdir -p /rootfs/config/qBittorrent/config \
&& chown -R 1000 /rootfs/config
&& chown --recursive 1000 /rootfs/config

# Download qbittorrent
RUN \
case "${TARGETARCH}" in \
'amd64') export ARCH='x86_64' ;; \
'arm64') export ARCH='aarch64' ;; \
esac \
&& curl -L -o /qbittorrent-nox "https://github.com/userdocs/qbittorrent-nox-static/releases/download/${RELEASE}/${ARCH}-qbittorrent-nox" \
&& curl \
--location \
--output /qbittorrent-nox \
"https://github.com/userdocs/qbittorrent-nox-static/releases/download/${RELEASE}/${ARCH}-qbittorrent-nox" \
&& chmod +x /qbittorrent-nox

FROM scratch
Expand Down
26 changes: 19 additions & 7 deletions images/radarr/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,29 @@ ARG UBUNTU_VERSION
# Install chisel and build rootfs with radarr dependencies
RUN \
apt update \
&& apt install file curl --yes \
&& curl -L https://github.com/canonical/chisel/releases/download/${CHISEL_VERSION}/chisel_${CHISEL_VERSION}_linux_${TARGETARCH}.tar.gz \
| tar xzf - -C /usr/bin \
&& curl -LO --output-dir /usr/bin https://raw.githubusercontent.com/canonical/rocks-toolbox/main/chisel-wrapper \
&& apt install --yes \
# Needed to download chisel and chisel-wrapper \
curl \
# chisel-wrapper dependency \
file \
&& curl \
--location \
https://github.com/canonical/chisel/releases/download/${CHISEL_VERSION}/chisel_${CHISEL_VERSION}_linux_${TARGETARCH}.tar.gz \
| tar xzf - --directory /usr/bin \
&& curl \
--location \
--remote-name \
--output-dir /usr/bin \
https://raw.githubusercontent.com/canonical/rocks-toolbox/main/chisel-wrapper \
&& chmod +x /usr/bin/chisel-wrapper \
&& mkdir -p /rootfs/var/lib/dpkg \
&& chisel-wrapper --generate-dpkg-status /rootfs/var/lib/dpkg/status -- \
--release ubuntu-${UBUNTU_VERSION} \
--root /rootfs \
# Base filesystem \
base-files_base \
ca-certificates_data \
# radarr dependencies \
libicu74_libs \
libsqlite3-0_libs \
libssl3t64_libs \
Expand All @@ -40,9 +52,9 @@ RUN \
'amd64') export ARCH='x64' ;; \
'arm64') export ARCH='arm64' ;; \
esac \
&& curl -L "https://github.com/Radarr/Radarr/releases/download/v${VERSION}/Radarr.master.${VERSION}.linux-core-${ARCH}.tar.gz" \
| tar xzf - -C / \
&& rm -rf /Radarr/Radarr.Update
&& curl --location "https://github.com/Radarr/Radarr/releases/download/v${VERSION}/Radarr.master.${VERSION}.linux-core-${ARCH}.tar.gz" \
| tar xzf - --directory / \
&& rm -r /Radarr/Radarr.Update

FROM scratch
COPY --from=builder /rootfs /
Expand Down
26 changes: 19 additions & 7 deletions images/sonarr/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,29 @@ ARG UBUNTU_VERSION
# Install chisel and build rootfs with sonarr dependencies
RUN \
apt update \
&& apt install file curl --yes \
&& curl -L https://github.com/canonical/chisel/releases/download/${CHISEL_VERSION}/chisel_${CHISEL_VERSION}_linux_${TARGETARCH}.tar.gz \
| tar xzf - -C /usr/bin \
&& curl -LO --output-dir /usr/bin https://raw.githubusercontent.com/canonical/rocks-toolbox/main/chisel-wrapper \
&& apt install --yes \
# Needed to download chisel and chisel-wrapper \
curl \
# chisel-wrapper dependency \
file \
&& curl \
--location \
https://github.com/canonical/chisel/releases/download/${CHISEL_VERSION}/chisel_${CHISEL_VERSION}_linux_${TARGETARCH}.tar.gz \
| tar xzf - --directory /usr/bin \
&& curl \
--location \
--remote-name \
--output-dir /usr/bin \
https://raw.githubusercontent.com/canonical/rocks-toolbox/main/chisel-wrapper \
&& chmod +x /usr/bin/chisel-wrapper \
&& mkdir -p /rootfs/var/lib/dpkg \
&& chisel-wrapper --generate-dpkg-status /rootfs/var/lib/dpkg/status -- \
--release ubuntu-${UBUNTU_VERSION} \
--root /rootfs \
# Base filesystem \
base-files_base \
ca-certificates_data \
# sonarr dependencies \
libicu74_libs \
libsqlite3-0_libs \
libssl3t64_libs \
Expand All @@ -40,9 +52,9 @@ RUN \
'amd64') export ARCH='x64' ;; \
'arm64') export ARCH='arm64' ;; \
esac \
&& curl -L "https://github.com/Sonarr/Sonarr/releases/download/v${VERSION}/Sonarr.main.${VERSION}.linux-${ARCH}.tar.gz" \
| tar xzf - -C / \
&& rm -rf /Sonarr/Sonarr.Update
&& curl --location "https://github.com/Sonarr/Sonarr/releases/download/v${VERSION}/Sonarr.main.${VERSION}.linux-${ARCH}.tar.gz" \
| tar xzf - --directory / \
&& rm -r /Sonarr/Sonarr.Update

FROM scratch
COPY --from=builder /rootfs /
Expand Down

0 comments on commit 1e6a9fa

Please sign in to comment.