git-pages/nonstandalone.Dockerfile
Michael Hanke 7f383322e0
feat: Dockerfile for a minimalist non-standalone container
In contrast to the orginal Dockerfile, this setup targets a deployment
as a components on a server with an existing caddy deployment that also
serves other use cases than git-pages.
2026-10-07 13:05:06 +02:00

21 lines
644 B
Docker

# Build git-pages.
FROM docker.io/library/golang:1.26-alpine@sha256:0178a641fbb4858c5f1b48e34bdaabe0350a330a1b1149aabd498d0699ff5fb2 AS git-pages-builder
RUN apk --no-cache add git
WORKDIR /build
COPY go.mod go.sum ./
RUN go mod download
COPY *.go ./
COPY src/ ./src/
RUN go build -ldflags "-s -w" -o git-pages .
FROM docker.io/library/busybox:1.38.0-musl@sha256:8635836765b0c4c43970660219739baa58b0883c2e429e4b8918f7dd1519455c
COPY --from=git-pages-builder /build/git-pages /bin/git-pages
WORKDIR /app
RUN mkdir /app/data
COPY conf/config.docker.toml /app/config.toml
# git-pages ports:
EXPOSE 3000/tcp 3001/tcp 3002/tcp
CMD ["git-pages"]