Update Docker DIB elements for usage with Debian-based images

Change-Id: I319c28b5314f9d8ee070a0cafe10968851adf64c
This commit is contained in:
Alexey Deryugin 2015-05-27 19:49:30 +03:00
parent 3f06af663d
commit 0661ee3e30
2 changed files with 38 additions and 6 deletions

View File

@ -2,7 +2,22 @@
set -eu
if [ -e /etc/lsb-release ]; then
os=$(uname)
dist_name='Unknown'
if [ "${os}" = "Linux" ] ; then
if [ -f /etc/redhat-release ] ; then
dist_name=$(cat /etc/redhat-release |sed s/\ release.*//)
elif [ -f /etc/SuSE-release ] ; then
dist_name='SuSe'
elif [ -f /etc/lsb-release ]; then
dist=$(cat /etc/lsb-release | grep '^DISTRIB_ID' | awk -F= '{ print $2 }')
fi
fi
dist_name=$(lowercase $dist_name)
if [ "${dist_name}" == 'ubuntu' ]; then
if [ -e /usr/lib/apt/methods/https ]; then
apt-get update
apt-get install apt-transport-https
@ -12,5 +27,6 @@ if [ -e /etc/lsb-release ]; then
apt-get update
apt-get -y install lxc-docker=1.6.2
else
yum -y install docker
fi
install-packages curl
curl -sSL https://get.docker.com/ | sh
fi

View File

@ -2,7 +2,22 @@
set -eu
if [ -e /etc/lsb-release ]; then
os=$(uname)
dist_name='Unknown'
if [ "${os}" = "Linux" ] ; then
if [ -f /etc/redhat-release ] ; then
dist_name=$(cat /etc/redhat-release |sed s/\ release.*//)
elif [ -f /etc/SuSE-release ] ; then
dist_name='SuSe'
elif [ -f /etc/lsb-release ]; then
dist=$(cat /etc/lsb-release | grep '^DISTRIB_ID' | awk -F= '{ print $2 }')
fi
fi
dist_name=$(lowercase $dist_name)
if [ "${dist_name}" == 'ubuntu' ]; then
if [ -e /usr/lib/apt/methods/https ]; then
apt-get update
apt-get install apt-transport-https
@ -12,5 +27,6 @@ if [ -e /etc/lsb-release ]; then
apt-get update
apt-get -y install lxc-docker=1.6.2
else
yum -y install docker
fi
install-packages curl
curl -sSL https://get.docker.com/ | sh
fi