diff options
| author | Chao Guo <guochao@winhong.com> | 2016-12-26 11:38:35 +0800 |
|---|---|---|
| committer | Chao Guo <guochao@winhong.com> | 2016-12-26 11:38:35 +0800 |
| commit | 053044a85753e09056561130b67fcfdc41e9c1eb (patch) | |
| tree | a00d7a8bb33f325c74eefc8c1cc91c3424eb4026 /docker/bifrost | |
| parent | b25bd5c04b6e849183a4257630dea86e0944b022 (diff) | |
| download | kolla-053044a85753e09056561130b67fcfdc41e9c1eb.tar.gz kolla-053044a85753e09056561130b67fcfdc41e9c1eb.zip | |
Improve bash command used in bifrost-base image
Improve readability of dockerfile.
Change-Id: I7d923bab5d493c8dfaf7aba1c7f85017ea5cf690
Diffstat (limited to 'docker/bifrost')
| -rw-r--r-- | docker/bifrost/bifrost-deploy/Dockerfile.j2 | 16 |
1 files changed, 8 insertions, 8 deletions
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'] %} |
