Skip to content

Proof of concept showing that a statically linked go application can yield container image sizes below 10MB

Notifications You must be signed in to change notification settings

nicoangelo/minimal-go-container

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Small container images

Small container images are a reality. This repo shows that without extra effort you can

  • run go binaries in an empty image, built FROM sratch
  • have an image size as low as 6MB

How build

Prerequisites:

  • Docker
  • Make

Build

make build

The go binary is built with CGO_ENABLED=0 to force a statically linked binary.

Get image size

make size

will yield output similar to

6.07MB

About

Proof of concept showing that a statically linked go application can yield container image sizes below 10MB

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published