mirror of https://github.com/docker/docs.git
Fixed bug where user could not delete a container that failed to start
This commit is contained in:
parent
2f38e3f188
commit
dbe1f46d4b
|
|
@ -101,7 +101,6 @@ export default {
|
||||||
containerData.Env = containerData.Config.Env;
|
containerData.Env = containerData.Config.Env;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
containerData.Volumes = _.mapObject(containerData.Volumes, () => {return {};});
|
containerData.Volumes = _.mapObject(containerData.Volumes, () => {return {};});
|
||||||
|
|
||||||
let existing = this.client.getContainer(name);
|
let existing = this.client.getContainer(name);
|
||||||
|
|
@ -114,6 +113,8 @@ export default {
|
||||||
}
|
}
|
||||||
metrics.track('Container Finished Creating');
|
metrics.track('Container Finished Creating');
|
||||||
this.startContainer(name, containerData);
|
this.startContainer(name, containerData);
|
||||||
|
delete this.placeholders[name];
|
||||||
|
localStorage.setItem('placeholders', JSON.stringify(this.placeholders));
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
@ -164,7 +165,7 @@ export default {
|
||||||
Name: name,
|
Name: name,
|
||||||
Image: imageName,
|
Image: imageName,
|
||||||
Config: {
|
Config: {
|
||||||
Image: imageName,
|
Image: imageName
|
||||||
},
|
},
|
||||||
Tty: true,
|
Tty: true,
|
||||||
OpenStdin: true,
|
OpenStdin: true,
|
||||||
|
|
@ -187,8 +188,6 @@ export default {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
delete this.placeholders[name];
|
|
||||||
localStorage.setItem('placeholders', JSON.stringify(this.placeholders));
|
|
||||||
this.createContainer(name, {Image: imageName, Tty: true, OpenStdin: true});
|
this.createContainer(name, {Image: imageName, Tty: true, OpenStdin: true});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue