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;"'