mirror of
https://github.com/jupyter/docker-stacks.git
synced 2025-10-15 05:52:57 +00:00
Remove packages file from image when using Source-to-Image before doing a build, rather than after.
This commit is contained in:
@@ -4,6 +4,16 @@ set -x
|
|||||||
|
|
||||||
set -eo pipefail
|
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.
|
# Copy injected files to correct place in 'work' directory.
|
||||||
|
|
||||||
cp -Rf /tmp/src/. /home/$NB_USER/work
|
cp -Rf /tmp/src/. /home/$NB_USER/work
|
||||||
@@ -25,13 +35,6 @@ else
|
|||||||
fi
|
fi
|
||||||
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
|
# Fix up permissions on home directory and Python installation so that
|
||||||
# everything is still writable by 'users' group.
|
# everything is still writable by 'users' group.
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user