diff --git a/builder/chroot-script.sh b/builder/chroot-script.sh index ca1d251..1cde6e9 100644 --- a/builder/chroot-script.sh +++ b/builder/chroot-script.sh @@ -186,13 +186,13 @@ apt-get install -y \ # install hypriot packages for docker-tools apt-get install -y \ - "docker-hypriot=${DOCKER_ENGINE_VERSION}" \ "docker-compose=${DOCKER_COMPOSE_VERSION}" \ "docker-machine=${DOCKER_MACHINE_VERSION}" \ "device-init=${DEVICE_INIT_VERSION}" -# enable Docker systemd service -systemctl enable docker +# set up Docker APT repository and install docker-engine package +#TODO: pin package version to ${DOCKER_ENGINE_VERSION} +curl -sSL https://test.docker.com | /bin/sh echo "Installing rpi-serial-console script" diff --git a/builder/files/etc/apt/perferences.d/hypriot b/builder/files/etc/apt/preferences.d/hypriot similarity index 100% rename from builder/files/etc/apt/perferences.d/hypriot rename to builder/files/etc/apt/preferences.d/hypriot diff --git a/builder/files/etc/apt/perferences.d/raspberrypi b/builder/files/etc/apt/preferences.d/raspberrypi similarity index 100% rename from builder/files/etc/apt/perferences.d/raspberrypi rename to builder/files/etc/apt/preferences.d/raspberrypi diff --git a/builder/files/etc/systemd/system/docker.service b/builder/files/etc/systemd/system/docker.service deleted file mode 100644 index 10eb700..0000000 --- a/builder/files/etc/systemd/system/docker.service +++ /dev/null @@ -1,22 +0,0 @@ -[Unit] -Description=Docker Application Container Engine -Documentation=https://docs.docker.com -After=network.target docker.socket -Requires=docker.socket - -[Service] -Type=notify -# the default is not to use systemd for cgroups because the delegate issues still -# exists and systemd currently does not support the cgroup feature set required -# for containers run by docker -ExecStart=/usr/bin/docker daemon -H fd:// --storage-driver overlay -MountFlags=slave -LimitNOFILE=1048576 -LimitNPROC=1048576 -LimitCORE=infinity -TimeoutStartSec=0 -# set delegate yes so that systemd does not reset the cgroups of docker containers -Delegate=yes - -[Install] -WantedBy=multi-user.target diff --git a/builder/test-integration/spec/hypriotos-image/docker_spec.rb b/builder/test-integration/spec/hypriotos-image/docker_spec.rb index e562666..08aeb83 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-hypriot') do +describe package('docker-engine') do it { should be_installed } end -describe command('dpkg -l docker-hypriot') do - its(:stdout) { should match /ii docker-hypriot/ } - its(:stdout) { should match /1.11.1-1/ } +describe command('dpkg -l docker-engine') do + its(:stdout) { should match /ii docker-engine/ } + its(:stdout) { should match /1.12.1~rc1-0~jessie/ } its(:exit_status) { should eq 0 } end @@ -56,7 +56,7 @@ it { should be_file } it { should be_mode 644 } it { should be_owned_by 'root' } - its(:content) { should match /ExecStart=\/usr\/bin\/docker daemon -H fd:\/\/ --storage-driver overlay/ } + its(:content) { should match /ExecStart=\/usr\/bin\/dockerd --storage-driver overlay -H fd:\/\// } end describe file('/var/run/docker.sock') do @@ -92,13 +92,13 @@ end describe command('docker -v') do - its(:stdout) { should match /Docker version 1.11.1, build/ } + its(:stdout) { should match /Docker version 1.12.1-rc1, build/ } its(:exit_status) { should eq 0 } end describe command('docker version') do - its(:stdout) { should match /Client:. Version: 1.11.1. API version: 1.23/m } - its(:stdout) { should match /Server:. Version: 1.11.1. API version: 1.23/m } + its(:stdout) { should match /Client:. Version: 1.12.1-rc1. API version: 1.24/m } + its(:stdout) { should match /Server:. Version: 1.12.1-rc1. API version: 1.24/m } its(:exit_status) { should eq 0 } end diff --git a/builder/test-integration/spec/hypriotos-image/raspberrypi-list_spec.rb b/builder/test-integration/spec/hypriotos-image/raspberrypi-list_spec.rb new file mode 100644 index 0000000..0b1c527 --- /dev/null +++ b/builder/test-integration/spec/hypriotos-image/raspberrypi-list_spec.rb @@ -0,0 +1,8 @@ +require 'spec_helper' + +describe file('/etc/apt/sources.list.d/raspberrypi.list') do + it { should be_file } + it { should be_mode 644 } + it { should be_owned_by 'root' } + it { should contain 'deb http://archive.raspberrypi.org/debian/ jessie main' } +end diff --git a/versions.config b/versions.config index 8812348..c22b5cf 100644 --- a/versions.config +++ b/versions.config @@ -10,7 +10,7 @@ RAW_IMAGE_CHECKSUM="2fbeb13b7b0f2308dbd0d82780b54c33003ad43d145ff08498b25fb8bbe1 # specific versions of kernel/firmware and docker tools export KERNEL_BUILD="20160725-081443" export KERNEL_VERSION="4.4.15" -export DOCKER_ENGINE_VERSION="1.11.1-1" +export DOCKER_ENGINE_VERSION="1.12.1~rc1-0~jessie" export DOCKER_COMPOSE_VERSION="1.8.0-61" export DOCKER_MACHINE_VERSION="0.8.0-30" export DEVICE_INIT_VERSION="0.1.8"