0
0
mirror of https://github.com/go-gitea/gitea.git synced 2026-01-12 04:55:21 +01:00

remove checkout from container

This commit is contained in:
TheFox0x7 2025-10-29 19:06:48 +01:00
parent 0551e5b01e
commit 449d2b4c7e
No known key found for this signature in database
GPG Key ID: 6CA33903484AF7C2
2 changed files with 4 additions and 7 deletions

View File

@ -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

View File

@ -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