-
Notifications
You must be signed in to change notification settings - Fork 18.9k
Automatically add docker socket with --privileged #9135
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
2fbeeca to
192cd2a
Compare
|
Hm. In #7841 you proposed to add a Wondering; is logical to assume that all privileged containers also want to have a socket? (I agree that naming the flag Ps You missed a |
|
The thought here is that something with --privileged can access docker anyway, and a container with just a socket mounted in is not any more secure than a --privileged container (since something with access to Docker by definition has access to the entire system). |
|
Ok, sounds reasonable. In which case I guess an addendum / note should be added to the proposal with the design change? |
docs/man/docker-run.1.md
Outdated
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.
Docker
|
Docs LGTM - minor comments. Ping @SvenDowideit @fredlf |
|
I don't know... what if I want privileged but don't care about the docker socket... |
|
@jfrazelle Ignore it? |
|
ya thats true seems reasonable enough to me On Thu, Nov 13, 2014 at 12:32 PM, Brian Goff notifications@github.com
|
|
Alternatively, we could add a new flag, |
docs/man/docker-run.1.md
Outdated
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.
While we're in here, missing word?
Either: "... as well as set some configuration variables in AppArmor to..."
or
"and configure AppArmor to..."
|
+1 !! |
docs/man/docker-run.1.md
Outdated
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.
can you kill the unicode double quotes? :)
|
please explain to me why we would not also mount the Docker binary into this container too? and what happens if there is a conflict - ie, does this cause (I really want this, but i want it fully - the current server's Docker binary too) |
|
@SvenDowideit I'm not sure how to mount in the binary... I think it's already happening at If you added a file by that name to the image, it would be mounted over. |
|
And doing a |
|
I would just install the Docker binary if you really needed it. But you don't always need it since you can use the socket from any Docker client library. |
|
@progrium that argument can be made about the socket too - imo, if we're going to add the socket as a convenience, then giving the container a working client would make it futureproof - whereas relying on an installed client library means that you need different versions of the image whenever the daemon API version changes. |
|
Mounting the Docker binary won't work in many, many cases, including and |
|
not to mention its a bit weird... we don't mount any other binaries.. |
|
As an image author, I can include the binary in the image if I need it. I cannot include the socket. The user has to mount it. That is the main point of the problem we're trying to solve. I honestly don't care if the binary is included or not. I will probably not use it. |
|
perfectttt |
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.
can I ask why the rename?
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.
Just aesthetics.
To me calling "apiserver." is more revealing than "server.", but can change if you prefer.
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.
ya i realized below server.Server is gross hehe
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.
so this is fine :)
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.
awesome!
|
ok, sold - though your client may be out of date, you're right at least you can. Docs LGTM when its updated to match the comments. |
bc03ad3 to
a972677
Compare
|
Rebased. Docs updated. |
|
Docs LGTM |
a972677 to
e7218b4
Compare
|
Docs LGTM - @fredlf |
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.
If it's "nearly" the same, we need to specify what's different.
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.
Hmm... This was really just a re-wording of the first part of that sentence for Sven.
Not sure what all the differences are... I could probably figure it out, but maybe in a separate pr?
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.
+1 to separate PR, I'm not really sure what the differences are, but we can work with @crosbymichael to get something.
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.
Okay. But in that case we should remove the ambiguous language, as it is not confidence inducing for the user: "Docker will enable access to all devices on the and configure AppArmor to allow the container to access the host..."
Generally, terms like "mostly", "nearly", "almost", etc. are a no-no in tech writing.
|
I don't think this is an expected behavior for If plugins are needing a communication back to the daemon, perhaps define a new means like a |
|
Heh, this will probably also cause problems with our integration tests, |
|
For sure we can put the socket elsewhere easily enough. Keep in mind, not all daemon's have a unix sock available to mount in. |
|
the |
Fixes 7841 Signed-off-by: Brian Goff <cpuguy83@gmail.com>
e7218b4 to
5137974
Compare
|
Updated, also changed location of socket to |
|
Are we sure we should automagically be doing this? I'm still hesitant |
|
I do not like this at all and it's much better to be explicit. It's not that hard at all if you have to specify Lets not do this as the cons of adding this vastly outweigh the pain of adding a flag especially when you don't want extra linux CAPs, security profiles. NOT LGTM |
|
I agree, NOT LGTM |
Fixes #7841