DEV Community

Discussion on: Building and distributing a command line tool in Golang

Collapse
 
miniscruff profile image
miniscruff

What do you mean by docker image being 1GB? Like when you build a go project in docker the final image is 1GB? Cause mine is only 3MB when built.

Thread Thread
 
supportic profile image
Supportic

The image. For reference the node image is ~350MB. Everytime when you have to compile GO in your stack you will need the environment to get your executable.

Thread Thread
 
miniscruff profile image
miniscruff

Oh yea, use a multi stage docker build, you can build your app in one and then using a base scratch image you can store it in a much smaller image. docs.docker.com/develop/develop-im... has a guide for it.