DEV Community

Discussion on: Multi-stage Dockerfile for Golang application

Collapse
 
sarbash profile image
Sergey Sarbash • Edited

Surely, I do this everyday when I have to rebuild my docker image for an app.
Just remember about a static build and You'll be alright.

CGO_ENABLED=0 GOOS=linux go build -a .

Have fun with Docker && Go! :)

Collapse
 
lisitsky profile image
lisitsky

Thank you!