agecem-org/Dockerfile
Victor Lacasse-Beaudoin 4f5b451042 Ajouter media/ pour abstraire le client minio
Ajouter media/ à Dockerfile

Migrer serverCmd#HandleV1Seed à utiliser media#NewMediaClientFromViper()
2023-07-04 16:47:03 -04:00

31 lines
479 B
Docker

FROM golang:1.20.2 as build
LABEL author="Victor Lacasse-Beaudoin <vlbeaudoin@agecem.org>"
WORKDIR /go/src/app
COPY go.mod go.sum main.go ./
ADD public/ public/
ADD cmd/ cmd/
ADD api/ api/
ADD config/ config/
ADD media/ media/
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"]