DEV Community

Discussion on: Containerizing your Go Applications with Docker

Collapse
 
achimgrolimund profile image
Achim Grolimund

Cool small post for beginners but please use an up to date Go version.

And the Dockerfile is absolutely not best practice. Use multistage Dockerfile. Build the app in your alpine image then copy it to an scratch image. The result is an Dockerimage with an size about 6-12Mb and not 100Mb+ 😉

See here an Post: grolimund-solutions.ch/dockerimage...

It is on german but the Code is the Same 😋

Best regards

Collapse
 
krpmuruga profile image
murugan

Thank you for your comments.. I'll updated the documents slightly.

Collapse
 
achimgrolimund profile image
Achim Grolimund

btw: here the link to my GitRepo with this example code

github.com/GrolimundSolutions/go-m...

Collapse
 
aurelievache profile image
Aurélie Vache

I'm agree with you @achimgrolimund, I commented too.
I created a serie about create apps in go ok order to learning go by examples on dev.to and I also create videos series about docker and Kubernetes if it's interest you.