Remove temporary files in the build container to shrink it down by ~100MB

This commit is contained in:
Tom Wilkie
2016-03-24 12:06:25 +00:00
parent 8c0fddc20d
commit b9233561d8

View File

@@ -1,11 +1,16 @@
FROM golang:1.6.0
RUN apt-get update && apt-get install -y libpcap-dev python-requests time file
RUN go clean -i net && go install -tags netgo std && go install -race -tags netgo std
RUN apt-get update && \
apt-get install -y libpcap-dev python-requests time file && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
RUN go clean -i net && \
go install -tags netgo std && \
go install -race -tags netgo std
RUN go get -tags netgo \
github.com/fzipp/gocyclo \
github.com/golang/lint/golint \
github.com/kisielk/errcheck \
github.com/mjibson/esc \
github.com/client9/misspell/cmd/misspell
github.com/client9/misspell/cmd/misspell && \
rm -rf /go/pkg/ /go/src/
COPY build.sh /
ENTRYPOINT ["/build.sh"]