diff --git a/.github/workflows/dockerPublish.yml b/.github/workflows/dockerPublish.yml index 802ee56df4..ccb17ea7a5 100644 --- a/.github/workflows/dockerPublish.yml +++ b/.github/workflows/dockerPublish.yml @@ -36,20 +36,17 @@ jobs: # https://github.com/sigstore/cosign-installer - name: Install cosign if: github.event_name != 'pull_request' - uses: sigstore/cosign-installer@dd6b2e2b610a11fd73dd187a43d57cc1394e35f9 #v3.0.5 - with: - cosign-release: 'v2.0.2' + uses: sigstore/cosign-installer@v3.4.0 - # Workaround: https://github.com/docker/build-push-action/issues/461 - - name: Setup Docker buildx - uses: docker/setup-buildx-action@79abd3f86f79a9d68a23c75a09a9a85889262adf + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 # Login against a Docker registry except on PR # https://github.com/docker/login-action - name: Log into registry ${{ env.REGISTRY }} if: github.event_name != 'pull_request' - uses: docker/login-action@28218f9b04b4f3f62068d7b6ce6ca5b26e35336c + uses: docker/login-action@v3 with: registry: ${{ env.REGISTRY }} username: ${{ github.actor }} @@ -59,7 +56,7 @@ jobs: # https://github.com/docker/metadata-action - name: Extract Docker metadata id: meta - uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38 + uses: docker/metadata-action@v5 with: images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} @@ -67,7 +64,7 @@ jobs: # https://github.com/docker/build-push-action - name: Build and push Docker image id: build-and-push - uses: docker/build-push-action@ac9327eae2b366085ac7f6a2d02df8aa8ead720a + uses: docker/build-push-action@v5 with: context: . push: ${{ github.event_name != 'pull_request' }} diff --git a/Dockerfile b/Dockerfile index 15caf8fe81..48452efd89 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,8 @@ ARG ARG_COMPILE_BASE_IMAGE=accetto/ubuntu-vnc-xfce-opengl-g3 + FROM $ARG_COMPILE_BASE_IMAGE as build -USER root + +USER root RUN apt update && \ apt upgrade -y && \ apt install --fix-broken -y wget curl openjdk-17-jdk openjdk-11-jdk unzip @@ -26,11 +28,11 @@ RUN chmod +x ./gradlew && ./gradlew --version # Build unciv COPY . /src/ -RUN chmod +x ./gradlew && ./gradlew desktop:classes -RUN ./gradlew desktop:dist -RUN ./gradlew desktop:zipLinuxFilesForJar -RUN ./gradlew desktop:packrLinux64 --stacktrace --info --daemon --scan -RUN cd /src/deploy && unzip Unciv-Linux64.zip +RUN chmod +x ./gradlew && ./gradlew desktop:classes && \ + ./gradlew desktop:dist && \ + ./gradlew desktop:zipLinuxFilesForJar && \ + ./gradlew desktop:packrLinux64 --stacktrace --info --daemon --scan && \ + cd /src/deploy && unzip Unciv-Linux64.zip FROM accetto/ubuntu-vnc-xfce-opengl-g3 as run WORKDIR /home/headless/Desktop/ diff --git a/README.md b/README.md index 3f7e1053cc..a1929aff13 100644 --- a/README.md +++ b/README.md @@ -111,7 +111,7 @@ From what I understand, intellectual property rights apply to names, characters If anyone has any real legal sources, or can shed some light on the limits of what is and is not allowed, I'd be happy to hear! -## Run with Docker [![Docker](https://github.com/haimlm/Unciv/actions/workflows/dockerPublish.yml/badge.svg)](https://github.com/haimlm/Unciv/actions/workflows/dockerPublish.yml) +## Run with Docker [![Docker](https://github.com/yairm210/Unciv/actions/workflows/dockerPublish.yml/badge.svg)](https://github.com/yairm210/Unciv/actions/workflows/dockerPublish.yml) If you have docker compose installed: