From 18fcb12c86ce60af338183ed10ae1eae6093ba57 Mon Sep 17 00:00:00 2001 From: Martin Kelly Date: Tue, 24 Nov 2015 10:25:57 -0800 Subject: [PATCH] install.sh: fix for multiarch deb/ubuntu Currently, the Docker repos will trigger apt-get errors on a multiarch-configured deb system because the repos don't contain all architectures. For example, on a multiarch system supporting amd64 and armhf, apt-get will look for armhf Docker packages, fail to find them, and error out. Fix this by qualifying the repo line with the currently active architecture. This fixes issue #18207. Signed-off-by: Martin Kelly Upstream-commit: 3e5ac742417dc9461dd090c29ee9971ff0974adb Component: engine --- components/engine/docs/installation/debian.md | 5 +++++ components/engine/docs/installation/ubuntulinux.md | 5 +++++ components/engine/hack/install.sh | 2 +- 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/components/engine/docs/installation/debian.md b/components/engine/docs/installation/debian.md index b5ce3586d9..154650f1c5 100644 --- a/components/engine/docs/installation/debian.md +++ b/components/engine/docs/installation/debian.md @@ -75,6 +75,11 @@ from the new repository: deb https://apt.dockerproject.org/repo debian-stretch main + > **Note**: Docker does not provide packages for all architectures. To install docker on + > a multi-architecture system, add an `[arch=...]` clause to the entry. Refer to the + > [Debian Multiarch wiki](https://wiki.debian.org/Multiarch/HOWTO#Setting_up_apt_sources) + > for details. + 8. Save and close the file. 9. Update the `apt` package index. diff --git a/components/engine/docs/installation/ubuntulinux.md b/components/engine/docs/installation/ubuntulinux.md index 0ff6fe3bd2..0e14f93897 100644 --- a/components/engine/docs/installation/ubuntulinux.md +++ b/components/engine/docs/installation/ubuntulinux.md @@ -83,6 +83,11 @@ packages from the new repository: deb https://apt.dockerproject.org/repo ubuntu-wily main + > **Note**: Docker does not provide packages for all architectures. To install docker on + > a multi-architecture system, add an `[arch=...]` clause to the entry. Refer to the + > [Debian Multiarch wiki](https://wiki.debian.org/Multiarch/HOWTO#Setting_up_apt_sources) + > for details. + 7. Save and close the `/etc/apt/sources.list.d/docker.list` file. 8. Update the `apt` package index. diff --git a/components/engine/hack/install.sh b/components/engine/hack/install.sh index 41c5b3cd50..92de5b517c 100755 --- a/components/engine/hack/install.sh +++ b/components/engine/hack/install.sh @@ -372,7 +372,7 @@ do_install() { set -x $sh_c "apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D" $sh_c "mkdir -p /etc/apt/sources.list.d" - $sh_c "echo deb https://apt.dockerproject.org/repo ${lsb_dist}-${dist_version} ${repo} > /etc/apt/sources.list.d/docker.list" + $sh_c "echo deb [arch=$(dpkg --print-architecture)] https://apt.dockerproject.org/repo ${lsb_dist}-${dist_version} ${repo} > /etc/apt/sources.list.d/docker.list" $sh_c 'sleep 3; apt-get update; apt-get install -y -q docker-engine' ) echo_docker_as_nonroot