ContainerImage.SpamasaurusRex/Dockerfile

20 lines
260 B
Docker
Raw Normal View History

2024-02-19 00:35:04 +00:00
FROM golang:latest as builder
WORKDIR /app
COPY go.mod go.sum ./
COPY . .
2024-02-27 11:27:12 +00:00
RUN go mod download && \
2024-02-19 00:35:04 +00:00
CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o main .
FROM scratch
WORKDIR /app
COPY --from=builder /app/main .
EXPOSE 80
CMD ["./main"]