Files
abitbol/Dockerfile
Sli bb3e174fb8
Some checks failed
ci / deploy (push) Has been cancelled
ci-build / build (1.24) (push) Has been cancelled
Ajoute /cite, met à jour la CI et répare les liens de vidéo
2026-04-16 14:31:07 +02:00

22 lines
466 B
Docker

FROM golang:1.24 AS builder
RUN mkdir /build
WORKDIR /build
# Copy the code from the host and compile it
COPY . .
RUN mkdir res
COPY quotes.json res/quotes.json
RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix nocgo -o /app .
FROM scratch
# We need ca-certifactes for http calls
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
COPY --from=builder /app ./
COPY --from=builder /build/res ./
ENTRYPOINT ["./app"]