We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8e6bfba commit 00b9693Copy full SHA for 00b9693
src/app/CliTools/Console/Command/Docker/CleanupCommand.php
@@ -58,11 +58,7 @@ protected function cleanDockerImages()
58
{
59
$this->output->writeln('<h2>Cleanup orphaned docker images</h2>');
60
try {
61
- $command = new CommandBuilder('docker', 'images');
62
- $command
63
- ->addPipeCommand( new CommandBuilder('grep', '"<none>"') )
64
- ->addPipeCommand( new CommandBuilder('awk', '"{print \$3}"') )
65
- ->addPipeCommand( new CommandBuilder('xargs', '--no-run-if-empty docker rmi -f') );
+ $command = new CommandBuilder('docker', 'rmi $(docker images -qf "dangling=true")');
66
$command->executeInteractive();
67
68
} catch (\Exception $e) {
0 commit comments