diff --git a/bootstrap.sh b/bootstrap.sh index 4f37dbe..4575433 100755 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -29,10 +29,7 @@ sudo -HS bash -c "curl -RLfs https://bootstrap.pypa.io/get-pip.py | python2 && \ curl -RLfs https://bootstrap.pypa.io/get-pip.py | python3" # Docker related - -curl -fsSL https://download.docker.com/linux/$DISTRO/gpg | sudo apt-key add - && \ - sudo add-apt-repository "deb https://download.docker.com/linux/$DISTRO $SUITE stable" && \ - sudo apt-get install -y docker-ce +curl -RLSsf1 https://github.com/schtobia/bootstrap/raw/master/docker-install.sh | sudo -SH bash - # vim related pip install --user neovim && \ diff --git a/docker-install.sh b/docker-install.sh new file mode 100755 index 0000000..91f35e8 --- /dev/null +++ b/docker-install.sh @@ -0,0 +1,5 @@ +#! /bin/bash +[ "$UID" -ne 0 ] && { echo "You must run this script as root." >&2; exit 1; } +(DISTRO=$(lsb_release -is | tr '[A-Z]' '[a-z]'); curl -LSsf https://download.docker.com/linux/$DISTRO/gpg | apt-key add - && \ + add-apt-repository "deb https://download.docker.com/linux/$DISTRO $(lsb_release -cs) stable" && \ + apt-get install -y docker-ce)