2 namespace Robo\Task\Docker;
5 * Commits docker container to an image
8 * $this->taskDockerCommit($containerId)
9 * ->name('my/database')
12 * // alternatively you can take the result from DockerRun task:
14 * $result = $this->taskDockerRun('db')
15 * ->exec('./prepare_database.sh')
18 * $task->dockerCommit($result)
19 * ->name('my/database')
23 class Commit extends Base
28 protected $command = "docker commit";
41 * @param string|\Robo\Task\Docker\Result $cidOrResult
43 public function __construct($cidOrResult)
45 $this->cid = $cidOrResult instanceof Result ? $cidOrResult->getCid() : $cidOrResult;
51 public function getCommand()
53 return $this->command . ' ' . $this->cid . ' ' . $this->name . ' ' . $this->arguments;
61 public function name($name)