Skip to content

Commit

Permalink
MNT: Check if running inside repo2docker more explicitly
Browse files Browse the repository at this point in the history
.dockerenv is only supported in the old docker based builder, which has been deprecated for a few years now. It isn't supported by buildkit / docker buildx, which repo2docker *just* moved to (jupyterhub/repo2docker#1402). Using buikdkit gives us faster and more reliable builds.

This converts the test for checking if the script is being run by repo2docker to check for an env var that repo2docker sets instead.
  • Loading branch information
yuvipanda authored Feb 14, 2025
1 parent ebc1276 commit 05a5710
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion .binder/postBuild
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ set -e
# inside a git checkout of the scikit-learn/scikit-learn repo. This script is
# generating notebooks from the scikit-learn python examples.

if [[ ! -f /.dockerenv ]]; then
if [[ -z "${REPO_DIR}" ]];; then
echo "This script was written for repo2docker and is supposed to run inside a docker container."
echo "Exiting because this script can delete data if run outside of a docker container."
exit 1
Expand Down

0 comments on commit 05a5710

Please sign in to comment.