blob: c92d35a8a5d9f48a4a81963040647306b7db35a7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
FROM golang:alpine AS builder
RUN apk --update add ca-certificates git
WORKDIR /app
COPY . .
RUN go mod download
RUN CGO_ENABLED=0 GOOS=linux go build cmd/api/main.go
# Run the exe file
FROM scratch
WORKDIR /app
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
COPY --from=builder /app .
EXPOSE 8080
CMD ["./main"]
|