Commit f0cdbd53 authored by Graham Dumpleton's avatar Graham Dumpleton

Remove packages file from image when using Source-to-Image before doing a build, rather than after.

parent 52fba596
......@@ -4,6 +4,16 @@ set -x
set -eo pipefail
# Remove any 'environment.yml' or 'requirements.txt' files which may
# have been carried over from the base image so we don't reinstall
# packages which have already been installed. This could occur where
# an S2I build was used to create a new base image with pre-installed
# Python packages, with the new image then subsequently being used as a
# S2I builder base image.
rm -f /home/$NB_USER/work/environment.yml
rm -f /home/$NB_USER/work/requirements.txt
# Copy injected files to correct place in 'work' directory.
cp -Rf /tmp/src/. /home/$NB_USER/work
......@@ -25,13 +35,6 @@ else
fi
fi
# Remove any 'environment.yml' or 'requirements.txt' file when done in
# case we are producing an image which will in turn be used as an S2I
# builder image.
rm -f /home/$NB_USER/work/environment.yml
rm -f /home/$NB_USER/work/requirements.txt
# Fix up permissions on home directory and Python installation so that
# everything is still writable by 'users' group.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment