Skip linux-image-extra-$(uname -r) on 18.04
Seems like aforementioned package is not available on Ubuntu 18.04 (Bionic). This commit excludes that version from installation of Docker. Change-Id: Ib1864497dd19caadf9077386ce278712e4f5de8f
This commit is contained in:
parent
6d65af2900
commit
17a865e064
|
@ -49,10 +49,12 @@ function install_docker {
|
||||||
local dist_version=${os_CODENAME}
|
local dist_version=${os_CODENAME}
|
||||||
local arch=$(dpkg --print-architecture)
|
local arch=$(dpkg --print-architecture)
|
||||||
if is_ubuntu; then
|
if is_ubuntu; then
|
||||||
if uname -r | grep -q -- '-generic' && dpkg -l 'linux-image-*-generic' | grep -qE '^ii|^hi' 2>/dev/null; then
|
if [[ ${dist_version} == 'trusty' ]]; then
|
||||||
apt_get install linux-image-extra-$(uname -r) linux-image-extra-virtual
|
if uname -r | grep -q -- '-generic' && dpkg -l 'linux-image-*-generic' | grep -qE '^ii|^hi' 2>/dev/null; then
|
||||||
else
|
apt_get install linux-image-extra-$(uname -r) linux-image-extra-virtual
|
||||||
(>&2 echo "WARNING: Current kernel is not supported by the linux-image-extra-virtual package. Docker may not work.")
|
else
|
||||||
|
(>&2 echo "WARNING: Current kernel is not supported by the linux-image-extra-virtual package. Docker may not work.")
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
apt_get install apt-transport-https ca-certificates software-properties-common
|
apt_get install apt-transport-https ca-certificates software-properties-common
|
||||||
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
|
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
|
||||||
|
|
Loading…
Reference in New Issue