Use latest docker ce in gate
Change-Id: I1cb6189cec2704edfc461538ef593d38e81ca343
This commit is contained in:
parent
ccc1911ad8
commit
cf58a12fb0
@ -3,22 +3,6 @@
|
||||
set -o xtrace
|
||||
set -o errexit
|
||||
|
||||
function add_key {
|
||||
local counter=0
|
||||
|
||||
while :; do
|
||||
if [[ "${counter}" -gt 5 ]]; then
|
||||
echo "Failed to add Docker keyring"
|
||||
exit 1
|
||||
fi
|
||||
# hkp://pool.sks-keyservers.net intermittently doesn't have the correct
|
||||
# keyring. p80 is what the docker script pulls from and what we should
|
||||
# use for reliability too
|
||||
sudo apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D && break || :
|
||||
sleep 5
|
||||
done
|
||||
}
|
||||
|
||||
function setup_disk {
|
||||
if [ ! -f /swapfile ]; then
|
||||
sudo swapoff -a
|
||||
@ -54,10 +38,12 @@ export PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
|
||||
source /etc/lsb-release
|
||||
|
||||
# Setup Docker repo and add signing key
|
||||
echo "deb http://apt.dockerproject.org/repo ubuntu-${DISTRIB_CODENAME} main" | sudo tee /etc/apt/sources.list.d/docker.list
|
||||
add_key
|
||||
sudo apt-get update
|
||||
sudo apt-get -y install --no-install-recommends 'docker-engine=1.13.1*'
|
||||
sudo apt-get -y install apt-transport-https
|
||||
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
|
||||
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
|
||||
sudo apt-get update
|
||||
sudo apt-get -y install --no-install-recommends docker-ce
|
||||
|
||||
sudo service docker stop
|
||||
if [[ ${DISTRIB_CODENAME} == "trusty" ]]; then
|
||||
|
@ -35,16 +35,11 @@ function setup_disk {
|
||||
# (SamYaple)TODO: Remove the path overriding
|
||||
export PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
|
||||
|
||||
sudo tee /etc/yum.repos.d/docker.repo << EOF
|
||||
[docker]
|
||||
name=Docker Main Repository
|
||||
baseurl=https://yum.dockerproject.org/repo/main/centos/7
|
||||
enabled=1
|
||||
gpgcheck=1
|
||||
gpgkey=https://yum.dockerproject.org/gpg
|
||||
EOF
|
||||
sudo yum-config-manager \
|
||||
--add-repo \
|
||||
https://download.docker.com/linux/centos/docker-ce.repo
|
||||
|
||||
sudo yum -y install libffi-devel openssl-devel docker-engine{,-selinux}-1.13.1 btrfs-progs
|
||||
sudo yum -y install libffi-devel openssl-devel docker-ce btrfs-progs
|
||||
|
||||
# Disable SELinux
|
||||
setenforce 0
|
||||
|
Loading…
Reference in New Issue
Block a user