-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
16 lines (12 loc) · 618 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
FROM golang:alpine AS builder
WORKDIR $GOPATH/src/github.com/felipefrizzo/brazilian-zipcode-api
RUN apk add --update --no-cache ca-certificates
COPY . $GOPATH/src/github.com/felipefrizzo/brazilian-zipcode-api
RUN go mod download
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o /usr/bin/brazilian-zipcode-api
FROM scratch
LABEL MAINTAINER="Felipe Frizzo [email protected]"
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
COPY --from=builder /usr/bin/brazilian-zipcode-api /usr/bin/brazilian-zipcode-api
EXPOSE 8000
ENTRYPOINT [ "/usr/bin/brazilian-zipcode-api" ]