Proposition de Dockerfile a l'ancienne pour Guichet #67

Open
adrien wants to merge 1 commit from docker-build into main
Showing only changes of commit 7d8a41ec93 - Show all commits

View file

@ -1,12 +1,16 @@
FROM alpine:latest as certs FROM golang:alpine3.20 as builder
RUN apk --update add ca-certificates RUN apk --update add ca-certificates
COPY . .
RUN go get -d -v \
&& CGO_ENABLED=0 GOOS=linux go build -a -v -o /guichet
FROM scratch FROM scratch
COPY --from=certs /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
COPY --from=builder /guichet /guichet
ADD static /static ADD static /static
ADD guichet.static /guichet
ADD templates /templates ADD templates /templates
ENTRYPOINT ["/guichet"] ENTRYPOINT ["/guichet"]