agecem-org/Dockerfile
Victor Lacasse-Beaudoin 7d4a747774 refactor: déplacer fichiers go source vers pkg/ et cmd/
Déplacer public/ et templates/ vers ui/ et ui/public/

Bump projet à v3, API toujours v1
2024-09-27 20:25:12 -04:00

24 lines
510 B
Docker

FROM golang:1.23.0 AS build
ARG agecem_org_version
LABEL author="Victor Lacasse-Beaudoin <vlbeaudoin@agecem.org>"
WORKDIR /go/src/app
COPY go.mod go.sum LICENSE ./
ADD cmd/ cmd/
ADD pkg/ pkg/
ADD ui/ ui/
RUN CGO_ENABLED=0 go build -a -o agecem-org \
-ldflags="-X 'git.agecem.com/agecem/agecem-org/pkg/agecemorg/version.version=$agecem_org_version'" \
./cmd/agecemorg/
# Alpine
FROM alpine:3.20.2 AS run
COPY --from=build /go/src/app/agecem-org /usr/bin/agecem-org
CMD ["agecem-org", "server"]