Skip to content

Conversation

@calavera
Copy link
Contributor

This patch allows to set the plugins root at the deamon level.

I'm not super happy about the implementation, so all your feedback will be very welcome.

Signed-off-by: David Calavera [email protected]

@cpuguy83
Copy link
Member

oh man... I'd punt on this. Don't see why anyone would really need to customize this other than "look ma, I can customize things".

@calavera
Copy link
Contributor Author

@cpuguy83 I totally agree with you, but I'm sure if we don't do it someone else will. To be clear, I'm okay with closing this PR and forgetting about it.

@calavera
Copy link
Contributor Author

@cpuguy83 I just thought about a case where we'll want to change this, windows 😉

Moving forward with this after a rebase.

@cpuguy83
Copy link
Member

@calavera In that case it's just a constant set in an _windows.go file :)

@calavera
Copy link
Contributor Author

that's very true.

@thaJeztah
Copy link
Member

Not sure about this either; is there an actual use case already? If not, then I wonder if we should add it just because it may become handy.

Just my 0.02

@calavera
Copy link
Contributor Author

Okay, I'm sold, closing this PR.

@calavera
Copy link
Contributor Author

Reopening this because of #13859

@calavera calavera force-pushed the plugins_path_flag branch 2 times, most recently from 30e0fd4 to 63a8286 Compare June 11, 2015 00:27
@LK4D4
Copy link
Contributor

LK4D4 commented Jun 11, 2015

Maybe we should make /var/lib/docker default? :)

@SvenDowideit
Copy link
Contributor

For my normal testing, I start the Docker daemon with docker -d -D -g /data/docker - which is really its own mounted partition.

rather than hard coding the default to /var/lib/docker, perhaps it would be useful to default to {graphdir}/plugins.

however, I then note another pain point - the plugin API does not communicate daemon settings to it - so it doesn't know that in this case, it should probably make the the mounts in /data/docker.

tbh, I'm hoping the daemon can pass on some more client oriented info too, but that may be pushing it :)

@calavera
Copy link
Contributor Author

@SvenDowideit it cannot go into {graphdir}/plugins. We already had that discussion, as @tianon pointed out, the drivers expect a defined structure.

@calavera calavera force-pushed the plugins_path_flag branch 2 times, most recently from 89a50a7 to 53b15a3 Compare June 11, 2015 20:00
@calavera
Copy link
Contributor Author

Also, keep in mind that /var/lib/docker is meant to be ephemeral. You can always wipe out the directory, run docker run container and everything works. If we put the plugins directory there, that directory stops being ephemeral, because you'll want to save the plugins configuration.

@calavera calavera force-pushed the plugins_path_flag branch from 53b15a3 to afd30da Compare June 11, 2015 20:39
@philips
Copy link
Contributor

philips commented Jun 12, 2015

Based on the plugins docs it seems that the plugins are either a unix socket or a spec file pointing to a unix socket (why not a symlink?). The accepted pattern for IPC unix sockets is to put them into /run/. So, I would suggest that the plugins be a combination of three locations:

/run/docker/plugins
/etc/docker/plugins
/usr/lib/docker/plugins

And have an inheritance order where /run overrides /etc and /etc overrides /usr on name collision. I would also suggest that both /etc and /usr only be allowed to contain spec files.

@philips
Copy link
Contributor

philips commented Jun 12, 2015

cc @icecrime

@cpuguy83
Copy link
Member

Sounds legit to me.
I don't like configurable plugin paths at all.

@calavera
Copy link
Contributor Author

Sounds like a good idea to me too, I'll make the changes here and update the title to reflect that.

@calavera
Copy link
Contributor Author

Closing. I'm going to start over in a new pull request.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants