Migration This is my new public git source viewer. Source coming soon. Please contact with concerns/bugs. Contact me

Dockerfile

38fa4e6cd9bb9dbf0ae23ef02e50b1c75cd84ebb · 411 B · 16 lines raw

1 FROM --platform=$BUILDPLATFORM golang:1.23-alpine AS build
2 WORKDIR /src
3 COPY go.mod go.sum ./
4 RUN go mod download
5 COPY . .
6 ARG TARGETOS=linux
7 ARG TARGETARCH=amd64
8 RUN CGO_ENABLED=0 GOOS=$TARGETOS GOARCH=$TARGETARCH go build -o /out/gsg .
9
10 FROM alpine:3.20
11 RUN apk add --no-cache git gnupg
12 COPY --from=build /out/gsg /usr/local/bin/gsg
13
14 EXPOSE 8080
15 ENTRYPOINT ["gsg"]
16 CMD ["-root", "/srv/git", "-addr", ":8080"]