Skip to content

Instantly share code, notes, and snippets.

@stgleb
Created April 13, 2018 11:30
Show Gist options
  • Save stgleb/c4d58356f0a72721b059fcf02fa5f267 to your computer and use it in GitHub Desktop.
Save stgleb/c4d58356f0a72721b059fcf02fa5f267 to your computer and use it in GitHub Desktop.
FROM golang:1.10
WORKDIR /go/src/github.com/stgleb/imager/cmd/auth_service
COPY Gopkg.lock .
COPY Gopkg.toml .
RUN go get -u github.com/golang/dep/cmd/dep
COPY main.go .
RUN dep ensure
RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o auth_service .
FROM alpine:latest
RUN apk --no-cache add ca-certificates
WORKDIR /root/
COPY --from=0 /go/src/github.com/stgleb/imager/cmd/auth_service .
COPY private_key.pem .
COPY config.toml .
CMD ["./auth_service"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment