4 ms·
The image seems to have the code and dependencies copied into it+ `go build` run on it, instead of just copying the built artifact.
by r_venkat 8y ago
The image seems to have the code and dependencies copied into it+ `go build` run on it, instead of just copying the built artifact.
- ihsw2 8y agoThis is an opportunity for enterprising OSS contributors -- by virtue of being written in Go, converting their current Dockerfile to one that uses multi-stage builds should be simple and the resulting image would be as minimal as they come.
- SEJeff 8y agoExample golang multi-stage build: https://github.com/jaegertracing/jaeger/blob/master/cmd/query/Dockerfile https://github.com/jaegertracing/jaeger/blob/master/cmd/quer...
- Boulth 8y agoWith the caveat that it doesn't build the app inside container, so the multi stage build is kind of underutilized here.
- e12e 8y agoYou almost certainly want to build the app inside a container, but probably not the same container that result from the build. [ed: well maybe not for a simple go project, as go has great cross compilation support. But if there's a bit of Javascript/(s)css/static resource munging - a container with a predictable build environment might become appealing. ]