diff --git a/hooks/build b/hooks/build index 24b7e3c70df8d7..a98a9237bbee12 100755 --- a/hooks/build +++ b/hooks/build @@ -22,4 +22,7 @@ MY_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +# Dockerhub builds are run inside Docker container +export SKIP_IN_CONTAINER_CHECK="true" + exec "${MY_DIR}/../scripts/ci/ci_build_dockerhub.sh" diff --git a/scripts/ci/_utils.sh b/scripts/ci/_utils.sh index dfdf10fd43f8ac..974ad25131ed69 100644 --- a/scripts/ci/_utils.sh +++ b/scripts/ci/_utils.sh @@ -413,6 +413,9 @@ function check_if_coreutils_installed() { # Asserts that we are not inside of the container # function assert_not_in_container() { + if [[ ${SKIP_IN_CONTAINER_CHECK:=} == "true" ]]; then + return + fi if [[ -f /.dockerenv ]]; then echo >&2 echo >&2 "You are inside the Airflow docker container!"