agecem-org/Dockerfile

25 lines
590 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 main.go client.go cmd.go config.go entity.go handler.go media.go request.go response.go routes.go ./
ADD public/ public/
ADD templates/ templates/
ADD version/ version/
RUN CGO_ENABLED=0 go build -a -o agecem-org -ldflags="-X 'git.agecem.com/agecem/agecem-org/version.version=$agecem_org_version'" .
# Alpine
FROM alpine:3.20.1 AS run
COPY --from=build /go/src/app/agecem-org /usr/bin/agecem-org
CMD ["agecem-org", "server"]