-
-
Save Depado/b172a3bc19be7c016abd650caa622c69 to your computer and use it in GitHub Desktop.
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
# Build step | |
FROM golang:latest AS build | |
RUN mkdir -p $GOPATH/src/github.com/Depado/dummy | |
ADD . $GOPATH/src/github.com/Depado/dummy | |
WORKDIR $GOPATH/src/github.com/Depado/dummy | |
RUN go get -u github.com/golang/dep/cmd/dep | |
RUN dep ensure -vendor-only | |
RUN CGO_ENABLED=0 go build -o /dummy | |
# Final step | |
FROM alpine | |
RUN apk update | |
RUN apk upgrade | |
RUN apk add ca-certificates && update-ca-certificates | |
RUN apk add --update tzdata | |
RUN rm -rf /var/cache/apk/* | |
COPY --from=build /dummy /home/ | |
ENV TZ=Europe/Paris | |
WORKDIR /home | |
ENTRYPOINT ./dummy | |
EXPOSE 8080 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment