Skip to content

Commit

Permalink
chore: fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
moul committed Nov 17, 2019
1 parent e8bbb1b commit e4c476b
Show file tree
Hide file tree
Showing 4 changed files with 125 additions and 11 deletions.
2 changes: 2 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
dist/
vendor/
30 changes: 25 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,31 @@
FROM golang:1.13-alpine as build
# dynamic config
ARG BUILD_DATE
ARG VCS_REF
ARG VERSION

# build
FROM golang:1.13-alpine as build
RUN apk add --update --no-cache git gcc musl-dev make
ADD . /go/src/moul.io/depviz
WORKDIR /go/src/moul.io/depviz
RUN GO111MODULE=on go get -v .
RUN GO111MODULE=on make install
ENV GO111MODULE=on
COPY go.* ./
RUN go mod download
COPY . ./
RUN make install

FROM alpine
# minimalist runtime
FROM alpine:3.10
LABEL org.label-schema.build-date=$BUILD_DATE \
org.label-schema.name="depviz" \
org.label-schema.description="" \
org.label-schema.url="https://moul.io/depviz/" \
org.label-schema.vcs-ref=$VCS_REF \
org.label-schema.vcs-url="https://github.com/moul/depviz" \
org.label-schema.vendor="Manfred Touron" \
org.label-schema.version=$VERSION \
org.label-schema.schema-version="1.0" \
org.label-schema.cmd="docker run -i -t --rm moul/depviz" \
org.label-schema.help="docker exec -it $CONTAINER depviz --help"
RUN apk add --update --no-cache ca-certificates
COPY --from=build /go/bin/depviz /bin/
ENTRYPOINT ["depviz"]
22 changes: 16 additions & 6 deletions go.mod

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit e4c476b

Please sign in to comment.