2023-02-17 17:28:47 -05:00
|
|
|
FROM golang:1.19.1 as build
|
|
|
|
|
|
|
|
LABEL author="vlbeaudoin"
|
|
|
|
|
|
|
|
WORKDIR /go/src/app
|
|
|
|
|
|
|
|
COPY go.mod go.sum main.go server.go ./
|
|
|
|
|
2023-03-21 18:37:51 -04:00
|
|
|
ADD public/ public/
|
2023-02-23 04:24:04 -05:00
|
|
|
|
2023-02-17 17:28:47 -05:00
|
|
|
RUN CGO_ENABLED=0 go build -a -installsuffix cgo -o app .
|
|
|
|
|
|
|
|
# Alpine
|
|
|
|
|
|
|
|
FROM alpine:3.17.1
|
|
|
|
|
2023-03-22 16:12:33 -04:00
|
|
|
RUN apk update && apk upgrade --no-cache
|
2023-02-17 17:28:47 -05:00
|
|
|
|
|
|
|
WORKDIR /app
|
|
|
|
|
|
|
|
COPY --from=build /go/src/app ./
|
|
|
|
|
|
|
|
CMD ["./app"]
|