agecem-org/Dockerfile
Victor Lacasse-Beaudoin 378db992b5 Ajouter cobra/viper pour gérer le cli
Déplacer logique de server.go vers serverCmd

Ajouter .cobra.yaml pour prochaines commandes

Modifier Dockerfile pour appeler serverCmd

Retirer certains commentaires dans serverCmd
2023-03-28 02:35:42 -04:00

25 lines
387 B
Docker

FROM golang:1.20.2 as build
LABEL author="vlbeaudoin"
WORKDIR /go/src/app
COPY go.mod go.sum main.go ./
ADD public/ public/
ADD cmd/ cmd/
RUN CGO_ENABLED=0 go build -a -installsuffix cgo -o agecem-org .
# Alpine
FROM alpine:3.17.2
RUN apk update && apk upgrade --no-cache
WORKDIR /app
COPY --from=build /go/src/app/agecem-org /usr/bin/agecem-org
CMD ["agecem-org", "server"]