Skip to content

Commit 845c4c1

Browse files
committed
Prevent anaconda copy log
1 parent 8af51c9 commit 845c4c1

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

docker/centos-7.ks

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,14 @@ yum-plugin-ovl
6161

6262
%end
6363

64+
%pre
65+
# Pre configure tasks for Docker
66+
67+
# Don't add the anaconda build logs to the image
68+
# see /usr/share/anaconda/post-scripts/99-copy-logs.ks
69+
touch /tmp/NOSAVE_LOGS
70+
%end
71+
6472
%post --log=/anaconda-post.log
6573
# Post configure tasks for Docker
6674

@@ -103,8 +111,6 @@ echo 'container' > /etc/yum/vars/infra
103111
## Remove some things we don't need
104112
rm -rf /var/cache/yum/x86_64
105113
rm -f /tmp/ks-script*
106-
rm -rf /var/log/anaconda
107-
rm -rf /tmp/ks-script*
108114
rm -rf /etc/sysconfig/network-scripts/ifcfg-*
109115
# do we really need a hardware database in a container?
110116
rm -rf /etc/udev/hwdb.bin

0 commit comments

Comments
 (0)