blob: 14105598daf1f65b4b99ea37761a6b615a05f98b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
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
LABEL version="0.1.1"
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"]
|