3 ms·
It's worth noting that golang builds can be smaller than that with `GOOS=linux go build -ldflags="-s -w" .` (assuming a build on macos for linux.) From there I
by danielhlockard 7y ago
It's worth noting that golang builds can be smaller than that with `GOOS=linux go build -ldflags="-s -w" .` (assuming a build on macos for linux.) From there I usually run `upx --ultra-brute -9 program` before dropping it into a `scratch` docker container (plus whatever other deps it needs).
- zxcmx 7y agoDoes the UPX help much on top of Docker's layer compression? I can imagine it might (special purpose vs general purpose) but haven't tried it.
- danielhlockard 7y agoJust saw this reply, yes it does.