fix cleanup images for databases
This commit is contained in:
parent
16a5c601e3
commit
7d1179e7c8
1 changed files with 13 additions and 3 deletions
|
|
@ -69,11 +69,21 @@ public function handle()
|
|||
}
|
||||
if ($this->deleteConfigurations) {
|
||||
$this->resource?->delete_configurations();
|
||||
ray('Iam am running now, Configurations should disapear right?');
|
||||
}
|
||||
|
||||
$server = data_get($this->resource, 'server');
|
||||
if ($this->deleteImages && $server) {
|
||||
CleanupDocker::run($server, true); //this is run for DBs but it does not work for DBs
|
||||
$isDatabase = $this->resource instanceof StandalonePostgresql
|
||||
|| $this->resource instanceof StandaloneRedis
|
||||
|| $this->resource instanceof StandaloneMongodb
|
||||
|| $this->resource instanceof StandaloneMysql
|
||||
|| $this->resource instanceof StandaloneMariadb
|
||||
|| $this->resource instanceof StandaloneKeydb
|
||||
|| $this->resource instanceof StandaloneDragonfly
|
||||
|| $this->resource instanceof StandaloneClickhouse;
|
||||
$server = data_get($this->resource, 'server') ?? data_get($this->resource, 'destination.server');
|
||||
if (($this->deleteImages || $isDatabase) && $server) {
|
||||
CleanupDocker::run($server, true);
|
||||
ray('I am running now, images should disappear right?');
|
||||
}
|
||||
|
||||
if ($this->deleteConnectedNetworks) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue