mirror of
https://github.com/go-gitea/gitea.git
synced 2026-05-07 03:53:54 +02:00
remove checkout from container
This commit is contained in:
parent
0551e5b01e
commit
449d2b4c7e
@ -19,13 +19,12 @@ RUN apk --no-cache add \
|
|||||||
WORKDIR ${GOPATH}/src/code.gitea.io/gitea
|
WORKDIR ${GOPATH}/src/code.gitea.io/gitea
|
||||||
COPY --exclude=.git/ . .
|
COPY --exclude=.git/ . .
|
||||||
|
|
||||||
# Checkout version if set
|
# Build gitea, .git mount is required for version data
|
||||||
RUN --mount=type=cache,target=/go/pkg/mod \
|
RUN --mount=type=cache,target=/go/pkg/mod \
|
||||||
--mount=type=cache,target="/root/.cache/go-build" \
|
--mount=type=cache,target="/root/.cache/go-build" \
|
||||||
--mount=type=cache,target=/root/.local/share/pnpm/store \
|
--mount=type=cache,target=/root/.local/share/pnpm/store \
|
||||||
--mount=type=bind,source=".git/",target=".git/" \
|
--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
|
FROM docker.io/library/alpine:3.22 AS gitea
|
||||||
|
|
||||||
|
|||||||
@ -19,14 +19,12 @@ RUN apk --no-cache add \
|
|||||||
WORKDIR ${GOPATH}/src/code.gitea.io/gitea
|
WORKDIR ${GOPATH}/src/code.gitea.io/gitea
|
||||||
COPY --exclude=.git/ . .
|
COPY --exclude=.git/ . .
|
||||||
|
|
||||||
# Checkout version if set
|
# Build gitea, .git mount is required for version data
|
||||||
RUN --mount=type=cache,target=/go/pkg/mod \
|
RUN --mount=type=cache,target=/go/pkg/mod \
|
||||||
--mount=type=cache,target="/root/.cache/go-build" \
|
--mount=type=cache,target="/root/.cache/go-build" \
|
||||||
--mount=type=cache,target=/root/.local/share/pnpm/store \
|
--mount=type=cache,target=/root/.local/share/pnpm/store \
|
||||||
--mount=type=bind,source=".git/",target=".git/" \
|
--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
|
FROM docker.io/library/alpine:3.22 AS gitea-rootless
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user