mirror of https://github.com/docker/docs.git
Maintain existing ports
This lets the user change container settings without changing the Port mappings
This commit is contained in:
parent
d411c2a673
commit
a9a62c5d47
|
@ -119,10 +119,15 @@ var ContainerStore = assign(Object.create(EventEmitter.prototype), {
|
|||
if (containerData.State && !containerData.State.Running) {
|
||||
self.fetchContainer(containerData.name, callback);
|
||||
} else {
|
||||
container.start({
|
||||
PublishAllPorts: true,
|
||||
var startopts = {
|
||||
Binds: binds
|
||||
}, function (err) {
|
||||
};
|
||||
if (containerData.NetworkSettings && containerData.NetworkSettings.Ports) {
|
||||
startopts.PortBindings = containerData.NetworkSettings.Ports;
|
||||
} else{
|
||||
startopts.PublishAllPorts = true;
|
||||
}
|
||||
container.start(startopts, function (err) {
|
||||
if (err) {
|
||||
callback(err);
|
||||
return;
|
||||
|
|
|
@ -59,7 +59,7 @@ var _steps = [{
|
|||
message: 'To run Docker containers on your computer, Kitematic is starting a Linux virutal machine. This may take a minute...',
|
||||
totalPercent: 60,
|
||||
percent: 0,
|
||||
seconds: 46,
|
||||
seconds: 52,
|
||||
run: Promise.coroutine(function* (progressCallback) {
|
||||
setupUtil.simulateProgress(this.seconds, progressCallback);
|
||||
yield virtualBox.vmdestroy('kitematic-vm');
|
||||
|
|
Loading…
Reference in New Issue