repos / pgit

static site generator for git
git clone https://github.com/picosh/pgit.git

Eric Bower · 10 Aug 23

Dockerfile

 1FROM golang:1.20 AS builder
 2
 3WORKDIR /app
 4
 5COPY go.mod go.sum ./
 6RUN go mod download && go mod verify
 7
 8COPY . /app
 9
10RUN go build -v -o pgit main.go
11
12FROM debian:12
13WORKDIR /app
14
15RUN apt-get update && apt-get install -y git
16# ignore git warning "detected dubious ownership in repository"
17RUN git config --global safe.directory '*'
18
19COPY --from=builder /app/pgit /usr/bin
20
21CMD ["pgit"]