diff --git a/src/datastore_mad/remotes/docker_downloader.sh b/src/datastore_mad/remotes/docker_downloader.sh index 746a776866d..4b687bcd4d7 100755 --- a/src/datastore_mad/remotes/docker_downloader.sh +++ b/src/datastore_mad/remotes/docker_downloader.sh @@ -142,9 +142,11 @@ mkdir -p $dockerdir mkdir -p $dockerdir/mnt # Check distro +if [ -z $distro ]; then distro=`docker run --rm \ -e "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" \ $docker_hub cat /etc/os-release | grep "^ID=.*\n" | cut -d= -f 2 | xargs` +fi if [ -z $distro ]; then echo "Cannot identified $docker_hub distribution" 1>&2 @@ -240,6 +242,7 @@ esac cat > $dockerfile < /etc/resolv.conf RUN rm -f /etc/ssh/ssh_host_* > /dev/null 2>&1