├── 001-fix-docker-machine-1.8.0-create-for-arm ├── README.md └── apply-fix-001.sh ├── 002-fix-install-docker-on-chip-computer ├── README.md └── apply-fix-002.sh ├── 003-fix-install-docker-on-clearfog-pro ├── README.md └── apply-fix-003.sh ├── LICENSE └── README.md /001-fix-docker-machine-1.8.0-create-for-arm/README.md: -------------------------------------------------------------------------------- 1 | # `001-fix` for Docker Machine 1.8.0 2 | 3 | 4 | ## Affected OSes 5 | 6 | * HypriotOS 1.0.0 7 | * Raspbian Jessie & Raspbian Jessie LITE 2016-05-10 8 | * Raspbian Jessie & Raspbian Jessie LITE 2016-05-27 9 | 10 | 11 | ## Issue 12 | 13 | When using Docker Machine 1.8.0 to create a Docker Engine on the affected target OSes you run into errors which cannot be resolved easily. 14 | 15 | 16 | ## Applying the hotfix 17 | 18 | Apply the fix script on the affected OSes before running a `docker-machine create ...` command. 19 | 20 | You can either run the fix script directly on the OS, so you have to login and run the script: 21 | ``` 22 | curl -sSL https://github.com/DieterReuter/arm-docker-fixes/raw/master/001-fix-docker-machine-1.8.0-create-for-arm/apply-fix-001.sh | bash 23 | ``` 24 | 25 | Or you can just use `ssh` from a Mac or a Linux machine: 26 | 27 | *for HypriotOS use:* 28 | ``` 29 | ssh pirate@192.168.2.104 "curl -sSL https://github.com/DieterReuter/arm-docker-fixes/raw/master/001-fix-docker-machine-1.8.0-create-for-arm/apply-fix-001.sh | bash" 30 | ``` 31 | *for Raspbian use:* 32 | ``` 33 | ssh pi@192.168.2.104 "curl -sSL https://github.com/DieterReuter/arm-docker-fixes/raw/master/001-fix-docker-machine-1.8.0-create-for-arm/apply-fix-001.sh | bash" 34 | ``` 35 | 36 | ## Use Docker Machine with your remote Raspberry Pi 37 | With this command you can now easily create and attach a new Docker Engine on your Raspberry Pi, then you can control it via the Docker Machine CLI from your Mac or Linux machine. 38 | 39 | *for HypriotOS use:* 40 | ``` 41 | #!/bin/sh 42 | set -e 43 | 44 | # access the Raspberry Pi running HypriotOS 45 | IPADDRESS=192.168.2.104 46 | PI_USERNAME=pirate 47 | PI_PASSWORD=hypriot 48 | 49 | # deploy a Docker 1.12.1 50 | docker-machine create \ 51 | --driver=generic \ 52 | --engine-storage-driver=overlay \ 53 | --generic-ip-address=$IPADDRESS \ 54 | --generic-ssh-user=$PI_USERNAME \ 55 | pi 56 | ``` 57 | *for Raspbian use:* 58 | ``` 59 | #!/bin/sh 60 | set -e 61 | 62 | # access the Raspberry Pi running Raspbian/Jessie 63 | IPADDRESS=192.168.2.104 64 | PI_USERNAME=pi 65 | PI_PASSWORD=raspberry 66 | 67 | # deploy a Docker 1.12.1 68 | docker-machine create \ 69 | --driver=generic \ 70 | --engine-storage-driver=overlay \ 71 | --generic-ip-address=$IPADDRESS \ 72 | --generic-ssh-user=$PI_USERNAME \ 73 | pi 74 | ``` 75 | 76 | 77 | ## Acknowledgements 78 | 79 | If the fix works for you, please tweet me a success message on Twitter, if it doesn't please feel free to open an issue here - or better try to resolve the issue and file a PR. ;-) 80 | 81 | Cheers,
82 | Dieter [@Quintus23M](https://twitter.com/Quintus23M) 83 | -------------------------------------------------------------------------------- /001-fix-docker-machine-1.8.0-create-for-arm/apply-fix-001.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | 4 | if [[ ! -f "/etc/os-release" ]]; then 5 | echo "ERROR: can't determine OS type" 6 | exit 1 7 | fi 8 | 9 | # read os-release infos 10 | set +e; . /etc/os-release 2>/dev/null; set -e 11 | if [[ "x$NAME" != "xRaspbian GNU/Linux" ]]; then 12 | if [[ "x$NAME" = "xDebian GNU/Linux" ]] && [[ -e "/etc/chip_build_info.txt" ]]; then 13 | echo "INFO: OS Debian on C.H.I.P. computer detected." 14 | else 15 | echo "ERROR: wrong OS type '$NAME'" 16 | exit 1 17 | fi 18 | fi 19 | 20 | # check if the Docker Engine is installed 21 | DOCKERVERSION=$(set +e; docker -v 2>/dev/null; set -e) 22 | if [[ "x$DOCKERVERSION" == "x" ]] || [[ ! -e /var/run/docker.sock ]]; then 23 | echo "ERROR: Docker Engine is not installed, please install it before applying this fix" 24 | exit 1 25 | fi 26 | 27 | 28 | ### part 1: 29 | 30 | # apply fix part 1: change ID to 'debian' 31 | if [[ "x$ID" == "xraspbian" ]]; then 32 | sudo sed -i 's|ID=raspbian|ID=debian|' /etc/os-release 33 | echo "SUCCESS: fix part 1 applied, changed 'ID=debian'!" 34 | fi 35 | 36 | 37 | ### part 2: 38 | 39 | if [[ -f "/etc/systemd/system/docker.service.d/overlay.conf" ]]; then 40 | sudo cp /lib/systemd/system/docker.service /etc/systemd/system/docker.service 41 | sudo sed -i 's|ExecStart=/usr/bin/dockerd -H|ExecStart=/usr/bin/dockerd --storage-driver overlay -H|' /etc/systemd/system/docker.service 42 | sudo rm -fr /etc/systemd/system/docker.service.d 43 | sudo systemctl daemon-reload 44 | echo "SUCCESS: fix part 2 applied, removed 'overlay.conf'!" 45 | fi 46 | 47 | 48 | ### done - SUCCESS 49 | echo "SUCCESS: Fix 001 successfully applied." 50 | echo " don't forget to send me a tweet to @Quintus23M, thanks. ;-)" 51 | -------------------------------------------------------------------------------- /002-fix-install-docker-on-chip-computer/README.md: -------------------------------------------------------------------------------- 1 | # `002-fix` for Installing Docker on C.H.I.P. computer 2 | 3 | 4 | ## Affected OSes 5 | 6 | * C.H.I.P. Debian 4.4.1 7 | 8 | 9 | ## Purpose 10 | 11 | This script installs the latest Docker Engine from the official Docker APT repo on a C.H.I.P. computer running Debian 4.4.1 (tested with image `Headless 4.4`). 12 | 13 | 14 | ## Run the installer script 15 | 16 | You can run the installer script directly on the C.H.I.P., so you have to login as user `root` and run the script: 17 | ``` 18 | curl -sSL https://github.com/DieterReuter/arm-docker-fixes/raw/master/002-fix-install-docker-on-chip-computer/apply-fix-002.sh | bash 19 | ``` 20 | 21 | 22 | ## Acknowledgements 23 | 24 | If the install script works for you, please tweet me a success message on Twitter, if it doesn't please feel free to open an issue here - or better try to resolve the issue and file a PR. ;-) 25 | 26 | Cheers,
27 | Dieter [@Quintus23M](https://twitter.com/Quintus23M) 28 | -------------------------------------------------------------------------------- /002-fix-install-docker-on-chip-computer/apply-fix-002.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | 4 | if [[ ! -f "/etc/os-release" ]]; then 5 | echo "ERROR: can't determine OS type" 6 | exit 1 7 | fi 8 | 9 | # read os-release infos 10 | set +e; . /etc/os-release 2>/dev/null; set -e 11 | if [[ "x$NAME" = "xDebian GNU/Linux" ]] && [[ -e "/etc/chip_build_info.txt" ]]; then 12 | echo "INFO: OS Debian on C.H.I.P. computer detected." 13 | else 14 | echo "ERROR: wrong OS type '$NAME'" 15 | exit 1 16 | fi 17 | 18 | 19 | # part 1: 20 | 21 | # install Docker default settings for overlay fs 22 | mkdir -p /etc/systemd/system 23 | rm -fr /etc/systemd/system/docker.service* 24 | curl -sSL https://raw.githubusercontent.com/docker/docker/master/contrib/init/systemd/docker.service > /etc/systemd/system/docker.service 25 | sed -i 's|ExecStart=/usr/bin/dockerd -H|ExecStart=/usr/bin/dockerd --storage-driver overlay -H|' /etc/systemd/system/docker.service 26 | rm -fr /etc/systemd/system/docker.service.d 27 | systemctl daemon-reload 28 | echo "SUCCESS: fix part 1 applied, created '/etc/systemd/system/docker.service'!" 29 | 30 | 31 | # part 2: 32 | 33 | # ensure we have APT https support installed 34 | if [[ ! -e /usr/lib/apt/methods/https ]]; then 35 | apt-get update 36 | apt-get install -y apt-transport-https ca-certificates 37 | fi 38 | 39 | # install APT keys for Docker APT repo 40 | gpg_fingerprint="58118E89F3A912897C070ADBF76221572C52609D" 41 | key_servers=" 42 | ha.pool.sks-keyservers.net 43 | pgp.mit.edu 44 | keyserver.ubuntu.com 45 | " 46 | for key_server in $key_servers ; do 47 | apt-key adv --keyserver "hkp://${key_server}:80" --recv-keys ${gpg_fingerprint} && break 48 | done 49 | apt-key adv -k ${gpg_fingerprint} >/dev/null 50 | 51 | # create repo list for Docker APT repo 52 | #TODO: change to 'debian-jessie' as soon as the .deb is available on Docker APT repo 53 | echo "deb [arch=armhf] https://apt.dockerproject.org/repo raspbian-jessie main" > /etc/apt/sources.list.d/docker.list 54 | echo "SUCCESS: fix part 2 applied, created '/etc/apt/sources.list.d/docker.list'!" 55 | 56 | 57 | # part 3: 58 | 59 | # install Docker Engine 60 | apt-get update 61 | apt-get install -y docker-engine 62 | echo "SUCCESS: fix part 3 applied, Docker Engine installed!" 63 | docker -v 64 | docker version 65 | 66 | 67 | ### done - SUCCESS 68 | echo -e "\nSUCCESS: Fix 002 successfully applied." 69 | echo " don't forget to send me a tweet to @Quintus23M, thanks. ;-)" 70 | -------------------------------------------------------------------------------- /003-fix-install-docker-on-clearfog-pro/README.md: -------------------------------------------------------------------------------- 1 | # `003-fix` for Installing Docker on ClearFog Pro 2 | 3 | 4 | ## Affected OSes 5 | 6 | * ClearFog Pro Armbian 5.20 7 | 8 | 9 | ## Purpose 10 | 11 | This script installs the latest Docker Engine from the official Docker APT repo on a ClearFog Pro router board running Armbian 5.20 (tested with image `Armbian_5.20_Armada_Debian_jessie_4.7.3.img`). 12 | 13 | 14 | ## Run the installer script 15 | 16 | You can run the installer script directly on the ClearFog Pro, so you have to login as user `root` and run the script: 17 | ``` 18 | curl -sSL https://github.com/DieterReuter/arm-docker-fixes/raw/master/003-fix-install-docker-on-clearfog-pro/apply-fix-003.sh | bash 19 | ``` 20 | 21 | 22 | ## Acknowledgements 23 | 24 | If the install script works for you, please tweet me a success message on Twitter, if it doesn't please feel free to open an issue here - or better try to resolve the issue and file a PR. ;-) 25 | 26 | Cheers,
27 | Dieter [@Quintus23M](https://twitter.com/Quintus23M) 28 | -------------------------------------------------------------------------------- /003-fix-install-docker-on-clearfog-pro/apply-fix-003.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | 4 | if [[ ! -f "/etc/os-release" ]]; then 5 | echo "ERROR: can't determine OS type" 6 | exit 1 7 | fi 8 | 9 | if [[ ! -f "/etc/armbian-release" ]]; then 10 | echo "ERROR: can't determine OS type" 11 | exit 1 12 | fi 13 | 14 | # read os-release infos 15 | . /etc/os-release 2>/dev/null 16 | . /etc/armbian-release 2>/dev/null 17 | if [[ "x$NAME" = "xDebian GNU/Linux" ]] && \ 18 | [[ "x$BOARD" = "xarmada" ]] && \ 19 | [[ "x$BOARD_NAME" = "xClearfog" ]]; then 20 | echo "INFO: OS Debian on ARMADA ClearFog Pro detected." 21 | else 22 | echo "ERROR: wrong OS type '$NAME'" 23 | exit 1 24 | fi 25 | 26 | 27 | # part 1: 28 | 29 | # install Docker default settings for overlay fs 30 | mkdir -p /etc/systemd/system 31 | rm -fr /etc/systemd/system/docker.service* 32 | curl -sSL https://raw.githubusercontent.com/docker/docker/master/contrib/init/systemd/docker.service > /etc/systemd/system/docker.service 33 | sed -i 's|ExecStart=/usr/bin/dockerd -H|ExecStart=/usr/bin/dockerd --storage-driver overlay -H|' /etc/systemd/system/docker.service 34 | rm -fr /etc/systemd/system/docker.service.d 35 | systemctl daemon-reload 36 | echo "SUCCESS: fix part 1 applied, created '/etc/systemd/system/docker.service'!" 37 | 38 | 39 | # part 2: 40 | 41 | # ensure we have APT https support installed 42 | if [[ ! -e /usr/lib/apt/methods/https ]]; then 43 | apt-get update 44 | apt-get install -y apt-transport-https ca-certificates 45 | fi 46 | 47 | # install APT keys for Docker APT repo 48 | gpg_fingerprint="58118E89F3A912897C070ADBF76221572C52609D" 49 | key_servers=" 50 | ha.pool.sks-keyservers.net 51 | pgp.mit.edu 52 | keyserver.ubuntu.com 53 | " 54 | for key_server in $key_servers ; do 55 | apt-key adv --keyserver "hkp://${key_server}:80" --recv-keys ${gpg_fingerprint} && break 56 | done 57 | apt-key adv -k ${gpg_fingerprint} >/dev/null 58 | 59 | # create repo list for Docker APT repo 60 | #TODO: change to 'debian-jessie' as soon as the .deb is available on Docker APT repo 61 | echo "deb [arch=armhf] https://apt.dockerproject.org/repo raspbian-jessie main" > /etc/apt/sources.list.d/docker.list 62 | echo "SUCCESS: fix part 2 applied, created '/etc/apt/sources.list.d/docker.list'!" 63 | 64 | 65 | # part 3: 66 | 67 | # install Docker Engine 68 | apt-get update 69 | apt-get install -y docker-engine 70 | echo "SUCCESS: fix part 3 applied, Docker Engine installed!" 71 | docker -v 72 | docker version 73 | 74 | 75 | ### done - SUCCESS 76 | echo -e "\nSUCCESS: Fix 003 successfully applied." 77 | echo " don't forget to send me a tweet to @Quintus23M, thanks. ;-)" 78 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2016 Dieter Reuter 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # arm-docker-fixes 2 | Scripts and hotfixes to fix some issues with Docker on ARM devices 3 | 4 | 5 | ## Disclamer 6 | 7 | **Warning:** Use this fixes on your own risk. Read the source carefully and apply the fixes only if you're sure it will not harm your system! 8 | 9 | 10 | ## Acknowledgements 11 | 12 | If a fix works for you, please tweet me a success message on Twitter, if it doesn't please feel free to open an issue here - or better try to resolve the issue and file a PR. :smirk: 13 | 14 | Cheers,
15 | Dieter [@Quintus23M](https://twitter.com/Quintus23M) 16 | 17 | 18 | ## License 19 | 20 | MIT License 21 | 22 | Copyright (c) 2016 Dieter Reuter 23 | --------------------------------------------------------------------------------