wiki/docker/Dockerfile
Ada b8bf9de3ec
All checks were successful
ci/woodpecker/push/build Pipeline was successful
Docker support & image
2024-02-17 22:02:11 +01:00

21 lines
No EOL
476 B
Docker

FROM golang:1.22 as build
WORKDIR /build
COPY . .
RUN wget https://github.com/rust-lang/mdBook/releases/download/v0.4.37/mdbook-v0.4.37-x86_64-unknown-linux-gnu.tar.gz
RUN tar xvf mdbook-v0.4.37-x86_64-unknown-linux-gnu.tar.gz
RUN ./mdbook build
RUN CGO_ENABLED=0 go build -ldflags "-w -s" docker/serve.go
FROM gcr.io/distroless/static-debian12:nonroot
WORKDIR /app
COPY --from=build /build/serve .
COPY --from=build /build/book/ static/
EXPOSE 3000
CMD ["/app/serve"]