mirror of
https://github.com/docker/docs.git
synced 2026-03-27 14:28:47 +07:00
40 lines
726 B
JavaScript
40 lines
726 B
JavaScript
import alt from '../alt';
|
|
import dockerUtil from '../utils/DockerUtil';
|
|
|
|
class ContainerActions {
|
|
start (name) {
|
|
this.dispatch({name});
|
|
dockerUtil.start(name);
|
|
}
|
|
|
|
destroy (name) {
|
|
this.dispatch({name});
|
|
dockerUtil.destroy(name);
|
|
}
|
|
|
|
rename (name, newName) {
|
|
this.dispatch({name, newName});
|
|
dockerUtil.rename(name, newName);
|
|
}
|
|
|
|
stop (name) {
|
|
this.dispatch({name});
|
|
dockerUtil.stop(name);
|
|
}
|
|
|
|
update (name, container) {
|
|
this.dispatch({name, container});
|
|
dockerUtil.updateContainer(name, container);
|
|
}
|
|
|
|
clearPending () {
|
|
this.dispatch();
|
|
}
|
|
|
|
run (name, repo, tag) {
|
|
dockerUtil.run(name, repo, tag);
|
|
}
|
|
}
|
|
|
|
export default alt.createActions(ContainerActions);
|