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 <martin@surround.io>
This commit is contained in:
Martin Kelly 2015-11-24 10:25:57 -08:00
parent ac055a7d54
commit 3e5ac74241
3 changed files with 11 additions and 1 deletions

View file

@ -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.

View file

@ -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.

View file

@ -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