Created
May 13, 2022 05:17
-
-
Save manakuro/a8085744fadd5068fb6367aad53d7dd0 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM golang:1.18-alpine as build | |
ENV GO111MODULE=on \ | |
CGO_ENABLED=0 \ | |
GOOS=linux \ | |
GOARCH=amd64 | |
WORKDIR /go/src | |
COPY . . | |
RUN go mod download | |
RUN go build -o app ./ | |
FROM alpine | |
RUN apk add --no-cache tzdata | |
COPY --from=build /go/src/app /go/src/app | |
EXPOSE 8080 | |
WORKDIR /go/src | |
CMD ["./app"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment