Giter VIP home page Giter VIP logo

Comments (5)

fsouza avatar fsouza commented on August 15, 2024

Can you clarify what issues you're facing? When docker renamed the repo to moby, they didn't change the name of the package, which means there's no impact to people importing it.

from go-dockerclient.

vndroid avatar vndroid commented on August 15, 2024

Can you clarify what issues you're facing? When docker renamed the repo to moby, they didn't change the name of the package, which means there's no impact to people importing it.

For example, my project introduced go-dockerclient and moby as submodules, and now the path to them has changed, but the new path does not contain the original files,

ls vendor/github.com/docker/docker/

but in fact, the path is

ls vendor/github.com/moby/moby/

your code distribution.go

...
	"github.com/docker/docker/api/types/registry"
...

if I add the submodule moby, the path doesn't have the file. in fact, its path is vendor/github.com/moby/moby/api/types/registry

from go-dockerclient.

fsouza avatar fsouza commented on August 15, 2024

How are you vendoring the code? Are you using go modules?

For context, the repository docker/docker was renamed to moby/moby in 2017. It happened almost 6 years ago, and it shouldn't affect go-dockerclient's ability to import its code.

from go-dockerclient.

vndroid avatar vndroid commented on August 15, 2024

How are you vendoring the code? Are you using go modules?

For context, the repository docker/docker was renamed to moby/moby in 2017. It happened almost 6 years ago, and it shouldn't affect go-dockerclient's ability to import its code.

Such as this project docker-ipv6nat, now the submodule path is vendor/github.com/docker/docker, When I delete the submodule and re-add moby submodule, I get an error that the module is not found and I can only modify it by following the old path.

I think this is unreasonable, is there a more perfect solution?

from go-dockerclient.

fsouza avatar fsouza commented on August 15, 2024

Oh I see you're using Git submodules for vendoring. I strongly recommend migrating to Go modules, but if you'd like to continue using Git submodules, you should just remember to manually clone it under vendor/github.com/docker/docker. If you're adding the new submodule, you could do something like:

git submodule add https://github.com/docker/docker.git vendor/github.com/docker/docker

This alternative would work too:

git submodule add https://github.com/moby/moby.git vendor/github.com/docker/docker

You just need to make sure that the path is vendor/github.com/docker/docker.

from go-dockerclient.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.