Last active
August 6, 2016 15:38
-
-
Save DieterReuter/14271bc70727feed76e96381f188b4f2 to your computer and use it in GitHub Desktop.
Upgrade HypriotOS 0.8.3 with Docker 1.12.0 and compile Docker 1.12.0 (plus ARM patch)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e | |
set -x | |
if [ ! -f ~/docker-engine_1.12.0-0~jessie_armhf-armv6.deb ]; then | |
echo "...ERROR:" | |
echo " Package ~/docker-engine_1.12.0-0~jessie_armhf-armv6.deb missing" | |
exit 1 | |
fi | |
#---update Docker package | |
# create systemd unit file with overlay2 storage option | |
sudo mkdir -p /etc/systemd/system | |
curl -sSL https://raw.githubusercontent.com/docker/docker/master/contrib/init/systemd/docker.service | sudo tee /etc/systemd/system/docker.service >/dev/null | |
sudo sed -i 's/dockerd/dockerd --storage-driver overlay2/' /etc/systemd/system/docker.service | |
# update apt infos | |
sudo apt-get update | |
# remove old docker-hypriot package | |
sudo apt-get purge -y docker-hypriot | |
# install new docker-engine package | |
sudo dpkg -i docker-engine_1.12.0-0~jessie_armhf-armv6.deb | |
docker version | |
docker info | |
#---compile Docker 1.12.0 on ARM | |
# set git username and email address | |
git config --global user.email "[email protected]" | |
git config --global user.name "Dieter Reuter" | |
# install development dependencies | |
sudo apt-get install -y make dphys-swapfile | |
# clone Docker repo | |
git clone https://github.com/docker/docker.git | |
cd docker | |
git checkout v1.12.0 | |
# cherry pick the PR#25192 (ARM fix) | |
git fetch origin pull/25192/head:fix-manpages-on-arm | |
git cherry-pick fix-manpages-on-arm | |
# compile Docker | |
echo "...setup complete" | |
echo "...compile Docker 1.12.0 (incl. PR#25192)" | |
echo " time make deb" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Just run the script on a freshly flashed HypriotOS:
httpredir.debian.org
host ip address/etc/hosts
file---or---
---or---