[Dockerfile] adding execution of script/post-update, cleanup phase
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
Reference in New Issue
Block a user