From 449d2b4c7e7197d1ecafc928c2fcf494fa2a71c8 Mon Sep 17 00:00:00 2001 From: TheFox0x7 Date: Wed, 29 Oct 2025 19:06:48 +0100 Subject: [PATCH] remove checkout from container --- Dockerfile | 5 ++--- Dockerfile.rootless | 6 ++---- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/Dockerfile b/Dockerfile index d093aed46f..31959d42c2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -19,13 +19,12 @@ RUN apk --no-cache add \ WORKDIR ${GOPATH}/src/code.gitea.io/gitea COPY --exclude=.git/ . . -# Checkout version if set +# Build gitea, .git mount is required for version data RUN --mount=type=cache,target=/go/pkg/mod \ --mount=type=cache,target="/root/.cache/go-build" \ --mount=type=cache,target=/root/.local/share/pnpm/store \ --mount=type=bind,source=".git/",target=".git/" \ - if [ -n "${GITEA_VERSION}" ]; then git checkout "${GITEA_VERSION}"; fi \ - && make + make FROM docker.io/library/alpine:3.22 AS gitea diff --git a/Dockerfile.rootless b/Dockerfile.rootless index 4b806c776c..ec9a91d611 100644 --- a/Dockerfile.rootless +++ b/Dockerfile.rootless @@ -19,14 +19,12 @@ RUN apk --no-cache add \ WORKDIR ${GOPATH}/src/code.gitea.io/gitea COPY --exclude=.git/ . . -# Checkout version if set +# Build gitea, .git mount is required for version data RUN --mount=type=cache,target=/go/pkg/mod \ --mount=type=cache,target="/root/.cache/go-build" \ --mount=type=cache,target=/root/.local/share/pnpm/store \ --mount=type=bind,source=".git/",target=".git/" \ - if [ -n "${GITEA_VERSION}" ]; then git checkout "${GITEA_VERSION}"; fi \ - && make - + make FROM docker.io/library/alpine:3.22 AS gitea-rootless