From 16e92631c2ef0f28c84f3a63ba1003a1f26f540c Mon Sep 17 00:00:00 2001 From: Valentin Lab Date: Wed, 28 Nov 2018 19:06:11 +0100 Subject: [PATCH] fix: [odoo-tecnativa] avoid leaking stopped containers --- odoo-tecnativa/actions/load | 4 ++-- odoo-tecnativa/actions/save | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/odoo-tecnativa/actions/load b/odoo-tecnativa/actions/load index 87d6094..caa8927 100755 --- a/odoo-tecnativa/actions/load +++ b/odoo-tecnativa/actions/load @@ -88,7 +88,7 @@ read-0 container_network container_ip < <(get_container_network_ip "$container") DEFAULT_CURL_IMAGE=${DEFAULT_CURL_IMAGE:-docker.0k.io/curl} -debug docker run --network "$container_network" \ +debug docker run --rm --network "$container_network" \ "-v" "$host_path:/tmp/work" \ "$DEFAULT_CURL_IMAGE" \ -sS \ @@ -97,7 +97,7 @@ debug docker run --network "$container_network" \ -F "backup_file=@/tmp/work/${source}" \ -F "name=${dbname}" \ http://${container_ip}:8069/web/database/restore -docker run --network "$container_network" \ +docker run --rm --network "$container_network" \ "-v" "$host_path:/tmp/work" \ "$DEFAULT_CURL_IMAGE" \ -sS \ diff --git a/odoo-tecnativa/actions/save b/odoo-tecnativa/actions/save index bbeb2c5..4625eb5 100755 --- a/odoo-tecnativa/actions/save +++ b/odoo-tecnativa/actions/save @@ -92,7 +92,7 @@ read-0 container_network container_ip < <(get_container_network_ip "$container") DEFAULT_CURL_IMAGE=${DEFAULT_CURL_IMAGE:-docker.0k.io/curl} -debug docker run --network "$container_network" \ +debug docker run --rm --network "$container_network" \ "-v" "$host_path:/tmp/work" \ "$DEFAULT_CURL_IMAGE" \ -X POST \ @@ -102,7 +102,7 @@ debug docker run --network "$container_network" \ -o "/tmp/work/$basename" \ http://${container_ip}:8069/web/database/backup -docker run --network "$container_network" \ +docker run --rm --network "$container_network" \ "-v" "$host_path:/tmp/work" \ "$DEFAULT_CURL_IMAGE" \ -sS \