Commit graph

17 commits

Author SHA1 Message Date
Thibault Jamet
d9697e275e Split go build in Dockerfile
To maximize the usage of cache, split the govendor get in steps:
- govendor fetch to get the pinned versions of dependencies
- go install to actually build the binary

Doing so allows not to re-download the whole dependencies when changing
lines in hugo repository

The current Dockerfile generates an image of 16.6MB

Signed-off-by: Thibault Jamet <tjamet@users.noreply.github.com>
2017-09-25 10:28:13 -06:00
Thibault Jamet
09d960f173 Update Dockerfile to benefit build cache
Docker has recently introduces buikld-stages (as of version 17.05)

Build stages allows to benefit the docker build cache as well as
reducing the size of the resulting image c.f.
https://docs.docker.com/engine/userguide/eng-image/multistage-build/

This change allows to have faster builds when running `docker build`
several times after changing some little code

Signed-off-by: Thibault Jamet <tjamet@users.noreply.github.com>
2017-09-25 10:28:13 -06:00
Anthony Fok
9ed48c1c9a Dockerfile: Run go install with -ldflags '-s -w'
This reduce the Docker image size from 27 MB to 20.5 MB.
2017-07-26 03:22:39 -06:00
Maik Ellerbrock
bfe0bfbbd1 Dockerfile: Reduce image size from 277MB to 27MB
"xtrem" awesome container size optimization
by using alpine:3.6 as base image
and by installing Go at build time.

See #3730 and #3738
2017-07-26 00:51:27 -06:00
Maik Ellerbrock
606d6a8c91 Dockerfile: Optimize Docker image size
Reduce Docker image size from 428 MB to 277 MB.

See #3674
2017-07-23 12:30:18 -06:00
Maik Ellerbrock
118f8f7cf2 Dockerfile: Update Dockerfile and add Docker optimizations 2017-06-28 03:35:26 -06:00
digitalcraftsman
7b99fb9f1c Update source path in Dockerfile due to the org transition 2017-06-13 19:34:20 +02:00
Gilbert Gilb's
c7646551be Dockerfile: Remove ENTRYPOINT
It's pointless to set `/bin/sh` as entrypoint. `/bin/sh` is already the default command, and on the top of that, setting `/bin/sh` as entrypoint ignores the command.
2017-05-14 09:56:03 +02:00
Hauke Löffler
831bfd36aa Update Docker file to Go 1.8
* new go-version, switch to alpine (reduce size by 500mb)
* use govendor
2017-02-23 00:17:14 +01:00
Gilbert Gilb's
95a473e7ec Fix Dockerfile 2016-12-28 19:16:12 +01:00
Evan Purkhiser
e0b278205a Fix alignment of go gets in Dockerfile 2016-11-23 10:52:17 +01:00
Andrew Speed
0721a9c730 Update Dockerfile to pull in missing test dependency
Add the missing github.com/fortytw2/leaktest dependency required for
hugo_site_tests.
2016-10-01 13:02:35 +02:00
Cody W. Opel
acbedf6220 Fix urlesc import url in Dockerfile 2016-06-08 01:33:14 -06:00
Bjørn Erik Pedersen
b7513ea6ff Get Dockerfile up-to-date 2016-06-05 11:06:04 +02:00
Anthony Fok
9ddf52021b Update import path of fsnotify
Rename "gopkg.in/fsnotify.v1" to "github.com/fsnotify/fsnotify"
per upstream recommendation.

See https://github.com/fsnotify/fsnotify/issues/108 for rationale.
2016-04-20 22:28:26 +08:00
Ivan Fraixedes
0945673f05 Update Dockerfile to use golang:1.6 base image
Hugo has been confirmed which runs on Golang 1.6, as travis uses 1.6
vesion. Dockerfile must be consistend with it so it has to use golang:1.6
as base image than golang:1.5
2016-03-10 10:59:52 +01:00
Sven Dowideit
7bc5d3663f Use a Docker container to build hugo
Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
2016-01-04 12:47:23 -05:00