shithub: hugo

Download patch

ref: 9ed48c1c9ae4cd9390f5ef88c8b2b6624e9e247d
parent: bfe0bfbbd1a59ddadb72a6b07fecce71716088ec
author: Anthony Fok <[email protected]>
date: Tue Jul 25 23:22:39 EDT 2017

Dockerfile: Run go install with -ldflags '-s -w'

This reduce the Docker image size from 27 MB to 20.5 MB.

--- a/Dockerfile
+++ b/Dockerfile
@@ -19,7 +19,8 @@
   go get github.com/kardianos/govendor && \
   govendor get github.com/gohugoio/hugo && \
   cd $GOPATH/src/github.com/gohugoio/hugo && \
-  go install && \
+  rm -f $GOPATH/bin/hugo && \
+  go install -ldflags '-s -w' && \
   cd $GOPATH && \
   rm -rf pkg src .cache bin/govendor && \
   apk del .build-deps