I'm trying to make docker build faster for software that are built with 
golang
tried to cache layer but it still slow when dependency changed since go mod 
download have to redownload whole dependency again and again.

how to make use vendor directory on docker  build? (where to copy? so go 
build or go mod download/go mod vendor inside Dockerfile so it doesn't 
redownload agian and again)?
I've tried to copy whole vendor, but it still redownloading
tried to copy vendor to $GOPATH/pkg/mod, but it also still redownloading
tried to copy vendor to $GOPATH/pkg/mod/cache/download, but it still 
redownloading
where the correct way to put vendor directory?

https://stackoverflow.com/questions/69020535/how-to-prevent-docker-build-from-redownloading-copied-golang-vendor

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/a377ced9-16ce-4862-9478-70c2b10b4280n%40googlegroups.com.

Reply via email to