-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
10bb538
commit bc0a70a
Showing
2 changed files
with
62 additions
and
36 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,17 @@ | ||
FROM golang:alpine | ||
|
||
RUN apk update \ | ||
&& apk add --no-cache git \ | ||
&& go get github.com/Masterminds/glide \ | ||
&& go install github.com/Masterminds/glide | ||
|
||
FROM golang:alpine as base | ||
# the base image is only used for compilation | ||
ARG BUILD_VERSION=0.0.1-test | ||
ENV CGO_ENABLED=0 | ||
ENV GOOS=linux | ||
ENV GOARCH=amd64 | ||
WORKDIR /go/src/github.com/VEVO/awsRetagger | ||
COPY . ./ | ||
|
||
RUN rm -f glide.lock \ | ||
&& glide install --strip-vendor | ||
RUN go-wrapper install | ||
RUN apk add --no-cache git build-base | ||
COPY . . | ||
RUN make go-build | ||
|
||
CMD ["go-wrapper", "run"] | ||
# Getting a small image with only the binary | ||
FROM scratch | ||
COPY --from=base /go/src/github.com/VEVO/awsRetagger/awsRetagger /awsRetagger | ||
# This is needed when you do HTTPS requests | ||
COPY --from=base /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ | ||
ENTRYPOINT ["/awsRetagger"] |
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