Would it help to set up your own module proxy e.g. with
https://github.com/gomods/athens or
https://github.com/goproxy/goproxy?

K Prayogo <kisw...@gmail.com> schrieb am Do. 2. Sept. 2021 um 03:54:

> 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
> <https://groups.google.com/d/msgid/golang-nuts/a377ced9-16ce-4862-9478-70c2b10b4280n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
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/CALWqRZqfOLTxCg7_KVK4UevXoj6SP5-Vx4gc%2BK7F8itQRGYN7Q%40mail.gmail.com.

Reply via email to