Skip to content

Commit

Permalink
F #4089: Add DH distro parameter and root user (#4888)
Browse files Browse the repository at this point in the history
  • Loading branch information
Christian González authored Jun 5, 2020
1 parent 63e515e commit 51edd58
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/datastore_mad/remotes/docker_downloader.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -240,6 +242,7 @@ esac

cat > $dockerfile <<EOC
FROM $docker_hub
USER root
$commands
RUN echo "#Generated by OpenNebula" > /etc/resolv.conf
RUN rm -f /etc/ssh/ssh_host_* > /dev/null 2>&1
Expand Down

0 comments on commit 51edd58

Please sign in to comment.