Add isCloudronManaged label to containers managed by cloudron

This commit is contained in:
Girish Ramakrishnan
2018-11-10 18:57:50 -08:00
parent 6ec36c9605
commit 78ac1d2a12
6 changed files with 10 additions and 2 deletions

View File

@@ -110,6 +110,7 @@ function pruneInfraImages(callback) {
function stopContainers(existingInfra, callback) {
// always stop addons to restart them on any infra change, regardless of minor or major update
if (existingInfra.version !== infra.version) {
// TODO: only nuke containers with isCloudronManaged=true
debug('stopping all containers for infra upgrade');
shell.execSync('stopContainers', 'docker ps -qa | xargs --no-run-if-empty docker stop');
shell.execSync('stopContainers', 'docker ps -qa | xargs --no-run-if-empty docker rm -f');