2024-08-21 12:23:57 -04:00
|
|
|
FROM golang:1.23.0 AS build
|
2023-11-13 16:49:20 -05:00
|
|
|
|
|
|
|
ARG agecem_org_version
|
2023-02-17 17:28:47 -05:00
|
|
|
|
2023-03-28 02:42:44 -04:00
|
|
|
LABEL author="Victor Lacasse-Beaudoin <vlbeaudoin@agecem.org>"
|
2023-02-17 17:28:47 -05:00
|
|
|
|
|
|
|
WORKDIR /go/src/app
|
|
|
|
|
2024-09-27 20:25:12 -04:00
|
|
|
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/
|
2023-02-17 17:28:47 -05:00
|
|
|
|
|
|
|
# Alpine
|
|
|
|
|
2024-09-03 08:54:02 -04:00
|
|
|
FROM alpine:3.20.2 AS run
|
2023-02-17 17:28:47 -05:00
|
|
|
|
2023-03-22 16:16:02 -04:00
|
|
|
COPY --from=build /go/src/app/agecem-org /usr/bin/agecem-org
|
2023-02-17 17:28:47 -05:00
|
|
|
|
2023-03-28 02:35:42 -04:00
|
|
|
CMD ["agecem-org", "server"]
|