Merge pull request #2868 from jamtur01/ubtfixes

Tidied up Ubuntu installation documentation
This commit is contained in:
Solomon Hykes 2013-11-25 22:05:36 -08:00
Родитель 740958dda7 a74b512540
Коммит b6dd67c707
1 изменённых файлов: 45 добавлений и 41 удалений

Просмотреть файл

@ -65,32 +65,35 @@ Installation
Docker is available as a Debian package, which makes installation easy. Docker is available as a Debian package, which makes installation easy.
First add the Docker repository key to your local keychain. You can use the
``apt-key`` command to check the fingerprint matches: ``36A1 D786 9245 C895 0F96
6E92 D857 6A8B A88D 21E9``
.. code-block:: bash .. code-block:: bash
# Add the Docker repository key to your local keychain
# using apt-key finger you can check the fingerprint matches 36A1 D786 9245 C895 0F96 6E92 D857 6A8B A88D 21E9
sudo sh -c "wget -qO- https://get.docker.io/gpg | apt-key add -" sudo sh -c "wget -qO- https://get.docker.io/gpg | apt-key add -"
# Add the Docker repository to your apt sources list. Add the Docker repository to your apt sources list, update and install the
sudo sh -c "echo deb http://get.docker.io/ubuntu docker main\ ``lxc-docker`` package.
> /etc/apt/sources.list.d/docker.list"
# Update your sources *You may receive a warning that the package isn't trusted. Answer yes to
sudo apt-get update continue installation.*
# Install, you will see another warning that the package cannot be authenticated. Confirm install. .. code-block:: bash
sudo apt-get install lxc-docker
sudo sh -c "echo deb http://get.docker.io/ubuntu docker main\
Verify it worked > /etc/apt/sources.list.d/docker.list"
sudo apt-get update
sudo apt-get install lxc-docker
Now verify that the installation has worked by downloading the ``ubuntu`` image
and launching a container.
.. code-block:: bash .. code-block:: bash
# download the base 'ubuntu' container and run bash inside it while setting up an interactive shell
sudo docker run -i -t ubuntu /bin/bash sudo docker run -i -t ubuntu /bin/bash
# type 'exit' to exit Type ``exit`` to exit
**Done!**, now continue with the :ref:`hello_world` example. **Done!**, now continue with the :ref:`hello_world` example.
@ -108,7 +111,7 @@ Ubuntu Raring already comes with the 3.8 kernel, so we don't need to install it.
have AUFS filesystem support enabled. AUFS support is optional as of version 0.7, but it's still available as have AUFS filesystem support enabled. AUFS support is optional as of version 0.7, but it's still available as
a driver and we recommend using it if you can. a driver and we recommend using it if you can.
To make sure aufs is installed, run the following commands: To make sure AUFS is installed, run the following commands:
.. code-block:: bash .. code-block:: bash
@ -121,36 +124,37 @@ Installation
Docker is available as a Debian package, which makes installation easy. Docker is available as a Debian package, which makes installation easy.
*Please note that these instructions have changed for 0.6. If you are upgrading from an earlier version, you will need .. warning::
to follow them again.*
Please note that these instructions have changed for 0.6. If you are upgrading from an earlier version, you will need
to follow them again.
First add the Docker repository key to your local keychain. You can use the
``apt-key`` command to check the fingerprint matches: ``36A1 D786 9245 C895 0F96
6E92 D857 6A8B A88D 21E9``
.. code-block:: bash .. code-block:: bash
# Add the Docker repository key to your local keychain
# using apt-key finger you can check the fingerprint matches 36A1 D786 9245 C895 0F96 6E92 D857 6A8B A88D 21E9
sudo sh -c "wget -qO- https://get.docker.io/gpg | apt-key add -" sudo sh -c "wget -qO- https://get.docker.io/gpg | apt-key add -"
# Add the Docker repository to your apt sources list. Add the Docker repository to your apt sources list, update and install the
sudo sh -c "echo deb http://get.docker.io/ubuntu docker main\ ``lxc-docker`` package.
> /etc/apt/sources.list.d/docker.list"
.. code-block:: bash
# update
sudo apt-get update sudo sh -c "echo deb http://get.docker.io/ubuntu docker main\
> /etc/apt/sources.list.d/docker.list"
# install sudo apt-get update
sudo apt-get install lxc-docker sudo apt-get install lxc-docker
Now verify that the installation has worked by downloading the ``ubuntu`` image
Verify it worked and launching a container.
.. code-block:: bash .. code-block:: bash
# download the base 'ubuntu' container
# and run bash inside it while setting up an interactive shell
sudo docker run -i -t ubuntu /bin/bash sudo docker run -i -t ubuntu /bin/bash
# type exit to exit Type ``exit`` to exit
**Done!**, now continue with the :ref:`hello_world` example. **Done!**, now continue with the :ref:`hello_world` example.
@ -160,8 +164,8 @@ Verify it worked
Docker and UFW Docker and UFW
^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^
Docker uses a bridge to manage container networking. By default, UFW Docker uses a bridge to manage container networking. By default, UFW drops all
drops all `forwarding`, thus a first step is to enable UFW forwarding: `forwarding` traffic. As a result will you need to enable UFW forwarding:
.. code-block:: bash .. code-block:: bash
@ -179,9 +183,9 @@ Then reload UFW:
sudo ufw reload sudo ufw reload
UFW's default set of rules denied all `incoming`, so if you want to be UFW's default set of rules denies all `incoming` traffic. If you want to be
able to reach your containers from another host, you should allow able to reach your containers from another host then you should allow
incoming connections on the docker port (default 4243): incoming connections on the Docker port (default 4243):
.. code-block:: bash .. code-block:: bash