mirror of
https://codeberg.org/git-pages/git-pages.git
synced 2026-08-17 09:26:04 +00:00
Add a Dockerfile
This commit is contained in:
committed by
Catherine
parent
9c0cdaa2eb
commit
bffa79dfba
+18
@@ -0,0 +1,18 @@
|
||||
FROM golang:1.24-alpine AS builder
|
||||
RUN apk add --no-cache git
|
||||
WORKDIR /app
|
||||
COPY go.mod go.sum ./
|
||||
RUN go mod download
|
||||
COPY src/ ./src/
|
||||
RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o git-pages ./src
|
||||
FROM alpine:latest
|
||||
RUN apk --no-cache add ca-certificates git
|
||||
RUN addgroup -g 1000 -S appuser && \
|
||||
adduser -u 1000 -S appuser -G appuser
|
||||
|
||||
WORKDIR /app
|
||||
COPY --from=builder /app/git-pages .
|
||||
|
||||
USER appuser
|
||||
EXPOSE 3333
|
||||
CMD ["./git-pages"]
|
||||
Reference in New Issue
Block a user