From c5af262d43b480e7e8e169427a7902e3256bb61b Mon Sep 17 00:00:00 2001 From: Jimmy Zelinskie Date: Fri, 21 Oct 2016 23:00:20 -0400 Subject: [PATCH] dockerfile: delete the compiler from the container This drastically shrinks the size of the container when deploying using Quay's squashed image support. https://docs.quay.io/guides/squashed-images.html --- Dockerfile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Dockerfile b/Dockerfile index 5d1486e..cc9e0bb 100644 --- a/Dockerfile +++ b/Dockerfile @@ -14,6 +14,10 @@ ADD . /go/src/github.com/chihaya/chihaya RUN glide install RUN go install github.com/chihaya/chihaya/cmd/chihaya +# Delete the compiler from the container. +# This makes the container much smaller when using Quay's squashing feature. +RUN rm -r /usr/local/go + # Expose a docker interface to our binary. EXPOSE 6880 6881 ENTRYPOINT ["chihaya"]