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) {
|
if (containerData.State && !containerData.State.Running) {
|
||||||
self.fetchContainer(containerData.name, callback);
|
self.fetchContainer(containerData.name, callback);
|
||||||
} else {
|
} else {
|
||||||
container.start({
|
var startopts = {
|
||||||
PublishAllPorts: true,
|
|
||||||
Binds: binds
|
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) {
|
if (err) {
|
||||||
callback(err);
|
callback(err);
|
||||||
return;
|
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...',
|
message: 'To run Docker containers on your computer, Kitematic is starting a Linux virutal machine. This may take a minute...',
|
||||||
totalPercent: 60,
|
totalPercent: 60,
|
||||||
percent: 0,
|
percent: 0,
|
||||||
seconds: 46,
|
seconds: 52,
|
||||||
run: Promise.coroutine(function* (progressCallback) {
|
run: Promise.coroutine(function* (progressCallback) {
|
||||||
setupUtil.simulateProgress(this.seconds, progressCallback);
|
setupUtil.simulateProgress(this.seconds, progressCallback);
|
||||||
yield virtualBox.vmdestroy('kitematic-vm');
|
yield virtualBox.vmdestroy('kitematic-vm');
|
||||||
|
|
Loading…
Reference in New Issue