mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Use daemon exec root for swarm control socket
Right now docker puts swarm's control socket into the docker root dir (e.g. /var/lib/docker). This can cause some nasty issues with path length being > 108 characters, especially in our CI environment. Since we already have some other state going in the daemon's exec root (libcontainerd and libnetwork), I think it makes sense to move the control socket to this location, especially since there are other unix sockets being created here by docker so it must always be at a path that works. Signed-off-by: Brian Goff <cpuguy83@gmail.com>
This commit is contained in:
parent
bf61c916ee
commit
4d95ea319c
6 changed files with 34 additions and 2 deletions
|
@ -85,6 +85,12 @@ func (cli *DaemonCli) getLibcontainerdRoot() string {
|
|||
return filepath.Join(cli.Config.ExecRoot, "libcontainerd")
|
||||
}
|
||||
|
||||
// getSwarmRunRoot gets the root directory for swarm to store runtime state
|
||||
// For example, the control socket
|
||||
func (cli *DaemonCli) getSwarmRunRoot() string {
|
||||
return filepath.Join(cli.Config.ExecRoot, "swarm")
|
||||
}
|
||||
|
||||
// allocateDaemonPort ensures that there are no containers
|
||||
// that try to use any port allocated for the docker server.
|
||||
func allocateDaemonPort(addr string) error {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue