From 806bfb242ec580e4de9445d5f442d94f3f91f164 Mon Sep 17 00:00:00 2001 From: Son Date: Tue, 6 Feb 2024 19:37:37 -0500 Subject: [PATCH 01/15] Add arm64 Dockerfile and PalServer.sh modification --- Dockerfile.arm64 | 103 +++++++++++++++++++++++++++++++++++++++++++++++ scripts/start.sh | 13 +++++- 2 files changed, 115 insertions(+), 1 deletion(-) create mode 100644 Dockerfile.arm64 diff --git a/Dockerfile.arm64 b/Dockerfile.arm64 new file mode 100644 index 000000000..bb3e904f7 --- /dev/null +++ b/Dockerfile.arm64 @@ -0,0 +1,103 @@ +# build rcon-cli for arm64-linux +FROM arm64v8/golang:1.19.3-bullseye as rcon-cli_builder + +WORKDIR /build + +RUN apt-get update && \ + apt-get install -y gcc libc-dev wget && \ + apt-get clean && \ + rm -rf /var/lib/apt/lists/* + +RUN wget --progress=dot:giga https://github.com/gorcon/rcon-cli/archive/refs/tags/v${RCON_VERSION}.tar.gz -O rcon.tar.gz \ + && tar -xzvf rcon.tar.gz \ + && rm rcon.tar.gz \ + && mv rcon-cli-${RCON_VERSION}/* ./ \ + && rm -rf rcon-cli-${RCON_VERSION} \ + && go get -v -t -d ./... && env GOARCH=arm64 GOOS=linux go build -v ./cmd/gorcon + +# main image +FROM sonroyaalmerol/steamcmd:latest +LABEL maintainer="thijs@loef.dev" \ + name="thijsvanloef/palworld-server-docker" \ + github="https://github.com/thijsvanloef/palworld-server-docker" \ + dockerhub="https://hub.docker.com/r/thijsvanloef/palworld-server-docker" \ + org.opencontainers.image.authors="Thijs van Loef" \ + org.opencontainers.image.source="https://github.com/thijsvanloef/palworld-server-docker" + +# update and install dependencies +RUN apt-get update && apt-get install -y --no-install-recommends \ + procps=2:3.3.17-5 \ + wget=1.21-1+deb11u1 \ + xdg-user-dirs=0.17-2 \ + jo=1.3-2 \ + && apt-get clean \ + && rm -rf /var/lib/apt/lists/* + +# set envs +# SUPERCRONIC: Latest releases available at https://github.com/aptible/supercronic/releases +# RCON: Latest releases available at https://github.com/gorcon/rcon-cli/releases +# NOTICE: edit RCON_MD5SUM SUPERCRONIC_SHA1SUM when using binaries of another version or arch. +ENV SUPERCRONIC_SHA1SUM="512f6736450c56555e01b363144c3c9d23abed4c" \ + RCON_VERSION="0.10.3" \ + SUPERCRONIC_VERSION="0.2.29" + +# install rcon and supercronic +SHELL ["/bin/bash", "-o", "pipefail", "-c"] + +COPY --from=rcon-cli_builder /build/gorcon /usr/bin/rcon-cli + +RUN wget --progress=dot:giga https://github.com/aptible/supercronic/releases/download/v${SUPERCRONIC_VERSION}/supercronic-linux-arm64 -O supercronic \ + && echo "${SUPERCRONIC_SHA1SUM}" supercronic | sha1sum -c - \ + && chmod +x supercronic \ + && mv supercronic /usr/local/bin/supercronic + +ENV PORT= \ + PUID=1000 \ + PGID=1000 \ + PLAYERS= \ + MULTITHREADING=false \ + COMMUNITY=false \ + PUBLIC_IP= \ + PUBLIC_PORT= \ + SERVER_PASSWORD= \ + SERVER_NAME= \ + ADMIN_PASSWORD= \ + UPDATE_ON_BOOT=true \ + RCON_ENABLED=true \ + RCON_PORT=25575 \ + QUERY_PORT=27015 \ + TZ=UTC \ + SERVER_DESCRIPTION= \ + BACKUP_ENABLED=true \ + DELETE_OLD_BACKUPS=false \ + OLD_BACKUP_DAYS=30 \ + BACKUP_CRON_EXPRESSION="0 0 * * *" \ + AUTO_UPDATE_ENABLED=false \ + AUTO_UPDATE_CRON_EXPRESSION="0 * * * *" \ + AUTO_UPDATE_WARN_MINUTES=30 \ + AUTO_REBOOT_ENABLED=false \ + AUTO_REBOOT_WARN_MINUTES=5 \ + AUTO_REBOOT_CRON_EXPRESSION="0 0 * * *" \ + DISCORD_WEBHOOK_URL= \ + DISCORD_CONNECT_TIMEOUT=30 \ + DISCORD_MAX_TIMEOUT=30 \ + DISCORD_PRE_UPDATE_BOOT_MESSAGE="Server is updating..." \ + DISCORD_POST_UPDATE_BOOT_MESSAGE="Server update complete!" \ + DISCORD_PRE_START_MESSAGE="Server has been started!" \ + DISCORD_PRE_SHUTDOWN_MESSAGE="Server is shutting down..." \ + DISCORD_POST_SHUTDOWN_MESSAGE="Server has been stopped!" + +COPY ./scripts/* /home/steam/server/ + +RUN chmod +x /home/steam/server/*.sh && \ + mv /home/steam/server/backup.sh /usr/local/bin/backup && \ + mv /home/steam/server/update.sh /usr/local/bin/update && \ + mv /home/steam/server/restore.sh /usr/local/bin/restore + +WORKDIR /home/steam/server + +HEALTHCHECK --start-period=5m \ + CMD pgrep "PalServer-Linux" > /dev/null || exit 1 + +EXPOSE ${PORT} ${RCON_PORT} +ENTRYPOINT ["/home/steam/server/init.sh"] diff --git a/scripts/start.sh b/scripts/start.sh index 624d4c445..a7921ebe9 100644 --- a/scripts/start.sh +++ b/scripts/start.sh @@ -70,7 +70,18 @@ if [ "${UPDATE_ON_BOOT,,}" = true ]; then fi fi -STARTCOMMAND=("./PalServer.sh") +# Get the architecture using dpkg +architecture=$(dpkg --print-architecture) +# Check if the architecture is arm64 +if [ "$architecture" == "arm64" ]; then + # create an arm64 version of ./PalServer.sh + cp ./PalServer.sh ./PalServer-arm64.sh + sed -i 's|\("$UE_PROJECT_ROOT\/Pal\/Binaries\/Linux\/PalServer-Linux-Test" Pal "$@"\)|LD_LIBRARY_PATH=/home/steam/steamcmd/linux64:$LD_LIBRARY_PATH box64 \1|' ./PalServer-arm64.sh + chmod +x ./PalServer-arm64.sh + STARTCOMMAND=("./PalServer-arm64.sh") +else + STARTCOMMAND=("./PalServer.sh") +fi if ! fileExists "${STARTCOMMAND[0]}"; then echo "Try restarting with UPDATE_ON_BOOT=true" From 3caa95ee8fbe4046bb935c9e98e98f2303dd2d0d Mon Sep 17 00:00:00 2001 From: Son Date: Tue, 6 Feb 2024 19:38:14 -0500 Subject: [PATCH 02/15] Rename original Dockerfile to follow build workflow template --- Dockerfile => Dockerfile.amd64 | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename Dockerfile => Dockerfile.amd64 (100%) diff --git a/Dockerfile b/Dockerfile.amd64 similarity index 100% rename from Dockerfile rename to Dockerfile.amd64 From 23477a23a66d57806a9004470500ffcbddd840d2 Mon Sep 17 00:00:00 2001 From: Son Date: Tue, 6 Feb 2024 19:38:41 -0500 Subject: [PATCH 03/15] Add support for multi-architecture docker build workflow --- .github/workflows/docker-hub.yml | 13 +++++++++++++ .github/workflows/release.yml | 13 +++++++++++++ 2 files changed, 26 insertions(+) diff --git a/.github/workflows/docker-hub.yml b/.github/workflows/docker-hub.yml index a3621506f..94785bebe 100644 --- a/.github/workflows/docker-hub.yml +++ b/.github/workflows/docker-hub.yml @@ -7,10 +7,21 @@ on: # yamllint disable-line rule:truthy jobs: push: runs-on: ubuntu-latest + strategy: + matrix: + architecture: + - amd64 + - arm64 steps: - name: Checkout uses: actions/checkout@v4 + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + - name: Docker - Login uses: docker/login-action@v3 with: @@ -28,5 +39,7 @@ jobs: - name: Docker - Build / Push uses: docker/build-push-action@v5 with: + file: Dockerfile.${{ matrix.architecture }} + platforms: linux/${{ matrix.architecture }} push: true tags: ${{ steps.meta.outputs.tags }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index dc70a2d9a..8a3882323 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -9,10 +9,21 @@ jobs: release: name: Release - Docker image runs-on: ubuntu-latest + strategy: + matrix: + architecture: + - amd64 + - arm64 steps: - name: Checkout uses: actions/checkout@v4 + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + - name: Docker - Login uses: docker/login-action@v3 with: @@ -35,6 +46,8 @@ jobs: id: docker_build uses: docker/build-push-action@v5 with: + file: Dockerfile.${{ matrix.architecture }} + platforms: linux/${{ matrix.architecture }} push: true tags: ${{ steps.meta.outputs.tags }} From 25e3a18b9acc7d3f1caab2b0f3f5d9d004711c70 Mon Sep 17 00:00:00 2001 From: Son Date: Tue, 6 Feb 2024 19:40:45 -0500 Subject: [PATCH 04/15] Fix image name --- Dockerfile.arm64 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile.arm64 b/Dockerfile.arm64 index bb3e904f7..062c93672 100644 --- a/Dockerfile.arm64 +++ b/Dockerfile.arm64 @@ -16,7 +16,7 @@ RUN wget --progress=dot:giga https://github.com/gorcon/rcon-cli/archive/refs/tag && go get -v -t -d ./... && env GOARCH=arm64 GOOS=linux go build -v ./cmd/gorcon # main image -FROM sonroyaalmerol/steamcmd:latest +FROM sonroyaalmerol/steamcmd-arm64:latest LABEL maintainer="thijs@loef.dev" \ name="thijsvanloef/palworld-server-docker" \ github="https://github.com/thijsvanloef/palworld-server-docker" \ From 20822e4675c3968a73dd9aa696f9f5a41cb12116 Mon Sep 17 00:00:00 2001 From: Son Date: Tue, 6 Feb 2024 19:45:17 -0500 Subject: [PATCH 05/15] Use root user --- Dockerfile.arm64 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Dockerfile.arm64 b/Dockerfile.arm64 index 062c93672..89f13b985 100644 --- a/Dockerfile.arm64 +++ b/Dockerfile.arm64 @@ -17,6 +17,9 @@ RUN wget --progress=dot:giga https://github.com/gorcon/rcon-cli/archive/refs/tag # main image FROM sonroyaalmerol/steamcmd-arm64:latest + +USER root + LABEL maintainer="thijs@loef.dev" \ name="thijsvanloef/palworld-server-docker" \ github="https://github.com/thijsvanloef/palworld-server-docker" \ From 8d0634747ded6040a1ab64fd2d108a754e2658e4 Mon Sep 17 00:00:00 2001 From: Son Date: Tue, 6 Feb 2024 19:52:41 -0500 Subject: [PATCH 06/15] Change build envs to global args --- Dockerfile.arm64 | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/Dockerfile.arm64 b/Dockerfile.arm64 index 89f13b985..6f643709a 100644 --- a/Dockerfile.arm64 +++ b/Dockerfile.arm64 @@ -1,6 +1,16 @@ +# set envs +# SUPERCRONIC: Latest releases available at https://github.com/aptible/supercronic/releases +# RCON: Latest releases available at https://github.com/gorcon/rcon-cli/releases +# NOTICE: edit RCON_MD5SUM SUPERCRONIC_SHA1SUM when using binaries of another version or arch. +ARG SUPERCRONIC_SHA1SUM="512f6736450c56555e01b363144c3c9d23abed4c" +ARG RCON_VERSION="0.10.3" +ARG SUPERCRONIC_VERSION="0.2.29" + # build rcon-cli for arm64-linux FROM arm64v8/golang:1.19.3-bullseye as rcon-cli_builder +ARG RCON_VERSION + WORKDIR /build RUN apt-get update && \ @@ -18,6 +28,9 @@ RUN wget --progress=dot:giga https://github.com/gorcon/rcon-cli/archive/refs/tag # main image FROM sonroyaalmerol/steamcmd-arm64:latest +ARG SUPERCRONIC_SHA1SUM +ARG SUPERCRONIC_VERSION + USER root LABEL maintainer="thijs@loef.dev" \ @@ -36,14 +49,6 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* -# set envs -# SUPERCRONIC: Latest releases available at https://github.com/aptible/supercronic/releases -# RCON: Latest releases available at https://github.com/gorcon/rcon-cli/releases -# NOTICE: edit RCON_MD5SUM SUPERCRONIC_SHA1SUM when using binaries of another version or arch. -ENV SUPERCRONIC_SHA1SUM="512f6736450c56555e01b363144c3c9d23abed4c" \ - RCON_VERSION="0.10.3" \ - SUPERCRONIC_VERSION="0.2.29" - # install rcon and supercronic SHELL ["/bin/bash", "-o", "pipefail", "-c"] From 9fd2bbd0d98c28d0f52910a4def141f8465feea0 Mon Sep 17 00:00:00 2001 From: Son Date: Tue, 6 Feb 2024 20:15:08 -0500 Subject: [PATCH 07/15] Separate tag for arm64 --- .github/workflows/docker-hub.yml | 41 +++++++++++++++++++------ .github/workflows/release.yml | 52 +++++++++++++++++++++++++------- 2 files changed, 73 insertions(+), 20 deletions(-) diff --git a/.github/workflows/docker-hub.yml b/.github/workflows/docker-hub.yml index 94785bebe..24a9dbad9 100644 --- a/.github/workflows/docker-hub.yml +++ b/.github/workflows/docker-hub.yml @@ -5,13 +5,35 @@ on: # yamllint disable-line rule:truthy branches: [main] jobs: - push: + push-amd64: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Docker - Login + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + + - name: Docker - Metadata + id: meta + uses: docker/metadata-action@v5 + with: + images: ${{ github.repository }} + tags: type=raw,value=dev + flavor: latest=false + + - name: Docker - Build / Push + uses: docker/build-push-action@v5 + with: + file: Dockerfile + push: true + tags: ${{ steps.meta.outputs.tags }} + + push-arm64: runs-on: ubuntu-latest - strategy: - matrix: - architecture: - - amd64 - - arm64 steps: - name: Checkout uses: actions/checkout@v4 @@ -33,13 +55,14 @@ jobs: uses: docker/metadata-action@v5 with: images: ${{ github.repository }} - tags: type=raw,value=dev + tags: type=raw,value=dev-arm64 flavor: latest=false - name: Docker - Build / Push uses: docker/build-push-action@v5 with: - file: Dockerfile.${{ matrix.architecture }} - platforms: linux/${{ matrix.architecture }} + file: Dockerfile.arm64 + platforms: + - linux/arm64 push: true tags: ${{ steps.meta.outputs.tags }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 8a3882323..d270d34ef 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -6,14 +6,43 @@ on: # yamllint disable-line rule:truthy jobs: # Builds the Dockerfile and pushes it to dockerhub - release: + release-amd64: + name: Release - Docker image + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Docker - Login + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + + - name: Docker - Metadata + id: meta + uses: docker/metadata-action@v5 + with: + images: ${{ github.repository }} + # generate Docker tags based on the following events/attributes + tags: | + type=semver,pattern=v{{version}} + type=semver,pattern=v{{major}}.{{minor}} + type=semver,pattern=v{{major}} + flavor: latest=true + + - name: Docker - Build / Push + id: docker_build + uses: docker/build-push-action@v5 + with: + file: Dockerfile + push: true + tags: ${{ steps.meta.outputs.tags }} + + # Builds the Dockerfile.arm64 and pushes it to dockerhub + release-arm64: name: Release - Docker image runs-on: ubuntu-latest - strategy: - matrix: - architecture: - - amd64 - - arm64 steps: - name: Checkout uses: actions/checkout@v4 @@ -37,17 +66,18 @@ jobs: images: ${{ github.repository }} # generate Docker tags based on the following events/attributes tags: | - type=semver,pattern=v{{version}} - type=semver,pattern=v{{major}}.{{minor}} - type=semver,pattern=v{{major}} + type=semver,pattern=v{{version}}-arm64 + type=semver,pattern=v{{major}}.{{minor}}-arm64 + type=semver,pattern=v{{major}}-arm64 flavor: latest=true - name: Docker - Build / Push id: docker_build uses: docker/build-push-action@v5 with: - file: Dockerfile.${{ matrix.architecture }} - platforms: linux/${{ matrix.architecture }} + file: Dockerfile.arm64 + platforms: + - linux/arm64 push: true tags: ${{ steps.meta.outputs.tags }} From 029d90a1c37028305cb63304970e49cbbcb25c42 Mon Sep 17 00:00:00 2001 From: Son Date: Tue, 6 Feb 2024 20:16:56 -0500 Subject: [PATCH 08/15] Fix actions platforms syntax --- .github/workflows/docker-hub.yml | 4 ++-- .github/workflows/release.yml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/docker-hub.yml b/.github/workflows/docker-hub.yml index 24a9dbad9..3b64fe3e9 100644 --- a/.github/workflows/docker-hub.yml +++ b/.github/workflows/docker-hub.yml @@ -29,6 +29,7 @@ jobs: uses: docker/build-push-action@v5 with: file: Dockerfile + platforms: linux/amd64 push: true tags: ${{ steps.meta.outputs.tags }} @@ -62,7 +63,6 @@ jobs: uses: docker/build-push-action@v5 with: file: Dockerfile.arm64 - platforms: - - linux/arm64 + platforms: linux/arm64 push: true tags: ${{ steps.meta.outputs.tags }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d270d34ef..0c625d1c5 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -36,6 +36,7 @@ jobs: uses: docker/build-push-action@v5 with: file: Dockerfile + platforms: linux/amd64 push: true tags: ${{ steps.meta.outputs.tags }} @@ -76,8 +77,7 @@ jobs: uses: docker/build-push-action@v5 with: file: Dockerfile.arm64 - platforms: - - linux/arm64 + platforms: linux/arm64 push: true tags: ${{ steps.meta.outputs.tags }} From c6e801e623c3002e5c324953c1ba950cf2252343 Mon Sep 17 00:00:00 2001 From: Son Date: Tue, 6 Feb 2024 20:18:38 -0500 Subject: [PATCH 09/15] Fix amd64 build workflow --- .github/workflows/docker-hub.yml | 1 - .github/workflows/release.yml | 1 - 2 files changed, 2 deletions(-) diff --git a/.github/workflows/docker-hub.yml b/.github/workflows/docker-hub.yml index 3b64fe3e9..93d1e599c 100644 --- a/.github/workflows/docker-hub.yml +++ b/.github/workflows/docker-hub.yml @@ -28,7 +28,6 @@ jobs: - name: Docker - Build / Push uses: docker/build-push-action@v5 with: - file: Dockerfile platforms: linux/amd64 push: true tags: ${{ steps.meta.outputs.tags }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 0c625d1c5..b428a3d1c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -35,7 +35,6 @@ jobs: id: docker_build uses: docker/build-push-action@v5 with: - file: Dockerfile platforms: linux/amd64 push: true tags: ${{ steps.meta.outputs.tags }} From 518ed84c8569cc05a51f15a930d0bd54b7499e7a Mon Sep 17 00:00:00 2001 From: Son Date: Tue, 6 Feb 2024 20:19:32 -0500 Subject: [PATCH 10/15] Rename amd64 to default Dockerfile --- Dockerfile.amd64 => Dockerfile | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename Dockerfile.amd64 => Dockerfile (100%) diff --git a/Dockerfile.amd64 b/Dockerfile similarity index 100% rename from Dockerfile.amd64 rename to Dockerfile From c289faab445862ee0f82a45de2b6bee7ced6e9db Mon Sep 17 00:00:00 2001 From: Son Date: Tue, 6 Feb 2024 20:29:15 -0500 Subject: [PATCH 11/15] Add ARM64 comments --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index f8010bd99..122c04b3a 100644 --- a/README.md +++ b/README.md @@ -54,7 +54,7 @@ This repository includes an example [docker-compose.yml](/docker-compose.yml) fi ```yml services: palworld: - image: thijsvanloef/palworld-server-docker:latest + image: thijsvanloef/palworld-server-docker:latest # Use the latest-arm64 tag for arm64 hosts restart: unless-stopped container_name: palworld-server stop_grace_period: 30s # Set to however long you are willing to wait for the container to gracefully stop @@ -86,7 +86,7 @@ values. Modify your [docker-compose.yml](docker-compose.yml) to this: ```yml services: palworld: - image: thijsvanloef/palworld-server-docker:latest + image: thijsvanloef/palworld-server-docker:latest # Use the latest-arm64 tag for arm64 hosts restart: unless-stopped container_name: palworld-server stop_grace_period: 30s # Set to however long you are willing to wait for the container to gracefully stop @@ -124,7 +124,7 @@ docker run -d \ -e SERVER_DESCRIPTION=palworld-server-docker by Thijs van Loef \ --restart unless-stopped \ --stop-timeout 30 \ - thijsvanloef/palworld-server-docker:latest + thijsvanloef/palworld-server-docker:latest # Use the latest-arm64 tag for arm64 hosts ``` As an alternative, you can copy the [.env.example](.env.example) file to a new file called **.env** file. @@ -140,7 +140,7 @@ docker run -d \ --env-file .env \ --restart unless-stopped \ --stop-timeout 30 \ - thijsvanloef/palworld-server-docker:latest + thijsvanloef/palworld-server-docker:latest # Use the latest-arm64 tag for arm64 hosts ``` ### Kubernetes From e7ec4f797556be7d0843698f64fab0efe4981d2e Mon Sep 17 00:00:00 2001 From: Thijs van Loef Date: Wed, 7 Feb 2024 09:43:25 +0100 Subject: [PATCH 12/15] do not push `latest` for arm instead `latest-arm64` --- .github/workflows/release.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b428a3d1c..bd41022f3 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -69,7 +69,8 @@ jobs: type=semver,pattern=v{{version}}-arm64 type=semver,pattern=v{{major}}.{{minor}}-arm64 type=semver,pattern=v{{major}}-arm64 - flavor: latest=true + type=raw,value=latest-arm64 + flavor: latest=false - name: Docker - Build / Push id: docker_build From c1f3a64129921cac982a7c933740b4e833341077 Mon Sep 17 00:00:00 2001 From: Thijs van Loef Date: Wed, 7 Feb 2024 09:43:39 +0100 Subject: [PATCH 13/15] first config generate also use pal-arm64 script --- scripts/start.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/start.sh b/scripts/start.sh index a7921ebe9..4f88b92d0 100644 --- a/scripts/start.sh +++ b/scripts/start.sh @@ -114,7 +114,11 @@ if [ ! "$(grep -s '[^[:space:]]' /palworld/Pal/Saved/Config/LinuxServer/PalWorld printf "\e[0;32m%s\e[0m\n" "*****GENERATING CONFIG*****" # Server will generate all ini files after first run. - timeout --preserve-status 15s ./PalServer.sh 1> /dev/null + if [ "$architecture" == "arm64" ]; then + timeout --preserve-status 15s ./PalServer-arm64.sh 1> /dev/null + else + timeout --preserve-status 15s ./PalServer.sh 1> /dev/null + fi # Wait for shutdown sleep 5 From c6577ca057cd4eb13432970c4cf0313fef9d0dfd Mon Sep 17 00:00:00 2001 From: Thijs van Loef Date: Wed, 7 Feb 2024 10:01:37 +0100 Subject: [PATCH 14/15] disable shellcheck --- scripts/start.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/start.sh b/scripts/start.sh index 4f88b92d0..efd2c83b3 100644 --- a/scripts/start.sh +++ b/scripts/start.sh @@ -76,6 +76,7 @@ architecture=$(dpkg --print-architecture) if [ "$architecture" == "arm64" ]; then # create an arm64 version of ./PalServer.sh cp ./PalServer.sh ./PalServer-arm64.sh + # shellcheck disable=SC2016 sed -i 's|\("$UE_PROJECT_ROOT\/Pal\/Binaries\/Linux\/PalServer-Linux-Test" Pal "$@"\)|LD_LIBRARY_PATH=/home/steam/steamcmd/linux64:$LD_LIBRARY_PATH box64 \1|' ./PalServer-arm64.sh chmod +x ./PalServer-arm64.sh STARTCOMMAND=("./PalServer-arm64.sh") From c2b8e1d9a2ae8faf486292afbb9cbbb6c4606865 Mon Sep 17 00:00:00 2001 From: Thijs van Loef Date: Wed, 7 Feb 2024 10:02:21 +0100 Subject: [PATCH 15/15] remove trailing spaces --- .github/workflows/docker-hub.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker-hub.yml b/.github/workflows/docker-hub.yml index 93d1e599c..9e9a7c957 100644 --- a/.github/workflows/docker-hub.yml +++ b/.github/workflows/docker-hub.yml @@ -31,7 +31,7 @@ jobs: platforms: linux/amd64 push: true tags: ${{ steps.meta.outputs.tags }} - + push-arm64: runs-on: ubuntu-latest steps: