Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
executable file 70 lines (54 sloc) 2.05 KB
set -e
if [[ ! -f "/etc/os-release" ]]; then
echo "ERROR: can't determine OS type"
exit 1
# read os-release infos
set +e; . /etc/os-release 2>/dev/null; set -e
if [[ "x$NAME" = "xDebian GNU/Linux" ]] && [[ -e "/etc/chip_build_info.txt" ]]; then
echo "INFO: OS Debian on C.H.I.P. computer detected."
echo "ERROR: wrong OS type '$NAME'"
exit 1
# part 1:
# install Docker default settings for overlay fs
mkdir -p /etc/systemd/system
rm -fr /etc/systemd/system/docker.service*
curl -sSL > /etc/systemd/system/docker.service
sed -i 's|ExecStart=/usr/bin/dockerd -H|ExecStart=/usr/bin/dockerd --storage-driver overlay -H|' /etc/systemd/system/docker.service
rm -fr /etc/systemd/system/docker.service.d
systemctl daemon-reload
echo "SUCCESS: fix part 1 applied, created '/etc/systemd/system/docker.service'!"
# part 2:
# ensure we have APT https support installed
if [[ ! -e /usr/lib/apt/methods/https ]]; then
apt-get update
apt-get install -y apt-transport-https ca-certificates
# install APT keys for Docker APT repo
for key_server in $key_servers ; do
apt-key adv --keyserver "hkp://${key_server}:80" --recv-keys ${gpg_fingerprint} && break
apt-key adv -k ${gpg_fingerprint} >/dev/null
# create repo list for Docker APT repo
#TODO: change to 'debian-jessie' as soon as the .deb is available on Docker APT repo
echo "deb [arch=armhf] raspbian-jessie main" > /etc/apt/sources.list.d/docker.list
echo "SUCCESS: fix part 2 applied, created '/etc/apt/sources.list.d/docker.list'!"
# part 3:
# install Docker Engine
apt-get update
apt-get install -y docker-engine
echo "SUCCESS: fix part 3 applied, Docker Engine installed!"
docker -v
docker version
### done - SUCCESS
echo -e "\nSUCCESS: Fix 002 successfully applied."
echo " don't forget to send me a tweet to @Quintus23M, thanks. ;-)"