How long should the containers take to
How long should the containers take to build during local development?
I'm using one of the basic go examples and the built step takes ~1 minute. Is this normal?
2 Replies
that seems normal to me for a first run, the layers should be cached for subsequent builds and quite a lot faster.
It looks like the docker file from the template doesn't seem to be caching the build layer properly for me.
I found this article on how to setup the go build cache: https://dev.to/jacktt/20x-faster-golang-docker-builds-289n
And updated the docker file build step to:
Now on refresh the container rebuilds in just a couple seconds.
DEV Community
20X Faster Golang Docker Builds
According to the Go command documentation: "The go command caches build outputs for reuse in future...