Created
January 11, 2020 00:19
-
-
Save jorlugaqui/221d22fc7629589f330337928b048e53 to your computer and use it in GitHub Desktop.
ahm-docker-initial
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Certs | |
FROM alpine:latest as certs | |
RUN apk --update add ca-certificates | |
### Base | |
FROM golang:1.12.14-alpine3.10 as base | |
ENV CGO_ENABLED=0 \ | |
GOOS=linux \ | |
GOARCH=amd64 | |
COPY . /go/src/ahm/ | |
WORKDIR /go/src/ahm/ | |
# it will take the flags from the environment | |
RUN go build cmd/main.go | |
RUN ls -la | |
### App | |
FROM scratch as app | |
COPY --from=certs /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt | |
COPY --from=base /go/src/ahm/main / | |
ENTRYPOINT ["/main"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment