Victor Lacasse-Beaudoin
4e054f988b
Ajouter `config/` à `build` step Réorganiser ordre de flags et commande dans `services.server.command`
36 lines
584 B
Docker
36 lines
584 B
Docker
FROM golang:1.21.4 as build
|
|
|
|
LABEL author="Victor Lacasse-Beaudoin <vlbeaudoin@agecem.org>"
|
|
LABEL license="MIT"
|
|
LABEL licensee="AGECEM"
|
|
LABEL repo="https://git.agecem.com/agecem/babillard"
|
|
|
|
WORKDIR /go/src/app
|
|
|
|
COPY go.mod go.sum main.go ./
|
|
|
|
ADD cmd/ cmd/
|
|
|
|
ADD config/ config/
|
|
|
|
ADD data/ data/
|
|
|
|
ADD handlers/ handlers/
|
|
|
|
ADD public/ public/
|
|
|
|
RUN CGO_ENABLED=0 go build -a -o babillard .
|
|
|
|
# Alpine
|
|
|
|
FROM alpine:3.18.4
|
|
|
|
RUN apk update && apk upgrade --no-cache
|
|
|
|
WORKDIR /app
|
|
|
|
ADD contenu/ contenu/
|
|
|
|
COPY --from=build /go/src/app/babillard /usr/bin/babillard
|
|
|
|
CMD ["babillard", "server"]
|