diff --git a/.github/workflows/BuildImage.yml b/.github/workflows/BuildImage.yml index 39a64e9b..8213c2f0 100644 --- a/.github/workflows/BuildImage.yml +++ b/.github/workflows/BuildImage.yml @@ -7,6 +7,7 @@ env: ENDPOINT: "linuxserver/mods" #don't modify BASEIMAGE: "replace_baseimage" #replace MODNAME: "replace_modname" #replace + MULTI_ARCH: "false" #set to true if needed jobs: set-vars: @@ -19,6 +20,7 @@ jobs: echo "ENDPOINT=${{ env.ENDPOINT }}" >> $GITHUB_OUTPUT echo "BASEIMAGE=${{ env.BASEIMAGE }}" >> $GITHUB_OUTPUT echo "MODNAME=${{ env.MODNAME }}" >> $GITHUB_OUTPUT + echo "MULTI_ARCH=${{ env.MULTI_ARCH }}" >> $GITHUB_OUTPUT # **** If the mod needs to be versioned, set the versioning logic below. Otherwise leave as is. **** MOD_VERSION="" echo "MOD_VERSION=${MOD_VERSION}" >> $GITHUB_OUTPUT @@ -27,6 +29,7 @@ jobs: ENDPOINT: ${{ steps.outputs.outputs.ENDPOINT }} BASEIMAGE: ${{ steps.outputs.outputs.BASEIMAGE }} MODNAME: ${{ steps.outputs.outputs.MODNAME }} + MULTI_ARCH: ${{ steps.outputs.outputs.MULTI_ARCH }} MOD_VERSION: ${{ steps.outputs.outputs.MOD_VERSION }} build: @@ -42,4 +45,5 @@ jobs: ENDPOINT: ${{ needs.set-vars.outputs.ENDPOINT }} BASEIMAGE: ${{ needs.set-vars.outputs.BASEIMAGE }} MODNAME: ${{ needs.set-vars.outputs.MODNAME }} + MULTI_ARCH: ${{ needs.set-vars.outputs.MULTI_ARCH }} MOD_VERSION: ${{ needs.set-vars.outputs.MOD_VERSION }} diff --git a/Dockerfile.complex b/Dockerfile.complex index c0b5cf72..eb80898f 100644 --- a/Dockerfile.complex +++ b/Dockerfile.complex @@ -1,7 +1,7 @@ # syntax=docker/dockerfile:1 ## Buildstage ## -FROM ghcr.io/linuxserver/baseimage-alpine:3.17 as buildstage +FROM ghcr.io/linuxserver/baseimage-alpine:3.19 as buildstage RUN \ echo "**** install packages ****" && \ @@ -9,9 +9,17 @@ RUN \ curl && \ echo "**** grab rclone ****" && \ mkdir -p /root-layer && \ - curl -o \ - /root-layer/rclone.deb -L \ - "https://downloads.rclone.org/v1.47.0/rclone-v1.47.0-linux-amd64.deb" + if [ $(uname -m) = "x86_64" ]; then \ + echo "Downloading x86_64 tarball" && \ + curl -o \ + /root-layer/rclone.deb -L \ + "https://downloads.rclone.org/v1.47.0/rclone-v1.47.0-linux-amd64.deb"; \ + elif [ $(uname -m) = "aarch64" ]; then \ + echo "Downloading aarch64 tarball" && \ + curl -o \ + /root-layer/rclone.deb -L \ + "https://downloads.rclone.org/v1.47.0/rclone-v1.47.0-linux-arm64.deb"; \ + fi && \ # copy local files COPY root/ /root-layer/ diff --git a/README.md b/README.md index c8bfc60a..17006683 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ If adding multiple mods, enter them in an array separated by `|`, such as `DOCKE * Inspect the `root` folder contents. Edit, add and remove as necessary. * After all init scripts and services are created, run `find ./ -path "./.git" -prune -o \( -name "run" -o -name "finish" -o -name "check" \) -not -perm -u=x,g=x,o=x -print -exec chmod +x {} +` to fix permissions. * Edit this readme with pertinent info, delete these instructions. -* Finally edit the `.github/workflows/BuildImage.yml`. Customize the vars for `BASEIMAGE` and `MODNAME`. Set the versioning logic if needed. +* Finally edit the `.github/workflows/BuildImage.yml`. Customize the vars for `BASEIMAGE` and `MODNAME`. Set the versioning logic and `MULTI_ARCH` if needed. * Ask the team to create a new branch named `-`. Baseimage should be the name of the image the mod will be applied to. The new branch will be based on the `template` branch. * Submit PR against the branch created by the team.