Re:Show HN: Jackal – XMPP server in Go
by ihsw2 on Tuesday May 08, 2018 @11:20AM
(#17021525)
This 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.
[ Parent
| on HN ]
Example golang multi-stage build:
https://github.com/jaegertracing/jaeger/blob/master/cmd/quer...
With the caveat that it doesn't build the app inside container, so the multi stage build is kind of underutilized here.
You 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. ]
Isn't this the purpose of multi stage builds? To have one stage for building it and another, from scratch, to run it?