From a333c0390893eb326580f4cb7a109dedeb3d364f Mon Sep 17 00:00:00 2001 From: ver4a Date: Mon, 21 Apr 2025 19:32:07 +0200 Subject: [PATCH] Make Dockerfile friendlier to layer caching --- Dockerfile | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/Dockerfile b/Dockerfile index e7ba4c5..8a0aee6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,19 +1,11 @@ FROM quay.io/fedora/fedora-minimal:42 -ARG RUNNER_VERSION=6.3.1 -ARG GITHUB_RUN_ID - ENV BUILDAH_ISOLATION=chroot ENV HOME=/builder ENV REGISTRY_AUTH_FILE=/builder/.config/containers/auth.json -RUN echo ${GITHUB_RUN_ID} > /.github_run_id - RUN dnf5 -y --setopt install_weak_deps=false install podman buildah skopeo vim setpriv git nodejs22 diffutils gawk -RUN curl -sfL https://code.forgejo.org/forgejo/runner/releases/download/v${RUNNER_VERSION}/forgejo-runner-${RUNNER_VERSION}-linux-amd64 -o /usr/local/bin/forgejo-runner -RUN chmod +x /usr/local/bin/forgejo-runner - RUN echo "nobody:65536:65536" > /etc/subuid && echo "nobody:65536:65536" > /etc/subgid # This is a workaround for https://github.com/containers/podman/issues/23818, apart from that it serves absolutely no purpose. I also don't know why it looks there, given HOME is elsewhere, but it doesn't seem to cause any issues. @@ -36,6 +28,15 @@ COPY entrypoint.sh /entrypoint.sh RUN chmod +x /entrypoint.sh +ARG RUNNER_VERSION=6.3.1 + +RUN curl -sfL https://code.forgejo.org/forgejo/runner/releases/download/v${RUNNER_VERSION}/forgejo-runner-${RUNNER_VERSION}-linux-amd64 -o /usr/local/bin/forgejo-runner +RUN chmod +x /usr/local/bin/forgejo-runner + +ARG GITHUB_RUN_ID + +RUN echo ${GITHUB_RUN_ID} > /.github_run_id + USER 65534:65534 WORKDIR /builder