~gitpocket/gitpocket

4
732f1f43e158c98a67afd8dc9ed1da340b028890
mainfeed-discovery
gitpocket/Dockerfile -rw-r--r--658 bytes ViewLogBlameView rawPermalink f44e2cbd66 fix(web): fit every page to phone widths 4 hours ago
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
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
ARG UID=65532 GID=65532
RUN apk add --no-cache git gnupg openssh-keygen ca-certificates && \
    (getent group "$GID" || addgroup -g "$GID" git) && \
    adduser -D -H -h /srv/gitpocket -s /sbin/nologin -u "$UID" -G "$(getent group "$GID" | cut -d: -f1)" git
COPY --from=build /gitpocket /usr/local/bin/gitpocket
ENV HOME=/tmp GOMEMLIMIT=192MiB
USER $UID:$GID
EXPOSE 3200
ENTRYPOINT ["/usr/local/bin/gitpocket", "-root", "/srv/gitpocket"]
CMD ["serve", "-listen", ":3200"]