Use Node IP in Swarm Standalone with "host" NetworkMode
This commit is contained in:
parent
7c4353a0ac
commit
d1d8b01dfb
3 changed files with 29 additions and 2 deletions
|
@ -198,6 +198,19 @@ func TestDockerGetIPAddress(t *testing.T) {
|
|||
),
|
||||
expected: "127.0.0.1",
|
||||
},
|
||||
{
|
||||
container: containerJSON(
|
||||
networkMode("host"),
|
||||
),
|
||||
expected: "127.0.0.1",
|
||||
},
|
||||
{
|
||||
container: containerJSON(
|
||||
networkMode("host"),
|
||||
nodeIP("10.0.0.5"),
|
||||
),
|
||||
expected: "10.0.0.5",
|
||||
},
|
||||
}
|
||||
|
||||
for containerID, e := range containers {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue