From 587b8daabcc26dd1b63ba3054520fd00717a9b68 Mon Sep 17 00:00:00 2001 From: Tobias Schmidl Date: Fri, 23 Nov 2018 09:50:18 +0100 Subject: [PATCH] added docker-install.sh --- bootstrap.sh | 5 +---- docker-install.sh | 5 +++++ 2 files changed, 6 insertions(+), 4 deletions(-) create mode 100755 docker-install.sh 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)