~gitpocket/gitpocket

3
381360f5ede020e5ff71e7fe9111c4a1b0d3cdd6
mainfeed-discovery
gitpocket/Dockerfile -rw-r--r--465 bytes ViewLogBlameView rawPermalink 2c3fc6b065 build(docker): add a hardened container image 12 days ago
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
FROM golang:1.27-alpine AS build
WORKDIR /src
COPY go.mod go.sum ./
RUN go mod download
COPY . .
RUN CGO_ENABLED=0 go build -trimpath -ldflags='-s -w' -o /gitpocket .

FROM alpine:3.22
RUN apk add --no-cache git gnupg openssh-keygen ca-certificates
COPY --from=build /gitpocket /usr/local/bin/gitpocket
ENV HOME=/tmp GOMEMLIMIT=192MiB
USER 65532:65532
EXPOSE 3200
ENTRYPOINT ["/usr/local/bin/gitpocket", "-root", "/srv/gitpocket"]
CMD ["serve", "-listen", ":3200"]