mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Add support to install Docker on raspbian/jessie
Signed-off-by: Dieter Reuter <dieter.reuter@me.com>
This commit is contained in:
parent
4498214a2a
commit
6e76b7a7e5
1 changed files with 30 additions and 19 deletions
|
@ -87,7 +87,7 @@ check_forked() {
|
||||||
Upstream release is '$lsb_dist' version '$dist_version'.
|
Upstream release is '$lsb_dist' version '$dist_version'.
|
||||||
EOF
|
EOF
|
||||||
else
|
else
|
||||||
if [ -r /etc/debian_version ] && [ "$lsb_dist" != "ubuntu" ]; then
|
if [ -r /etc/debian_version ] && [ "$lsb_dist" != "ubuntu" ] && [ "$lsb_dist" != "raspbian" ]; then
|
||||||
# We're Debian and don't even know it!
|
# We're Debian and don't even know it!
|
||||||
lsb_dist=debian
|
lsb_dist=debian
|
||||||
dist_version="$(cat /etc/debian_version | sed 's/\/.*//' | sed 's/\..*//')"
|
dist_version="$(cat /etc/debian_version | sed 's/\/.*//' | sed 's/\..*//')"
|
||||||
|
@ -129,10 +129,12 @@ do_install() {
|
||||||
case "$(uname -m)" in
|
case "$(uname -m)" in
|
||||||
*64)
|
*64)
|
||||||
;;
|
;;
|
||||||
|
armv6l|armv7l)
|
||||||
|
;;
|
||||||
*)
|
*)
|
||||||
cat >&2 <<-'EOF'
|
cat >&2 <<-'EOF'
|
||||||
Error: you are not using a 64bit platform.
|
Error: you are not using a 64bit platform or a Raspberry Pi (armv6l/armv7l).
|
||||||
Docker currently only supports 64bit platforms.
|
Docker currently only supports 64bit platforms or a Raspberry Pi (armv6l/armv7l).
|
||||||
EOF
|
EOF
|
||||||
exit 1
|
exit 1
|
||||||
;;
|
;;
|
||||||
|
@ -268,7 +270,7 @@ do_install() {
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
|
|
||||||
debian)
|
debian|raspbian)
|
||||||
dist_version="$(cat /etc/debian_version | sed 's/\/.*//' | sed 's/\..*//')"
|
dist_version="$(cat /etc/debian_version | sed 's/\/.*//' | sed 's/\..*//')"
|
||||||
case "$dist_version" in
|
case "$dist_version" in
|
||||||
8)
|
8)
|
||||||
|
@ -375,7 +377,7 @@ do_install() {
|
||||||
exit 0
|
exit 0
|
||||||
;;
|
;;
|
||||||
|
|
||||||
ubuntu|debian)
|
ubuntu|debian|raspbian)
|
||||||
export DEBIAN_FRONTEND=noninteractive
|
export DEBIAN_FRONTEND=noninteractive
|
||||||
|
|
||||||
did_apt_get_update=
|
did_apt_get_update=
|
||||||
|
@ -386,6 +388,14 @@ do_install() {
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if [ "$lsb_dist" = "raspbian" ]; then
|
||||||
|
# overlay is preferred to use on Raspbian
|
||||||
|
if [ ! -f /etc/modules-load.d/docker.conf ]; then
|
||||||
|
# Load kernel module 'overlay' at boot time
|
||||||
|
( set -x; $sh_c "modprobe overlay" )
|
||||||
|
( set -x; $sh_c "echo overlay > /etc/modules-load.d/docker.conf" )
|
||||||
|
fi
|
||||||
|
else
|
||||||
# aufs is preferred over devicemapper; try to ensure the driver is available.
|
# aufs is preferred over devicemapper; try to ensure the driver is available.
|
||||||
if ! grep -q aufs /proc/filesystems && ! $sh_c 'modprobe aufs'; then
|
if ! grep -q aufs /proc/filesystems && ! $sh_c 'modprobe aufs'; then
|
||||||
if uname -r | grep -q -- '-generic' && dpkg -l 'linux-image-*-generic' | grep -qE '^ii|^hi' 2>/dev/null; then
|
if uname -r | grep -q -- '-generic' && dpkg -l 'linux-image-*-generic' | grep -qE '^ii|^hi' 2>/dev/null; then
|
||||||
|
@ -406,6 +416,7 @@ do_install() {
|
||||||
( set -x; sleep 10 )
|
( set -x; sleep 10 )
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
# install apparmor utils if they're missing and apparmor is enabled in the kernel
|
# install apparmor utils if they're missing and apparmor is enabled in the kernel
|
||||||
# otherwise Docker will fail to start
|
# otherwise Docker will fail to start
|
||||||
|
|
Loading…
Add table
Reference in a new issue