-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Provide a vendor directory to avoid downloading all go modules when execute "go build" #816
Comments
I'm no expert but projects that use Go modules typically no longer include a vendor directory. So I'm not sure it is "better to provide a vendor directory". See the "End of Vendoring" in https://research.swtch.com/vgo-module. The community seems to be transitioning to self-hosted or public proxies such as https://github.com/gomods/athens to ensure availability of dependencies or enable "offline" builds. You may also build your own vendor directory, with the caveat that vendor diectories are ignored by |
@antoninbas, thanks your response, yes, I just want to enable offline build. |
Please explain what you built using |
@bboreham |
Ok so the vendor directory would be in your project not in ours. |
@bboreham, |
If I do this it says "no Go files in /home/vagrant/src/github.com/containernetworking/cni". What you indicated before is that you are building your own project, which will say something like As described at https://golang.org/ref/mod#vendoring, "the go command ignores vendor directories in locations other than the main module's root directory", so even if we did what you asked it would not change anything. The "main module" is whatever you are building; the CNI library is not your main module. |
@bboreham, |
This is not something you need to do, or should do. |
@bboreham, In my env, it's easy to reproduce that it needs to connect the network during "go build" stage with below steps. And all I want just provide a method not let it connect the network during "go build" stage. Thanks a lot! |
One rule for the life of CNI vs one for ipMasq, portmap etc. This is an alternative to adding an unique container IP specific rules every cniADD for ipMasq, portmap and then removing when cniDel is called. Fixes containernetworking#816 Signed-off-by: Michael Cambria <mcambria@redhat.com>
One rule for the life of CNI vs one for ipMasq, portmap etc. This is an alternative to adding an unique container IP specific rules every cniADD for ipMasq, portmap and then removing when cniDel is called. Fixes plugins containernetworking#816 gofumpt Signed-off-by: Michael Cambria <mcambria@redhat.com>
One rule for the life of CNI vs one for ipMasq, portmap etc. This is an alternative to adding an unique container IP specific rules every cniADD for ipMasq, portmap and then removing when cniDel is called. Fixes plugins containernetworking#816 gofumpt Signed-off-by: Michael Cambria <mcambria@redhat.com>
One rule for the life of CNI vs one for ipMasq, portmap etc. This is an alternative to adding an unique container IP specific rules every cniADD for ipMasq, portmap and then removing when cniDel is called. Fixes plugins containernetworking#816 gofumpt Keep lint happy? Signed-off-by: Michael Cambria <mcambria@redhat.com>
One rule for the life of CNI vs one for ipMasq, portmap etc. This is an alternative to adding an unique container IP specific rules every cniADD for ipMasq, portmap and then removing when cniDel is called. Fixes plugins containernetworking#816 gofumpt Keep lint happy? Signed-off-by: Michael Cambria <mcambria@redhat.com>
After fetch the cni code via "git clone git://github.com/containernetworking/cni.git" and then continue to build the code via "go build", but it still try to fetch the dependencies defined in ../cni/go.module after a7cceb9 included in go 1.15. It's better to provide a vendor directory to avoid downloading all go modules when execute "go build".
go version: 1.15
cni version: v0.8.0
The text was updated successfully, but these errors were encountered: