DEV Community

Discussion on: Art of building small containers

nwmqpa profile image
Thomas Nicollet

You could use FROM scratch instead of FROM alpine as your base image since scratch doesn't add anything to your image size, and because go binary are self contained. Depending on your codex this can range from 1 to 25mb per image.

I also use UPX as a way to compress my binaries by getting rid of a lot of debug symbols and dead code in my binary

karanpratapsingh profile image
Karan Pratap Singh Author

yes, I've mentioned about scratch and distroless under Note: ..., didn't know about binary compression with UPX, thank you