Skip to content

Commit

Permalink
Merge pull request #10 from DieterReuter/upgrade-docker-ce-17.09-from…
Browse files Browse the repository at this point in the history
…-ubuntu

Upgrade Docker Engine to 17.09-ce (using Ubuntu Xenial .deb)
  • Loading branch information
DieterReuter committed Oct 5, 2017
2 parents ab2baa0 + 11a2769 commit 48571bc
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 19 deletions.
31 changes: 20 additions & 11 deletions builder/chroot-script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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/*
Expand Down
14 changes: 7 additions & 7 deletions builder/test-integration/spec/hypriotos-image/docker_spec.rb
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion versions.config
Original file line number Diff line number Diff line change
Expand Up @@ -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"

0 comments on commit 48571bc

Please sign in to comment.