dep are you using (dep version)?v0.3.1-151-g1d73a4a2
dep command did you run?dep ensure
name = "github.com/docker/docker"
...
version = "v17.05.0-ce"
name = "github.com/docker/docker"
...
version = "v1.13.1"
Hey, I'm using github.com/fsouza/go-dockerclient/ so I have
github.com/docker/docker as the transitive dependency.
I suspect that dep takes v1.13.1 as latest version because of ce in the v17.05.0-ce version.
I tried to constrain the version or branch by adding
required = ["github.com/docker/docker"]
and
[[constraint]]
branch = "master"
name = "github.com/docker/docker"
But it gave me constraint errors during ensuring process.
I suspect it is because github.com/fsouza/go-dockerclient uses like 20 subpackages from docker, but I'm constraining the whole repo.
Do I need to write a constraint for each subpackage or how to overcome this issue?
@Trane9991 hi, since docker/docker is a transitive dependency, you have to use override. We have a FAQ entry for the same how-do-i-constrain-a-transitive-dependencys-version.
Also, I gave it a try to verify that it works as expected.
Add
[[override]]
name = "github.com/docker/docker"
version = "v17.05.0-ce"
to your Gopkg.toml and run dep ensure. You would see v17.05.0-ce added to Gopkg.lock.
branch = "master" works as well. Refers the latest commit revision.
Hope this helps 🙂
I love how Docker's silly versioning choices are haunting me across multiple repos. I had the same problem with the Docker Version Manager too! 🤦♀️
Sorry about the issue spam. I went off down the wrong track and nothing I said was right! 😊
go-dockerclient now supports dep.
Most helpful comment
go-dockerclient now supports dep.