From 053044a85753e09056561130b67fcfdc41e9c1eb Mon Sep 17 00:00:00 2001 From: Chao Guo Date: Mon, 26 Dec 2016 11:38:35 +0800 Subject: Improve bash command used in bifrost-base image Improve readability of dockerfile. Change-Id: I7d923bab5d493c8dfaf7aba1c7f85017ea5cf690 --- docker/bifrost/bifrost-deploy/Dockerfile.j2 | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'docker') diff --git a/docker/bifrost/bifrost-deploy/Dockerfile.j2 b/docker/bifrost/bifrost-deploy/Dockerfile.j2 index 3b5a54fb4..1f8897eb2 100644 --- a/docker/bifrost/bifrost-deploy/Dockerfile.j2 +++ b/docker/bifrost/bifrost-deploy/Dockerfile.j2 @@ -9,14 +9,14 @@ ENV container docker {% if base_distro in ['centos', 'oraclelinux', 'rhel', 'debian'] or (base_distro == 'ubuntu' and base_distro_tag == '16.04') %} -RUN bash -c ' $(cd /lib/systemd/system/sysinit.target.wants/; for i in *; do [ \"$i\" == \"systemd-tmpfiles-setup.service\" ] || rm -f $i; done); \ -rm -f /lib/systemd/system/multi-user.target.wants/*;\ -rm -f /etc/systemd/system/*.wants/*;\ -rm -f /lib/systemd/system/local-fs.target.wants/*; \ -rm -f /lib/systemd/system/sockets.target.wants/*udev*; \ -rm -f /lib/systemd/system/sockets.target.wants/*initctl*; \ -rm -f /lib/systemd/system/basic.target.wants/*;\ -rm -f /lib/systemd/system/anaconda.target.wants/*;' +RUN rm -f $(find /lib/systemd/system/sysinit.target.wants/ ! -name systemd-tmpfiles-setup.service -type l); \ + rm -f /lib/systemd/system/multi-user.target.wants/*; \ + rm -f /etc/systemd/system/*.wants/*; \ + rm -f /lib/systemd/system/local-fs.target.wants/*; \ + rm -f /lib/systemd/system/sockets.target.wants/*udev*; \ + rm -f /lib/systemd/system/sockets.target.wants/*initctl*; \ + rm -f /lib/systemd/system/basic.target.wants/*; \ + rm -f /lib/systemd/system/anaconda.target.wants/*; {% elif base_distro in ['ubuntu'] %} -- cgit v1.2.3