-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0e33cb2
commit 6e38ee8
Showing
5 changed files
with
57 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
ARG GOLANG_VERSION | ||
FROM golang:$GOLANG_VERSION AS builder | ||
|
||
ARG TARGETARCH | ||
ARG VERSION | ||
ARG CHISEL_VERSION | ||
|
||
# Install chisel and build rootfs with lidarr dependencies | ||
RUN \ | ||
go install github.com/canonical/chisel/cmd/chisel@${CHISEL_VERSION} \ | ||
&& curl -LO https://raw.githubusercontent.com/canonical/rocks-toolbox/main/chisel-wrapper \ | ||
&& chmod +x ./chisel-wrapper \ | ||
&& apt update \ | ||
&& apt install file --yes \ | ||
&& mkdir -p /rootfs/var/lib/dpkg \ | ||
&& ./chisel-wrapper --generate-dpkg-status /rootfs/var/lib/dpkg/status -- \ | ||
--release ubuntu-24.04 \ | ||
--root /rootfs \ | ||
base-files_base \ | ||
ca-certificates_data \ | ||
libicu74_libs \ | ||
libsqlite3-0_libs \ | ||
libssl3t64_libs \ | ||
zlib1g_libs \ | ||
coreutils_bins \ | ||
&& useradd \ | ||
--root /rootfs \ | ||
--system \ | ||
--no-create-home \ | ||
--uid 1000 \ | ||
nonroot \ | ||
&& rm /rootfs/etc/.pwd.lock \ | ||
&& mkdir /rootfs/config \ | ||
&& chown 1000 /rootfs/config | ||
|
||
# Download lidarr | ||
RUN \ | ||
case "${TARGETARCH}" in \ | ||
'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" \ | ||
| tar xzf - -C / \ | ||
&& rm -rf /Lidarr/Lidarr.Update | ||
|
||
FROM scratch | ||
COPY --from=builder /rootfs / | ||
COPY --from=builder /Lidarr /Lidarr | ||
|
||
USER nonroot | ||
ENTRYPOINT ["/Lidarr/Lidarr", "--nobrowser", "--data=/config"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"repository": "Lidarr/Lidarr" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters