Remove Docker-in-Docker from builds#111
Conversation
|
@smarterclayton @pmorie @ncdc @bparees More details on the rationale here: https://github.com/ironcladlou/origin/blob/host_docker_builds/docs/builds.md#docker-build-implementation |
|
Should |
|
@ironcladlou thanks, I like the rational, I am wondering though, why are privileged containers needed for DIND? I would think there are more risks w/ exposing the host docker daemon than having a contained docker daemon. |
|
@ironcladlou and yeah, reframing as OS design makes sense, i believe. |
|
Unfortunately to run DIND you need to be able to mount things... to mount you need CAP_SYS_ADMIN which is ~ root (because if you can mount you can mount things that the kernel calls directly). So basically, we can make host docker more secure than we can make DIND.
|
|
Agree with Ben
|
|
+1 to reframe On Thursday, September 18, 2014, Clayton Coleman notifications@github.com
|
|
Will revamp the docs later on tonight. It's really unfortunate about DinD since it's so conceptually clean, and I'd love to be proven wrong. |
b2795dc to
753e70d
Compare
|
I made major changes to build.md and moved the code-level implementation details to package docs. Please review. |
753e70d to
16494ec
Compare
There was a problem hiding this comment.
Maybe it'd make sense to provide also a link to https://docs.docker.com/reference/commandline/cli/#build.
|
LGTM |
0c20c7d to
f885cac
Compare
Remove all traces of Docker-in-Docker from builds. The rationale is explained generally in the `docs/builds.md` file. In short, Docker-in-Docker isn't secure or stable for production, and there's no indication it will be in the forseeable future. The codebase can be simplified by eliminating it, and our focus and efforts can shift to solving the remaining issues with host Docker access.
f885cac to
60b9d7b
Compare
|
@csrwng review please |
There was a problem hiding this comment.
Shouldn't this be configurable?
There was a problem hiding this comment.
This seems to me to fall into the category of things which should be
parameters to the build controller. @smarterclayton does this pass the
threshold for adding a new cli flag?
On Friday, September 19, 2014, Michal Fojtik notifications@github.com
wrote:
In pkg/build/strategy/util.go:
podSpec.DesiredState.Manifest.Volumes = append(podSpec.DesiredState.Manifest.Volumes,dockerSocketVolume)podSpec.DesiredState.Manifest.Containers[0].VolumeMounts =append(podSpec.DesiredState.Manifest.Containers[0].VolumeMounts,dockerSocketVolumeMount)- } else {
podSpec.DesiredState.Manifest.Containers[0].Privileged = true- dockerSocketVolumeMount := api.VolumeMount{
Name: "docker-socket",MountPath: "/var/run/docker.sock",Shouldn't this be configurable?
—
Reply to this email directly or view it on GitHub
https://github.com/openshift/origin/pull/111/files#r17789238.
There was a problem hiding this comment.
It assumes that the minion is running the docker daemon locally which I guess is the point of the minion. But if we need to support minions with different configs I think we should handle it in a separate item.
There was a problem hiding this comment.
I have yet to see a docker system running with that on a different port
There was a problem hiding this comment.
In the future we may also want to somehow expose it over TCP rather than a socket... I'd rather deal with those cases as they arise for now.
|
LGTM |
|
LGTM [merge] |
|
Origin Merge Results: SUCCESS (https://ci.openshift.redhat.com/jenkins/job/merge_pull_requests_openshift3/111/) (Image: devenv-fedora_178) |
|
Evaluated for origin up to 60b9d7b |
Merged by openshift-bot
|
@ironcladlou did you kick off rebuilds of the docker builder images? we do not have automatic builds setup right now. |
|
I turned them back on to automatic
|
…imeout Remove unneccessary content from Vagrantfile to correct test builds
Change-Id: Ia271141c7332b9ae0085a8729c93cad7303f793c
Remove all traces of Docker-in-Docker from builds. The rationale is explained
generally in the
docs/builds.mdfile. In short, Docker-in-Docker isn't secureor stable for production, and there's no indication it will be in the forseeable
future. The codebase can be simplified by eliminating it, and our focus and
efforts can shift to solving the remaining issues with host Docker access.