2023-11-29 17:15:27 -05:00
|
|
|
FROM golang:1.21.4 as build
|
2023-02-17 15:43:23 -05:00
|
|
|
|
|
|
|
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
|
|
|
|
|
2023-05-05 17:40:15 -04:00
|
|
|
COPY go.mod go.sum main.go ./
|
2023-02-17 15:43:23 -05:00
|
|
|
|
2023-05-05 17:40:15 -04:00
|
|
|
ADD cmd/ cmd/
|
2023-02-17 15:43:23 -05:00
|
|
|
|
2023-12-04 19:19:19 -05:00
|
|
|
ADD config/ config/
|
|
|
|
|
2023-05-05 19:09:23 -04:00
|
|
|
ADD data/ data/
|
|
|
|
|
|
|
|
ADD handlers/ handlers/
|
|
|
|
|
2023-11-29 17:15:27 -05:00
|
|
|
ADD public/ public/
|
|
|
|
|
|
|
|
RUN CGO_ENABLED=0 go build -a -o babillard .
|
2023-05-05 17:40:15 -04:00
|
|
|
|
|
|
|
# Alpine
|
|
|
|
|
2023-11-29 17:15:27 -05:00
|
|
|
FROM alpine:3.18.4
|
2023-05-05 17:40:15 -04:00
|
|
|
|
|
|
|
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"]
|