Skip to content

Commit 05a5710

Browse files
authored
MNT: Check if running inside repo2docker more explicitly
.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.
1 parent ebc1276 commit 05a5710

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

.binder/postBuild

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ set -e
66
# inside a git checkout of the scikit-learn/scikit-learn repo. This script is
77
# generating notebooks from the scikit-learn python examples.
88

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

0 commit comments

Comments
 (0)