agecem-org/Dockerfile
Victor Lacasse-Beaudoin 0f60e58ec2 Ajouter models/ pour type Bucket
models.Bucket est utilisé dans cmd/server pour contenir les données
relatives à la documentation dans certaines routes html
2023-08-19 14:56:13 -04:00

35 lines
522 B
Docker

FROM golang:1.21.0 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/
ADD models/ models/
ADD templates/ templates/
ADD serverhandlers/ serverhandlers/
RUN CGO_ENABLED=0 go build -a -installsuffix cgo -o agecem-org .
# Alpine
FROM alpine:3.18.3
WORKDIR /app
COPY --from=build /go/src/app/agecem-org /usr/bin/agecem-org
CMD ["agecem-org", "server"]