1
0
mirror of https://github.com/docker/docs.git synced 2026-11-03 11:12:47 +03:00
Files
docs/src/actions/ContainerActions.js
2015-05-10 16:42:57 -07:00

41 lines
792 B
JavaScript

import alt from '../alt';
import dockerUtil from '../utils/DockerUtil';
class ContainerServerActions {
start (name) {
this.dispatch({name});
dockerUtil.start(name);
}
destroy (name) {
this.dispatch({name});
dockerUtil.destroy(name);
}
// TODO: don't require all container data for this method
rename (name, newName) {
this.dispatch({name, newName});
dockerUtil.rename(name, newName);
}
stop (name) {
this.dispatch({name});
dockerUtil.stop(name);
}
update (name, container) {
this.dispatch({container});
dockerUtil.updateContainer(name, container);
}
clearPending () {
this.dispatch();
}
run (name, repo, tag) {
dockerUtil.run(name, repo, tag);
}
}
export default alt.createActions(ContainerServerActions);