-
Notifications
You must be signed in to change notification settings - Fork 18.9k
Added ability to create dynamic docker and static dockerinit through make scripts directly #2217
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
Conversation
|
A lot of this already happens in the dm branc (same dir, _DOCKER_INIT_PATH) so this will conflict a bit. |
|
The environment variable code got lost somewhere along the way to where we are now. The links branch is actually where the separate docker-init code is right now (hence why that's the merge target for this PR). |
|
The env var code is here: https://github.com/dotcloud/docker/blob/dm/runtime.go#L51 |
|
Its non-ideal that the static docker-init is not on the same branch though :) |
|
Oh, that's frustrating. I searched the links branch everywhere for that code. |
|
Oh, this needs a rebase real bad. I'll rebase real fast. |
|
rebased; ping @shykes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI, this symlink is so that if we run ./bundles/VERSION/dynbinary/docker-VERSION, it works and picks up the proper dockerinit (because it won't look for a version-suffixed version; it could, if that's preferred to this tiny hack - as an alternative, we could just drop the VERSION suffix altogether here).
|
This kinda conflicts with the related work in the dm branch. For instance, that has a separate "docker-init" binary that avoids linking to all the extra stuff that docker uses (libdevmapper, sqlite etct) at: https://github.com/dotcloud/docker/blob/dm/docker-init/docker-init.go Also, as i said above it has different code that does the picking of the docker-init file. |
|
Well, as they stand now, it looks like "links" and "dm" are incompatible (I believe @vieux was working on this yesterday). I can adjust this PR to go against the "dm" branch instead without too much trouble. In my quick and rough attempt to do so now just to see what it would take, most of the big conflicts have actually been build script conflicts, but there are also the runtime*.go conflicts you mention (which were expected). Originally, this was against the links branch and not the dm branch because at the time of its creation, the dm branch didn't have the separate docker-init folder. The links branch currently has the same "docker-init" folder, however and this PR renames it to "dockerinit" just so that we're consistent everywhere because it's historically mounted at I can easily now recreate these changes against "dm" instead, if that'll make merging it all together simpler. |
|
Ah, here's the commit the "dm" branch is missing that's the reason this is only possible on "links" right now: ab5d7ec I'm almost done recreating this work completely on top of the "dm" branch, but that commit is the last piece I need. Should I cherry-pick it over as part of the new PR, or let that happen through some other means before I move forward? |
|
How about cherry-picking it + pull request into master? On Fri, Oct 18, 2013 at 7:23 AM, Tianon Gravi notifications@github.com
|
|
That'll work just fine; I'll do that a little later this morning. |
Added ability to create dynamic docker and static dockerinit through make scripts directly
Check that generated protocol buffer code is up to date
This is the result of a long and hairy discussion with @shykes on IRC regarding separate dockerinit.
The logic for docker to officially find
dockerinitis as follows:_DOCKER_INIT_PATHis set and is the path to an executable, we use that (especially for "go test" via./hake/make.sh dynbinary dyntest)/usr/libexec/docker/dockerinitexists, we use that (esp. for packagers)I've also included a documentation update to
hack/PACKAGERS.mdregarding this last-resort method of compiling docker dynamically with a static dockerinit.