agecem-org/Dockerfile

36 lines
543 B
Text
Raw Normal View History

2023-07-25 16:25:08 -04:00
FROM golang:1.20.6 as build
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/
2023-07-04 16:22:00 -04:00
ADD config/ config/
ADD media/ media/
ADD templates/ templates/
ADD serverhandlers/ serverhandlers/
RUN CGO_ENABLED=0 go build -a -installsuffix cgo -o agecem-org .
2023-02-17 17:28:47 -05:00
# Alpine
2023-03-22 16:17:41 -04:00
FROM alpine:3.17.2
2023-02-17 17:28:47 -05:00
RUN apk update && apk upgrade --no-cache
2023-02-17 17:28:47 -05:00
WORKDIR /app
COPY --from=build /go/src/app/agecem-org /usr/bin/agecem-org
2023-02-17 17:28:47 -05:00
CMD ["agecem-org", "server"]