yangzun 3b45770ee9
Some checks failed
ci / build (amd64) (push) Failing after 2s
feat: tirgger workflw build -1
2023-08-23 19:43:00 +08:00

20 lines
345 B
Docker

FROM golang:1.19
# Set destination for COPY
WORKDIR /app
# Download Go modules
COPY go.mod go.sum ./
RUN go mod download
# Copy the source code. Note the slash at the end, as explained in
# https://docs.docker.com/engine/reference/builder/#copy
COPY *.go ./
# Build
RUN CGO_ENABLED=0 go build -o /web
# Expose
EXPOSE 8081
# Run
CMD ["/web"]