Created
June 29, 2019 19:04
-
-
Save alvaradopcesar/a79df33020c7987f9ccd1965493fc5ca to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| FROM golang:1.11.10-alpine3.9 | |
| RUN apk add git gcc g++ libc-dev | |
| WORKDIR /go/src/project-example/ | |
| COPY file-example.go . | |
| COPY file-example.yml . | |
| COPY go.mod . | |
| COPY go.sum . | |
| ENV GO111MODULE=on | |
| RUN go mod download | |
| RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o project-example . | |
| FROM alpine:latest | |
| RUN apk --no-cache add ca-certificates tzdata | |
| ENV TZ America/Lima | |
| RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone | |
| COPY --from=0 /go/src/project-example/file-example . | |
| COPY --from=0 /go/src/project-example/file-example.yml . | |
| EXPOSE 8585 | |
| ENTRYPOINT ["/file-example"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment