Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2800a55776 |
@@ -33,6 +33,7 @@ composer require --dev droath/robo-docker-compose
|
|||||||
The following commands have been implemented:
|
The following commands have been implemented:
|
||||||
|
|
||||||
- docker-compose up
|
- docker-compose up
|
||||||
|
- docker-compose pull
|
||||||
- docker-compose exec
|
- docker-compose exec
|
||||||
- docker-compose down
|
- docker-compose down
|
||||||
- docker-compose start
|
- docker-compose start
|
||||||
|
|||||||
66
src/Task/Pull.php
Normal file
66
src/Task/Pull.php
Normal file
@@ -0,0 +1,66 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Droath\RoboDockerCompose\Task;
|
||||||
|
|
||||||
|
use Droath\RoboDockerCompose\DockerServicesTrait;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Define Docker compose pull command.
|
||||||
|
*/
|
||||||
|
class Pull extends Base
|
||||||
|
{
|
||||||
|
use DockerServicesTrait;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
|
protected $action = 'pull';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Pull what it can and ignores images with pull failures.
|
||||||
|
*
|
||||||
|
* @return $this
|
||||||
|
*/
|
||||||
|
public function ignoreFailures()
|
||||||
|
{
|
||||||
|
$this->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;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -31,6 +31,14 @@ trait loadTasks
|
|||||||
return $this->task(Pause::class, $pathToDockerCompose);
|
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.
|
* Docker compose start task.
|
||||||
*/
|
*/
|
||||||
@@ -54,5 +62,4 @@ trait loadTasks
|
|||||||
{
|
{
|
||||||
return $this->task(Execute::class, $pathToDockerCompose);
|
return $this->task(Execute::class, $pathToDockerCompose);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user