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

How to vendor docker 17.06.0-ce? #33989

Closed
bquenin opened this Issue Jul 6, 2017 · 20 comments

Comments

@bquenin
Copy link

bquenin commented Jul 6, 2017

Hi, I'm working on a project relying on docker and I'd like to vendor the code corresponding to the docker 17.06.0-ce version so that we're in sync with the official release.
It seems that there's no tag anymore on this project (moby/moby), however, looking at the docker/docker-ce repository, I didn't see the commit hash that was used to build the docker 17.06.0-ce release.
What do you recommend regarding vendor now? I'm fine using a commit hash, however, I'm not sure which one I'm supposed to use.

@andrewhsu

This comment has been minimized.

Copy link
Contributor

andrewhsu commented Jul 6, 2017

@bquenin the commit hash for the docker-ce 17.06.0 release is 02c1d87 and is tagged as v17.06.0-ce. There is also a github release page for the tag when the release goes out: https://github.com/docker/docker-ce/releases/tag/v17.06.0-ce

@tiborvass tiborvass self-assigned this Jul 6, 2017

@bquenin

This comment has been minimized.

Copy link

bquenin commented Jul 6, 2017

@andrewhsu Thanks for your reply. I noticed the tag on the docker/docker-ce repository. However, this is not the repository we use for vendoring, we use moby/moby. Hence my question on how to get the corresponding commit hash for the moby/moby repository.
Or is there a way to use docker/docker-ce as the vendor repository?

@tiborvass

This comment has been minimized.

Copy link
Collaborator

tiborvass commented Jul 6, 2017

@bquenin thanks for opening the issue. We'll work on a fix that works for everyone. Out of curiosity, which vendoring tool are you using?

@bquenin

This comment has been minimized.

Copy link

bquenin commented Jul 6, 2017

@tiborvass thanks!
We're currently using glide but we're going to move to vndr soon.

@tiborvass

This comment has been minimized.

Copy link
Collaborator

tiborvass commented Jul 6, 2017

@bquenin Awesome, I love vndr too :) will keep you posted.

@ndegory

This comment has been minimized.

Copy link

ndegory commented Jul 10, 2017

@tiborvass, just in case, do you know the moby/moby sha that matches docker-ce 17.06? that would be a workaround until we have a better solution.

@cpuguy83

This comment has been minimized.

Copy link
Contributor

cpuguy83 commented Jul 10, 2017

@ndegory There isn't one, which is the major issue since docker/docker-ce has backported patches that came after the branch was cut from moby/moby.

@vdemeester

This comment has been minimized.

Copy link
Member

vdemeester commented Jul 11, 2017

Yeah, we had the same problem when updating docker deps on traefik (see containous/traefik#1823). Tried to use commits from moby/moby and docker/cli that works together but we need a better solution for that 👼

@tiborvass

This comment has been minimized.

Copy link
Collaborator

tiborvass commented Jul 12, 2017

Stop-gap solution for right now: manually clone docker/docker-ce at the desired branch and put the components/engine directory to vendor/github.com/docker/docker.

cd /tmp
git clone --depth 1 -b 17.06 github.com/docker/docker-ce
cd $PROJECT_PATH
mkdir -p vendor/github.com/docker
mv /tmp/docker-ce/components/engine vendor/github.com/docker/docker
rm -rf /tmp/docker-ce
@fntlnz

This comment has been minimized.

Copy link
Member

fntlnz commented Aug 23, 2017

@Namsulee

This comment has been minimized.

Copy link

Namsulee commented Sep 16, 2017

Hi guys I am the same issue. I want to use v17.06.1-ce in my vendor but glide is not able to update the version due to the similar reason. Like I you said I can take the version from github.com/docker/docker-ce but I need the same place to update. Is it processing so far or is there a
Other way to tackle? If I am wrong please correct me.!

@ekristen

This comment has been minimized.

Copy link
Contributor

ekristen commented Oct 10, 2017

Same problem here. Any progress on a solution?

exekias added a commit to exekias/beats that referenced this issue May 23, 2018

Negotiate Docker API version
New Docker versions have deprecated our hardcoded client API version
(1.22), this change uses an API version negotiation mechanism to ensure
compatibility.

We should still upgrade to a newer client in the future, let's keep an
eye on moby/moby#33989 and do it once we have
something we can vendor.

exekias added a commit to exekias/beats that referenced this issue May 23, 2018

Negotiate Docker API version
New Docker versions have deprecated our hardcoded client API version
(1.22), this change uses an API version negotiation mechanism to ensure
compatibility.

We should still upgrade to a newer client in the future, let's keep an
eye on moby/moby#33989 and do it once we have
something we can vendor.

exekias added a commit to exekias/beats that referenced this issue May 23, 2018

Negotiate Docker API version
New Docker versions have deprecated our hardcoded client API version
(1.22), this change uses an API version negotiation mechanism to ensure
compatibility.

We should still upgrade to a newer client in the future, let's keep an
eye on moby/moby#33989 and do it once we have
something we can vendor.

exekias added a commit to exekias/beats that referenced this issue May 23, 2018

Negotiate Docker API version
New Docker versions have deprecated our hardcoded client API version
(1.22), this change uses an API version negotiation mechanism to ensure
compatibility.

We should still upgrade to a newer client in the future, let's keep an
eye on moby/moby#33989 and do it once we have
something we can vendor.

ruflin added a commit to elastic/beats that referenced this issue May 24, 2018

Negotiate Docker API version (#7165)
New Docker versions have deprecated our hardcoded client API version
(1.22), this change uses an API version negotiation mechanism to ensure
compatibility.

We should still upgrade to a newer client in the future, let's keep an
eye on moby/moby#33989 and do it once we have
something we can vendor.

exekias added a commit to exekias/beats that referenced this issue May 25, 2018

Negotiate Docker API version (elastic#7165)
New Docker versions have deprecated our hardcoded client API version
(1.22), this change uses an API version negotiation mechanism to ensure
compatibility.

We should still upgrade to a newer client in the future, let's keep an
eye on moby/moby#33989 and do it once we have
something we can vendor.

(cherry picked from commit 253bc71)
@Zalgo2462

This comment has been minimized.

Copy link

Zalgo2462 commented Jun 6, 2018

Any news on this front?

Couldn't github.com/docker/docker just redirect to github.com/docker/engine/ if the Docker group tagged the fork with their version tags?

exekias added a commit to exekias/beats that referenced this issue Jun 14, 2018

Negotiate Docker API version (elastic#7165)
New Docker versions have deprecated our hardcoded client API version
(1.22), this change uses an API version negotiation mechanism to ensure
compatibility.

We should still upgrade to a newer client in the future, let's keep an
eye on moby/moby#33989 and do it once we have
something we can vendor.

(cherry picked from commit 253bc71)

ruflin added a commit to elastic/beats that referenced this issue Jun 15, 2018

Cherry-pick #7165 to 6.3: Negotiate Docker API version (#7177)
* Negotiate Docker API version (#7165)

New Docker versions have deprecated our hardcoded client API version
(1.22), this change uses an API version negotiation mechanism to ensure
compatibility.

We should still upgrade to a newer client in the future, let's keep an
eye on moby/moby#33989 and do it once we have
something we can vendor.

(cherry picked from commit 253bc71)

* Update CHANGELOG.asciidoc
@cpuguy83

This comment has been minimized.

Copy link
Contributor

cpuguy83 commented Jul 10, 2018

github.com/docker/engine is now an official repository that will be tagged with the docker release on the correct commits.

It's still not absolutely perfect since the packages are github.com/docker/docker, which itself redirects to moby/moby.... but at least you can get a client with the right commits (starting with the 18.06 releases... currently rc1 and rc2 are tagged).

@rc979

This comment has been minimized.

Copy link

rc979 commented Jul 16, 2018

@cpuguy83: thanks! how can we get this to work despite the redirect? Any workaround you can share?

@cpuguy83

This comment has been minimized.

Copy link
Contributor

cpuguy83 commented Jul 16, 2018

@rc979 This depends on your vending technique.

@rc979

This comment has been minimized.

Copy link

rc979 commented Jul 18, 2018

@cpuguy83

This comment has been minimized.

Copy link
Contributor

cpuguy83 commented Jul 19, 2018

@rc979
From the dep docs:

[[constraint]]
  # Required: the root import path of the project being constrained.
  name = "github.com/user/project"
  # Recommended: the version constraint to enforce for the project.
  # Note that only one of "branch", "version" or "revision" can be specified.
  version = "1.0.0"
  branch = "master"
  revision = "abc123"

  # Optional: an alternate location (URL or import path) for the project's source.
  source = "https://github.com/myfork/package.git"

  # Optional: metadata about the constraint or override that could be used by other independent systems
  [metadata]
  key1 = "value that convey data to other systems"
  system1-data = "value that is used by a system"
  system2-data = "value that is used by another system"
@deviantony

This comment has been minimized.

Copy link

deviantony commented Oct 10, 2018

@rc979 This is how I was able to vendor the latest release of docker via dep:

# Unable to pin this package to a specific version as repository versions
# are not valid semver: https://github.com/moby/moby/issues/37281
[[constraint]]
  name = "github.com/docker/docker"
  # This repository allows us to have a track of recent releases (tags not available in moby/moby)
  # https://github.com/moby/moby/issues/33989#issuecomment-403873249
  source = "https://github.com/docker/engine.git"
  # This revision points to release v18.06.1-ce
  revision = "320063a2ad06a1d8ada61c94c29dbe44e2d87473"

# For some reason, the vendored Docker dependencies are using a specific version of
# the distribution package.
# Found via: https://github.com/moby/moby/blob/master/vendor.conf#L67
[[override]]
  name = "github.com/docker/distribution"
  revision = "83389a148052d74ac602f5f1d62f86ff2f3c4aa5"
@AkihiroSuda

This comment has been minimized.

Copy link
Member

AkihiroSuda commented Oct 11, 2018

Can we close this issue now?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment