The install script (on https://get.docker.io/) installs an APT sources.list
entry referencing an HTTPS repository, and takes care of installing the
apt-transport-https package. However, the Debian/Ubuntu specific installation
script (on https://get.docker.io/ubuntu) used an HTTPS repository but without
installing that package, causing the installation to fail on some platforms.
This will use HTTPS everywhere, and updates the documentation accordingly.
Docker-DCO-1.1-Signed-off-by: Jérôme Petazzoni <jerome@docker.com> (github: jpetazzo)
Docker-DCO-1.1-Signed-off-by: Jérôme Petazzoni <jerome@docker.com> (github: jpetazzo)
| ... | ... |
@@ -68,7 +68,18 @@ easy. **See the** :ref:`installmirrors` **section below if you are not in |
| 68 | 68 |
the United States.** Other sources of the Debian packages may be |
| 69 | 69 |
faster for you to install. |
| 70 | 70 |
|
| 71 |
-First add the Docker repository key to your local keychain. |
|
| 71 |
+First, check that your APT system can deal with ``https`` URLs: |
|
| 72 |
+the file ``/usr/lib/apt/methods/https`` should exist. If it doesn't, |
|
| 73 |
+you need to install the package ``apt-transport-https``. |
|
| 74 |
+ |
|
| 75 |
+.. code-block:: bash |
|
| 76 |
+ |
|
| 77 |
+ [ -e /usr/lib/apt/methods/https ] || {
|
|
| 78 |
+ apt-get update |
|
| 79 |
+ apt-get install apt-transport-https |
|
| 80 |
+ } |
|
| 81 |
+ |
|
| 82 |
+Then, add the Docker repository key to your local keychain. |
|
| 72 | 83 |
|
| 73 | 84 |
.. code-block:: bash |
| 74 | 85 |
|
| ... | ... |
@@ -82,7 +93,7 @@ continue installation.* |
| 82 | 82 |
|
| 83 | 83 |
.. code-block:: bash |
| 84 | 84 |
|
| 85 |
- sudo sh -c "echo deb http://get.docker.io/ubuntu docker main\ |
|
| 85 |
+ sudo sh -c "echo deb https://get.docker.io/ubuntu docker main\ |
|
| 86 | 86 |
> /etc/apt/sources.list.d/docker.list" |
| 87 | 87 |
sudo apt-get update |
| 88 | 88 |
sudo apt-get install lxc-docker |
| ... | ... |
@@ -273,6 +273,11 @@ EOF |
| 273 | 273 |
# Upload repo |
| 274 | 274 |
s3cmd --acl-public sync $APTDIR/ s3://$BUCKET/ubuntu/ |
| 275 | 275 |
cat <<EOF | write_to_s3 s3://$BUCKET/ubuntu/index |
| 276 |
+# Check that HTTPS transport is available to APT |
|
| 277 |
+if [ ! -e /usr/lib/apt/methods/https ]; then |
|
| 278 |
+ apt-get update |
|
| 279 |
+ apt-get install -y apt-transport-https |
|
| 280 |
+fi |
|
| 276 | 281 |
# Add the repository to your APT sources |
| 277 | 282 |
echo deb $(s3_url)/ubuntu docker main > /etc/apt/sources.list.d/docker.list |
| 278 | 283 |
# Then import the repository key |