From 11a27699682579c4c097fc2f760cf81e4fab0445 Mon Sep 17 00:00:00 2001 From: Dieter Reuter Date: Thu, 5 Oct 2017 10:58:08 +0200 Subject: [PATCH] Upgrade Docker Engine to 17.09-ce (using Ubuntu Xenial .deb) Signed-off-by: Dieter Reuter --- builder/chroot-script.sh | 31 ++++++++++++------- .../spec/hypriotos-image/docker_spec.rb | 14 ++++----- versions.config | 2 +- 3 files changed, 28 insertions(+), 19 deletions(-) diff --git a/builder/chroot-script.sh b/builder/chroot-script.sh index 04c950d..dc53052 100644 --- a/builder/chroot-script.sh +++ b/builder/chroot-script.sh @@ -223,17 +223,7 @@ echo '{ } ' > /etc/docker/daemon.json -# install Docker Engine directly from GitHub releases -DOCKER_DEB="docker-engine_${DOCKER_ENGINE_VERSION}-0.debian-jessie_arm64.deb" -curl -sSL "https://github.com/DieterReuter/docker-armbuilds/releases/download/v${DOCKER_ENGINE_VERSION}/$DOCKER_DEB" \ - > "/$DOCKER_DEB" -if [ -f "/$DOCKER_DEB" ]; then - dpkg -i "/$DOCKER_DEB" || /bin/true - rm -f "/$DOCKER_DEB" - - # fix missing apt-get install dependencies - apt-get -f install -y -fi +#TODO: Install Docker CE later for Debian Jessie echo "Installing rpi-serial-console script" wget -q https://raw.githubusercontent.com/lurch/rpi-serial-console/master/rpi-serial-console -O usr/local/bin/rpi-serial-console @@ -252,6 +242,25 @@ sed -i 's/Linux 8/Linux 9/g' /etc/issue.net sed -i 's/Linux 8/Linux 9/g' /etc/motd #TODO:--- +#TODO:+++ change to Debian Stretch official repo, as soon as it's available +# install Docker CE directly from Docker APT Repo but built for Ubuntu Xenial, +# because currently it's the only available build for ARM64 +DOCKER_DEB="docker-ce_${DOCKER_ENGINE_VERSION}-0~ubuntu_arm64.deb" +curl -sSL "https://download.docker.com/linux/ubuntu/dists/xenial/pool/edge/arm64/$DOCKER_DEB" \ + > "/$DOCKER_DEB" +if [ -f "/$DOCKER_DEB" ]; then + # install some runtime requirements for Docker CE + apt-get install -y libapparmor1 libltdl7 libseccomp2 + + # install Docker CE + dpkg -i "/$DOCKER_DEB" || /bin/true + rm -f "/$DOCKER_DEB" + + # fix missing apt-get install dependencies + apt-get -f install -y +fi +#TODO:--- + # cleanup APT cache and lists apt-get clean rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* diff --git a/builder/test-integration/spec/hypriotos-image/docker_spec.rb b/builder/test-integration/spec/hypriotos-image/docker_spec.rb index a2ab464..0d42796 100644 --- a/builder/test-integration/spec/hypriotos-image/docker_spec.rb +++ b/builder/test-integration/spec/hypriotos-image/docker_spec.rb @@ -1,12 +1,12 @@ require 'spec_helper' -describe package('docker-engine') do +describe package('docker-ce') do it { should be_installed } end -describe command('dpkg -l docker-engine') do - its(:stdout) { should match /ii docker-engine/ } - its(:stdout) { should match /1.13.1-0~debian-jessie/ } +describe command('dpkg -l docker-ce') do + its(:stdout) { should match /ii docker-ce/ } + its(:stdout) { should match /17.09.0~ce-0~ubuntu/ } its(:stdout) { should match /arm64/ } its(:exit_status) { should eq 0 } end @@ -80,13 +80,13 @@ end describe command('docker -v') do - its(:stdout) { should match /Docker version 1.13.1, build/ } + its(:stdout) { should match /Docker version 17.09.0-ce, build/ } its(:exit_status) { should eq 0 } end describe command('docker version') do - its(:stdout) { should match /Client:. Version: 1.13.1. API version: 1.26/m } - its(:stdout) { should match /Server:. Version: 1.13.1. API version: 1.26/m } + its(:stdout) { should match /Client:. Version: 17.09.0-ce. API version: 1.32/m } + its(:stdout) { should match /Server:. Version: 17.09.0-ce. API version: 1.32/m } its(:exit_status) { should eq 0 } end diff --git a/versions.config b/versions.config index d38c03b..538f13a 100644 --- a/versions.config +++ b/versions.config @@ -11,7 +11,7 @@ RAW_IMAGE_CHECKSUM="2fbeb13b7b0f2308dbd0d82780b54c33003ad43d145ff08498b25fb8bbe1 export BOOTLOADER_BUILD="20171003-131045" export KERNEL_BUILD="20170303-160601" export KERNEL_VERSION="4.9.13" -export DOCKER_ENGINE_VERSION="1.13.1" +export DOCKER_ENGINE_VERSION="17.09.0~ce" export DOCKER_COMPOSE_VERSION="1.16.1" export DOCKER_MACHINE_VERSION="0.12.2" export DEVICE_INIT_VERSION="0.1.8"