mirror of
https://github.com/gohugoio/hugo.git
synced 2024-12-25 06:05:00 +00:00
Dockerfile: Run go install with -ldflags '-s -w'
This reduce the Docker image size from 27 MB to 20.5 MB.
This commit is contained in:
parent
bfe0bfbbd1
commit
9ed48c1c9a
1 changed files with 2 additions and 1 deletions
|
@ -19,7 +19,8 @@ RUN \
|
||||||
go get github.com/kardianos/govendor && \
|
go get github.com/kardianos/govendor && \
|
||||||
govendor get github.com/gohugoio/hugo && \
|
govendor get github.com/gohugoio/hugo && \
|
||||||
cd $GOPATH/src/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 && \
|
cd $GOPATH && \
|
||||||
rm -rf pkg src .cache bin/govendor && \
|
rm -rf pkg src .cache bin/govendor && \
|
||||||
apk del .build-deps
|
apk del .build-deps
|
||||||
|
|
Loading…
Reference in a new issue