From 8710d447d3af4cb7330e79c232925358b8c2a302 Mon Sep 17 00:00:00 2001 From: "Liu, Jianjun" Date: Wed, 24 Jul 2019 01:03:34 +0000 Subject: [PATCH] no swupd state data removing in 1st build stage During the 1st stage build of multi-stage build, when run swupd os-install, the swupd state data are saved to /swupd_state, which will not be copied to the target. So we do not need to remove swupd state data. Signed-off-by: Liu, Jianjun --- cassandra/Dockerfile | 3 +-- cgit/Dockerfile | 3 +-- httpd/Dockerfile | 3 +-- mariadb/Dockerfile | 3 +-- memcached/Dockerfile | 3 +-- nginx/Dockerfile | 3 +-- os-core/Dockerfile | 3 +-- redis/Dockerfile | 3 +-- 8 files changed, 8 insertions(+), 16 deletions(-) diff --git a/cassandra/Dockerfile b/cassandra/Dockerfile index 22c70bf..237ae2a 100644 --- a/cassandra/Dockerfile +++ b/cassandra/Dockerfile @@ -15,8 +15,7 @@ RUN source /os-release && \ mkdir /install_root \ && swupd os-install -V ${VERSION_ID} \ --path /install_root --statedir /swupd-state \ - --bundles=cassandra,python2-basic,which,su-exec --no-boot-update \ - && rm -rf /install_root/var/lib/swupd/* + --bundles=cassandra,python2-basic,which,su-exec --no-boot-update # For some Host OS configuration with redirect_dir on, # extra data are saved on the upper layer when the same diff --git a/cgit/Dockerfile b/cgit/Dockerfile index cca5bd1..9a3796d 100644 --- a/cgit/Dockerfile +++ b/cgit/Dockerfile @@ -15,8 +15,7 @@ RUN source /os-release && \ mkdir /install_root \ && swupd os-install -V ${VERSION_ID} \ --path /install_root --statedir /swupd-state \ - --bundles=sudo,curl,scm-server,httpd --no-boot-update \ - && rm -rf /install_root/var/lib/swupd/* + --bundles=sudo,curl,scm-server,httpd --no-boot-update # For some Host OS configuration with redirect_dir on, # extra data are saved on the upper layer when the same diff --git a/httpd/Dockerfile b/httpd/Dockerfile index a57b447..6b2a6bf 100644 --- a/httpd/Dockerfile +++ b/httpd/Dockerfile @@ -15,8 +15,7 @@ RUN source /os-release && \ mkdir /install_root \ && swupd os-install -V ${VERSION_ID} \ --path /install_root --statedir /swupd-state \ - --bundles=httpd --no-boot-update \ - && rm -rf /install_root/var/lib/swupd/* + --bundles=httpd --no-boot-update # For some Host OS configuration with redirect_dir on, # extra data are saved on the upper layer when the same diff --git a/mariadb/Dockerfile b/mariadb/Dockerfile index 79476ba..49a5d75 100644 --- a/mariadb/Dockerfile +++ b/mariadb/Dockerfile @@ -17,8 +17,7 @@ RUN source /os-release && \ mkdir /install_root \ && swupd os-install -V ${VERSION_ID} \ --path /install_root --statedir /swupd-state \ - --bundles=mariadb,su-exec --no-boot-update \ - && rm -rf /install_root/var/lib/swupd/* + --bundles=mariadb,su-exec --no-boot-update # For some Host OS configuration with redirect_dir on, # extra data are saved on the upper layer when the same diff --git a/memcached/Dockerfile b/memcached/Dockerfile index 96213bc..bdc02bb 100644 --- a/memcached/Dockerfile +++ b/memcached/Dockerfile @@ -15,8 +15,7 @@ RUN source /os-release && \ mkdir /install_root \ && swupd os-install -V ${VERSION_ID} \ --path /install_root --statedir /swupd-state \ - --bundles=memcached,su-exec --no-boot-update \ - && rm -rf /install_root/var/lib/swupd/* + --bundles=memcached,su-exec --no-boot-update # For some Host OS configuration with redirect_dir on, # extra data are saved on the upper layer when the same diff --git a/nginx/Dockerfile b/nginx/Dockerfile index 19e899e..7908166 100644 --- a/nginx/Dockerfile +++ b/nginx/Dockerfile @@ -15,8 +15,7 @@ RUN source /os-release && \ mkdir /install_root \ && swupd os-install -V ${VERSION_ID} \ --path /install_root --statedir /swupd-state \ - --bundles=nginx --no-scripts \ - && rm -rf /install_root/var/lib/swupd/* + --bundles=nginx --no-scripts # For some Host OS configuration with redirect_dir on, # extra data are saved on the upper layer when the same diff --git a/os-core/Dockerfile b/os-core/Dockerfile index 8bcc35d..532b958 100644 --- a/os-core/Dockerfile +++ b/os-core/Dockerfile @@ -11,8 +11,7 @@ RUN source /usr/lib/os-release \ && mkdir /install_root \ && swupd os-install -V ${VERSION_ID} \ --path /install_root --statedir /swupd-state \ - --bundles=os-core --no-boot-update \ - && rm -rf /install_root/var/lib/swupd/* + --bundles=os-core --no-boot-update FROM scratch COPY --from=builder /install_root / diff --git a/redis/Dockerfile b/redis/Dockerfile index 9b4c276..af977cb 100644 --- a/redis/Dockerfile +++ b/redis/Dockerfile @@ -15,8 +15,7 @@ RUN source /os-release && \ mkdir /install_root \ && swupd os-install -V ${VERSION_ID} \ --path /install_root --statedir /swupd-state \ - --bundles=redis-native,findutils,su-exec --no-boot-update \ - && rm -rf /install_root/var/lib/swupd/* + --bundles=redis-native,findutils,su-exec --no-boot-update # For some Host OS configuration with redirect_dir on, # extra data are saved on the upper layer when the same