-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
32 lines (22 loc) · 953 Bytes
/
Copy pathDockerfile
File metadata and controls
32 lines (22 loc) · 953 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
FROM --platform=${BUILDPLATFORM} golang:1.27.0-alpine@sha256:4c9fe60190a2a3350ddc51de80d0224b8a6698d12bdfc999fee45ea9d6c46dbc AS builder
ARG TARGETARCH
ENV CGO_ENABLED=0 \
GOARCH=${TARGETARCH} \
GOFLAGS="-ldflags=-s" \
GOCACHE="/cache/build" \
GOMODCACHE="/cache/mod"
WORKDIR /app
COPY go.mod go.sum ./
RUN --mount=type=cache,target=${GOMODCACHE} \
go mod download
COPY --parents cmd ./
RUN --mount=type=cache,target=${GOCACHE} \
--mount=type=cache,target=${GOMODCACHE} \
go build -o /bin/gitea-pages ./cmd/gitea-pages
FROM gcr.io/distroless/static@sha256:f2ea2709ac8db56323cbd7d014277f32cb572d9ea124b0076f7aafe5980678fe AS runtime
COPY --from=ghcr.io/tarampampam/microcheck:1.4.0@sha256:c9f79cd408626de7c10f2d487d67339f49adf0ba61dde96ede65343269db1f85 /bin/httpcheck /bin/httpcheck
COPY --from=builder /bin/gitea-pages /bin/gitea-pages
USER 65532:65532
HEALTHCHECK NONE
EXPOSE 8000
ENTRYPOINT ["/bin/gitea-pages"]