Closed alambike closed 10 years ago
Works ok but is necesary, in creation, enable network because is disabled by default!!
my $c = $a->containers->create(
Hostname => 'test',
Cmd => ["nc", "-l", '0.0.0.0', '5555'],
Image => "ubuntu",
Name => "testing123",
NetworkDisabled => "false",
ExposedPorts => {
"5555/tcp" => {}
},
);
$c->start(
"PortBindings" => {
"5555/tcp" => [{"HostIp" => "0.0.0.0", "HostPort" => "11022" }]
},
"PublishAllPorts" => "false", # true by default ¿?
"Privileged" => "false",
);
Tested and added examples
Seems that isn't possible to start a container with an external host port attached to it.
We must test this and provide some examples.
The same with an external volumes.