diff --git a/.github/scripts/build-image.sh b/.github/scripts/build-image.sh index 153646e..8054929 100755 --- a/.github/scripts/build-image.sh +++ b/.github/scripts/build-image.sh @@ -5,8 +5,8 @@ IMAGE=$1 echo "Building $IMAGE" -DEFAULT_GOLANG_VERSION="1.21" -DEFAULT_CHISEL_VERSION="v0.10.0" +DEFAULT_UBUNTU_VERSION="24.04" +DEFAULT_CHISEL_VERSION="v1.0.0" REPOSITORY=$(jq -r '.repository' ./images/${IMAGE}/metadata.json) DESCRIPTION=$(curl -s "https://api.github.com/repos/${REPOSITORY}" | jq -r '.description | values') @@ -28,7 +28,7 @@ else --tag ghcr.io/${GITHUB_REPOSITORY_OWNER,,}/${IMAGE}:latest \ --build-arg RELEASE=${RELEASE} \ --build-arg VERSION=${VERSION} \ - --build-arg GOLANG_VERSION=${DEFAULT_GOLANG_VERSION} \ + --build-arg UBUNTU_VERSION=${DEFAULT_UBUNTU_VERSION} \ --build-arg CHISEL_VERSION=${DEFAULT_CHISEL_VERSION} \ --build-arg SOURCE_DATE_EPOCH=${SOURCE_DATE_EPOCH} \ --label "org.opencontainers.image.authors=${GITHUB_REPOSITORY_OWNER}" \ diff --git a/images/lidarr/Dockerfile b/images/lidarr/Dockerfile index d6bde36..cfcd716 100644 --- a/images/lidarr/Dockerfile +++ b/images/lidarr/Dockerfile @@ -1,20 +1,22 @@ -ARG GOLANG_VERSION -FROM golang:$GOLANG_VERSION AS builder +ARG UBUNTU_VERSION +FROM ubuntu:$UBUNTU_VERSION AS builder ARG TARGETARCH ARG VERSION ARG CHISEL_VERSION +ARG UBUNTU_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 \ + 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 \ + && chmod +x /usr/bin/chisel-wrapper \ && mkdir -p /rootfs/var/lib/dpkg \ - && ./chisel-wrapper --generate-dpkg-status /rootfs/var/lib/dpkg/status -- \ - --release ubuntu-24.04 \ + && chisel-wrapper --generate-dpkg-status /rootfs/var/lib/dpkg/status -- \ + --release ubuntu-${UBUNTU_VERSION} \ --root /rootfs \ base-files_base \ ca-certificates_data \ diff --git a/images/prowlarr/Dockerfile b/images/prowlarr/Dockerfile index 22ff436..485c358 100644 --- a/images/prowlarr/Dockerfile +++ b/images/prowlarr/Dockerfile @@ -1,20 +1,22 @@ -ARG GOLANG_VERSION -FROM golang:$GOLANG_VERSION AS builder +ARG UBUNTU_VERSION +FROM ubuntu:$UBUNTU_VERSION AS builder ARG TARGETARCH ARG VERSION ARG CHISEL_VERSION +ARG UBUNTU_VERSION # Install chisel and build rootfs with prowlarr 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 \ + 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 \ + && chmod +x /usr/bin/chisel-wrapper \ && mkdir -p /rootfs/var/lib/dpkg \ - && ./chisel-wrapper --generate-dpkg-status /rootfs/var/lib/dpkg/status -- \ - --release ubuntu-24.04 \ + && chisel-wrapper --generate-dpkg-status /rootfs/var/lib/dpkg/status -- \ + --release ubuntu-${UBUNTU_VERSION} \ --root /rootfs \ base-files_base \ ca-certificates_data \ diff --git a/images/qbittorrent/Dockerfile b/images/qbittorrent/Dockerfile index a4c5756..b4058b6 100644 --- a/images/qbittorrent/Dockerfile +++ b/images/qbittorrent/Dockerfile @@ -1,20 +1,22 @@ -ARG GOLANG_VERSION -FROM golang:$GOLANG_VERSION AS builder +ARG UBUNTU_VERSION +FROM ubuntu:$UBUNTU_VERSION AS builder ARG TARGETARCH ARG RELEASE ARG CHISEL_VERSION +ARG UBUNTU_VERSION # Install chisel and build rootfs 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 \ + 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 \ + && chmod +x /usr/bin/chisel-wrapper \ && mkdir -p /rootfs/var/lib/dpkg \ - && ./chisel-wrapper --generate-dpkg-status /rootfs/var/lib/dpkg/status -- \ - --release ubuntu-24.04 \ + && chisel-wrapper --generate-dpkg-status /rootfs/var/lib/dpkg/status -- \ + --release ubuntu-${UBUNTU_VERSION} \ --root /rootfs \ base-files_base \ ca-certificates_data \ diff --git a/images/radarr/Dockerfile b/images/radarr/Dockerfile index 9f1ac14..125ffab 100644 --- a/images/radarr/Dockerfile +++ b/images/radarr/Dockerfile @@ -1,20 +1,22 @@ -ARG GOLANG_VERSION -FROM golang:$GOLANG_VERSION AS builder +ARG UBUNTU_VERSION +FROM ubuntu:$UBUNTU_VERSION AS builder ARG TARGETARCH ARG VERSION ARG CHISEL_VERSION +ARG UBUNTU_VERSION # Install chisel and build rootfs with radarr 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 \ + 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 \ + && chmod +x /usr/bin/chisel-wrapper \ && mkdir -p /rootfs/var/lib/dpkg \ - && ./chisel-wrapper --generate-dpkg-status /rootfs/var/lib/dpkg/status -- \ - --release ubuntu-24.04 \ + && chisel-wrapper --generate-dpkg-status /rootfs/var/lib/dpkg/status -- \ + --release ubuntu-${UBUNTU_VERSION} \ --root /rootfs \ base-files_base \ ca-certificates_data \ diff --git a/images/sonarr/Dockerfile b/images/sonarr/Dockerfile index b9fe89a..45fd41b 100644 --- a/images/sonarr/Dockerfile +++ b/images/sonarr/Dockerfile @@ -1,20 +1,22 @@ -ARG GOLANG_VERSION -FROM golang:$GOLANG_VERSION AS builder +ARG UBUNTU_VERSION +FROM ubuntu:$UBUNTU_VERSION AS builder ARG TARGETARCH ARG VERSION ARG CHISEL_VERSION +ARG UBUNTU_VERSION # Install chisel and build rootfs with sonarr 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 \ + 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 \ + && chmod +x /usr/bin/chisel-wrapper \ && mkdir -p /rootfs/var/lib/dpkg \ - && ./chisel-wrapper --generate-dpkg-status /rootfs/var/lib/dpkg/status -- \ - --release ubuntu-24.04 \ + && chisel-wrapper --generate-dpkg-status /rootfs/var/lib/dpkg/status -- \ + --release ubuntu-${UBUNTU_VERSION} \ --root /rootfs \ base-files_base \ ca-certificates_data \