[Dockerfile] adding execution of script/post-update, cleanup phase

This commit is contained in:
mudler
2015-06-26 13:47:17 +02:00
parent da5c2d5c20
commit b7314075e5
2 changed files with 25 additions and 0 deletions
+3
View File
@@ -27,3 +27,6 @@ RUN /bin/bash /sabayon-configuration-build.sh && rm -rf /sabayon-configuration-b
# Perform before-upgrade tasks (mirror sorting, updating repository db, removing portage and keeping profiles and metadata)
RUN mv /etc/entropy/repositories.conf.d/entropy_sabayonlinux.org.example /etc/entropy/repositories.conf.d/entropy_sabayonlinux.org && equo up && equo repo mirrorsort sabayonlinux.org && cd /usr/portage/;ls | grep -v 'profiles' | grep -v 'metadata' | xargs rm -rf
# Cleanup and applying configs
ADD ./script/post-update.sh /post-update.sh
RUN /bin/bash /post-update.sh && rm -rf /post-update.sh
+22
View File
@@ -0,0 +1,22 @@
#!/bin/bash
# Remove scripts
rm -rf /equo-rescue-generate.exp
rm -rf /equo.sql
rm -rf /generate-equo-db.sh
rm -rf /post-upgrade.sh
rm -rf /sabayon-configuration-build.sh
rm -rf /sabayon-configuration.sh
rm -rf /post-upgrade.sh
# Cleaning portage metadata cache
rm -rf /usr/portage/metadata/md5-cache/*
rm -rf /var/log/emerge/*
rm -rf /var/log/entropy/*
rm -rf /root/* /root/.*
rm -rf /etc/zsh
rm -rf /post-update.sh
# Writing package list file
equo q list installed -qv > /etc/sabayon-pkglist