File tree Expand file tree Collapse file tree 1 file changed +20
-3
lines changed
Expand file tree Collapse file tree 1 file changed +20
-3
lines changed Original file line number Diff line number Diff line change 1+ # Build docker-gen from scratch
2+ FROM golang:1.14-alpine as dockergen
3+ RUN apk add --no-cache git
4+
5+ # Download the sources for the given version
6+ ENV VERSION 0.7.4
7+ ADD https://github.com/jwilder/docker-gen/archive/${VERSION}.tar.gz sources.tar.gz
8+
9+ # Move the sources into the right directory
10+ RUN tar -xzf sources.tar.gz && \
11+ mkdir -p /go/src/github.com/jwilder/ && \
12+ mv docker-gen-* /go/src/github.com/jwilder/docker-gen
13+
14+ # Install the dependencies and make the docker-gen executable
15+ WORKDIR /go/src/github.com/jwilder/docker-gen
16+ RUN go get -v ./... && \
17+ CGO_ENABLED=0 GOOS=linux go build -ldflags "-X main.buildVersion=${VERSION}" ./cmd/docker-gen
18+
119FROM alpine:latest
220LABEL maintainer="Jason Wilder <mail@jasonwilder.com>"
321
422RUN apk -U add openssl
523
6- ENV VERSION 0.7.3
7- ENV DOWNLOAD_URL https:// github.com/jwilder/docker-gen/releases/download/$VERSION/ docker-gen-alpine-linux-amd64-$VERSION.tar.gz
24+ ENV VERSION 0.7.4
25+ COPY --from=dockergen /go/src/ github.com/jwilder/docker-gen/docker-gen /usr/local/bin/ docker-gen
826ENV DOCKER_HOST unix:///tmp/docker.sock
927
10- RUN wget -qO- $DOWNLOAD_URL | tar xvz -C /usr/local/bin
1128
1229ENTRYPOINT ["/usr/local/bin/docker-gen" ]
You can’t perform that action at this time.
0 commit comments