agecem-org/Dockerfile

44 lines
715 B
Text
Raw Normal View History

FROM golang:1.21.4 AS build
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
COPY go.mod go.sum main.go ./
2023-02-17 17:28:47 -05:00
ADD public/ public/
ADD cmd/ cmd/
ADD api/ api/
ADD apihandler/ apihandler/
ADD apiresponse/ apiresponse/
2023-07-04 16:22:00 -04:00
ADD config/ config/
ADD media/ media/
ADD models/ models/
ADD templates/ templates/
ADD version/ version/
ADD web_handlers/ web_handlers/
Add webresponse/ webresponse/
RUN CGO_ENABLED=0 go build -a -o agecem-org -ldflags="-X 'git.agecem.com/agecem/agecem-org/version.version=$agecem_org_version'" .
2023-02-17 17:28:47 -05:00
# Alpine
FROM alpine:3.18.4 AS run
2023-02-17 17:28:47 -05:00
COPY --from=build /go/src/app/agecem-org /usr/bin/agecem-org
2023-02-17 17:28:47 -05:00
CMD ["agecem-org", "server"]