mirror of https://github.com/docker/docs.git
Merge pull request #983 from FrenchBen/fix-restart
Updated Container restart
This commit is contained in:
commit
b21ab918fe
|
|
@ -262,17 +262,17 @@ export default {
|
||||||
},
|
},
|
||||||
|
|
||||||
restart (name) {
|
restart (name) {
|
||||||
let container = this.client.getContainer(name);
|
this.client.getContainer(name).stop(stopError => {
|
||||||
container.stop(error => {
|
if (stopError && stopError.statusCode !== 304) {
|
||||||
if (error && error.statusCode !== 304) {
|
containerServerActions.error({name, stopError});
|
||||||
containerServerActions.error({name, error});
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
container.inspect((error, data) => {
|
this.client.getContainer(name).start(startError => {
|
||||||
if (error) {
|
if (startError && startError.statusCode !== 304) {
|
||||||
containerServerActions.error({name, error});
|
containerServerActions.error({name, startError});
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
this.startContainer(name, data);
|
this.fetchContainer(name);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue