Skip to content

Commit

Permalink
Add sonarr image
Browse files Browse the repository at this point in the history
  • Loading branch information
HadrienPatte committed Mar 27, 2024
1 parent 1bde042 commit 71064cc
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 0 deletions.
34 changes: 34 additions & 0 deletions images/sonarr/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
FROM golang:latest as builder

ARG TARGETARCH
ARG VERSION

# Install chisel and build rootfs with sonarr dependencies
RUN \
go install github.com/canonical/chisel/cmd/chisel@latest \
&& mkdir /rootfs \
&& chisel cut \
--release ubuntu-24.04 \
--root /rootfs \
base-files_base \
base-files_release-info \
base-passwd_data \
ca-certificates_data \
dotnet-runtime-8.0_libs \
libsqlite3-0_libs

# Download sonarrc
RUN \
case "${TARGETARCH}" in \
'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

FROM scratch
COPY --from=builder /rootfs /
COPY --from=builder /Sonarr /Sonarr

ENTRYPOINT ["/Sonarr/Sonarr", "--nobrowser", "--data=/config"]
4 changes: 4 additions & 0 deletions images/sonarr/version.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env bash
set -euo pipefail

curl -s "https://api.github.com/repos/Sonarr/Sonarr/releases/latest" | jq -r '.name'

0 comments on commit 71064cc

Please sign in to comment.