diff --git a/README.md b/README.md index 196a469..7ed15f2 100644 --- a/README.md +++ b/README.md @@ -33,6 +33,7 @@ composer require --dev droath/robo-docker-compose The following commands have been implemented: - docker-compose up +- docker-compose pull - docker-compose exec - docker-compose down - docker-compose start diff --git a/src/Task/Pull.php b/src/Task/Pull.php new file mode 100644 index 0000000..de26c63 --- /dev/null +++ b/src/Task/Pull.php @@ -0,0 +1,66 @@ +option('ignore-pull-failures'); + + return $this; + } + + /** + * Pull multiple images in parallel. + * + * @return $this + */ + public function parallel() + { + $this->option('parallel'); + + return $this; + } + + /** + * Pull without printing progress information. + * + * @return $this + */ + public function quiet() + { + $this->option('quiet'); + + return $this; + } + + /** + * Also pull services declared as dependencies. + * + * @return $this + */ + public function includeDeps() + { + $this->option('include-deps'); + + return $this; + } +} diff --git a/src/Task/loadTasks.php b/src/Task/loadTasks.php index 8162800..66b33c3 100755 --- a/src/Task/loadTasks.php +++ b/src/Task/loadTasks.php @@ -31,6 +31,14 @@ trait loadTasks return $this->task(Pause::class, $pathToDockerCompose); } + /** + * Docker compose pull task. + */ + protected function taskDockerComposePull($pathToDockerCompose = null) + { + return $this->task(Pull::class, $pathToDockerCompose); + } + /** * Docker compose start task. */ @@ -54,5 +62,4 @@ trait loadTasks { return $this->task(Execute::class, $pathToDockerCompose); } - }