2018-11-23 09:50:18 +01:00
|
|
|
#! /bin/bash
|
2018-11-23 10:17:31 +01:00
|
|
|
# fail immediately on error
|
|
|
|
set -e
|
|
|
|
|
2018-11-23 09:50:18 +01:00
|
|
|
[ "$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)
|