Victor Lacasse-Beaudoin
7aca281a3c
Valeurs par défaut devraient fonctionner pour évaluer l'application hors-production
35 lines
513 B
Docker
35 lines
513 B
Docker
FROM golang:1.20.2 as build
|
|
|
|
LABEL author="vlbeaudoin"
|
|
|
|
WORKDIR /go/src/app
|
|
|
|
COPY go.mod go.sum main.go ./
|
|
|
|
ADD cmd/ cmd/
|
|
ADD data/ data/
|
|
ADD handlers/ handlers/
|
|
ADD models/ models/
|
|
ADD web/ web/
|
|
|
|
RUN CGO_ENABLED=0 go build -a -installsuffix cgo -o bottin .
|
|
|
|
# Alpine
|
|
|
|
FROM alpine:latest
|
|
|
|
WORKDIR /app
|
|
|
|
COPY --from=build /go/src/app/bottin /usr/bin/bottin
|
|
|
|
CMD ["bottin", "--help"]
|
|
|
|
# Debian
|
|
|
|
#FROM debian:stable-20230502
|
|
|
|
#WORKDIR /app
|
|
|
|
#COPY --from=build /go/src/app/haul /usr/bin/haul
|
|
|
|
#CMD ["haul", "--help"]
|