From d39f2baed34b8ba583c4e9eec6809f74c08f971a Mon Sep 17 00:00:00 2001 From: Jan Shafiq Date: Wed, 30 Apr 2025 09:39:50 +0200 Subject: [PATCH 1/3] feat: add rootless Docker image --- .github/workflows/build.yml | 12 ++++++++++++ Dockerfile-rootless | 11 +++++++++++ 2 files changed, 23 insertions(+) create mode 100644 Dockerfile-rootless diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e4dd336..ef9720e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -506,6 +506,18 @@ jobs: username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} + - name: Deploy rootless-image to ghcr.io + uses: mr-smithers-excellent/docker-build-push@v6 + with: + dockerfile: Dockerfile-rootless + image: fladder + addLatest: true + multiPlatform: true + platform: linux/amd64,linux/arm64,linux/arm/v7 + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + - name: Clean builds folder run: rm -rf build/web diff --git a/Dockerfile-rootless b/Dockerfile-rootless new file mode 100644 index 0000000..ea03a3f --- /dev/null +++ b/Dockerfile-rootless @@ -0,0 +1,11 @@ +FROM ghcr.io/nginxinc/nginx-unprivileged:stable-alpine-slim + +EXPOSE 8080 + +ENV BASE_URL="" + +COPY build/web /usr/share/nginx/html + +RUN echo '{"baseUrl": "${BASE_URL}"}' > /usr/share/nginx/html/assets/config/config.json + +CMD /bin/sh -c 'sed -i s/80/8080/g /etc/nginx/conf.d/default.conf && sed -i "s|\${BASE_URL}|${BASE_URL}|g" /usr/share/nginx/html/assets/config/config.json && nginx -g "daemon off;"' From fdad7f5be640d332f58d7919e523d7bb982003dd Mon Sep 17 00:00:00 2001 From: Jan Shafiq Date: Wed, 30 Apr 2025 09:51:33 +0200 Subject: [PATCH 2/3] fix: rename image-name --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ef9720e..fb9ffd4 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -510,7 +510,7 @@ jobs: uses: mr-smithers-excellent/docker-build-push@v6 with: dockerfile: Dockerfile-rootless - image: fladder + image: fladder-rootless addLatest: true multiPlatform: true platform: linux/amd64,linux/arm64,linux/arm/v7 From 05b3458be8f548c986c6c32587996a92f8fd2810 Mon Sep 17 00:00:00 2001 From: Jan <46779261+98jan@users.noreply.github.com> Date: Sun, 22 Jun 2025 18:52:54 +0200 Subject: [PATCH 3/3] fix: remove not needed port patching --- Dockerfile-rootless | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile-rootless b/Dockerfile-rootless index ea03a3f..5e1d008 100644 --- a/Dockerfile-rootless +++ b/Dockerfile-rootless @@ -8,4 +8,4 @@ COPY build/web /usr/share/nginx/html RUN echo '{"baseUrl": "${BASE_URL}"}' > /usr/share/nginx/html/assets/config/config.json -CMD /bin/sh -c 'sed -i s/80/8080/g /etc/nginx/conf.d/default.conf && sed -i "s|\${BASE_URL}|${BASE_URL}|g" /usr/share/nginx/html/assets/config/config.json && nginx -g "daemon off;"' +CMD /bin/sh -c 'sed -i "s|\${BASE_URL}|${BASE_URL}|g" /usr/share/nginx/html/assets/config/config.json && nginx -g "daemon off;"'