mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Merge pull request #27838 from dperny/swarm_support_npipe
Support Windows Named Pipe for Swarm Mode
This commit is contained in:
commit
ed1d57c5f9
1 changed files with 9 additions and 1 deletions
|
@ -7,6 +7,7 @@ import (
|
|||
"net"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"runtime"
|
||||
"strings"
|
||||
"sync"
|
||||
"time"
|
||||
|
@ -277,13 +278,20 @@ func (c *Cluster) startNewNode(conf nodeStartConfig) (*node, error) {
|
|||
}
|
||||
}
|
||||
|
||||
var control string
|
||||
if runtime.GOOS == "windows" {
|
||||
control = `\\.\pipe\` + controlSocket
|
||||
} else {
|
||||
control = filepath.Join(c.runtimeRoot, controlSocket)
|
||||
}
|
||||
|
||||
c.node = nil
|
||||
c.cancelDelay = nil
|
||||
c.stop = false
|
||||
n, err := swarmnode.New(&swarmnode.Config{
|
||||
Hostname: c.config.Name,
|
||||
ForceNewCluster: conf.forceNewCluster,
|
||||
ListenControlAPI: filepath.Join(c.runtimeRoot, controlSocket),
|
||||
ListenControlAPI: control,
|
||||
ListenRemoteAPI: conf.ListenAddr,
|
||||
AdvertiseRemoteAPI: conf.AdvertiseAddr,
|
||||
JoinAddr: conf.joinAddr,
|
||||
|
|
Loading…
Add table
Reference in a new issue