mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Updating the installations with rpm and yum install
Prefer rpm/yum over script install Updating with review comments Adding second round review comments Signed-off-by: Mary Anthony <mary@docker.com>
This commit is contained in:
parent
e6ca006d86
commit
5e061b5945
6 changed files with 456 additions and 400 deletions
|
@ -5,18 +5,15 @@ description = "Instructions for installing Docker on CentOS"
|
|||
keywords = ["Docker, Docker documentation, requirements, linux, centos, epel, docker.io, docker-io"]
|
||||
[menu.main]
|
||||
parent = "smn_linux"
|
||||
weight=-4
|
||||
+++
|
||||
<![end-metadata]-->
|
||||
|
||||
# CentOS
|
||||
|
||||
Docker is supported on the following versions of CentOS:
|
||||
|
||||
* CentOS 7.X
|
||||
|
||||
Installation on other binary compatible EL7 distributions such as Scientific
|
||||
Linux might succeed, but Docker does not test or support Docker on these
|
||||
distributions.
|
||||
Docker runs on CentOS 7.X. An installation on other binary compatible EL7
|
||||
distributions such as Scientific Linux might succeed, but Docker does not test
|
||||
or support Docker on these distributions.
|
||||
|
||||
This page instructs you to install using Docker-managed release packages and
|
||||
installation mechanisms. Using these packages ensures you get the latest release
|
||||
|
@ -41,56 +38,12 @@ packages.
|
|||
|
||||
## Install
|
||||
|
||||
There are two ways to install Docker Engine. You can use `curl` with the `get.docker.com` site. This method runs an installation script which installs via the `yum` package manager. Or you can install with the `yum` package manager directly yourself.
|
||||
There are two ways to install Docker Engine. You can install using the `yum`
|
||||
package manager. Or you can use `curl` with the `get.docker.com` site. This
|
||||
second method runs an installation script which also installs via the `yum`
|
||||
package manager.
|
||||
|
||||
### Install with the script
|
||||
|
||||
|
||||
1. Log into your machine as a user with `sudo` or `root` privileges.
|
||||
|
||||
2. Make sure your existing yum packages are up-to-date.
|
||||
|
||||
$ sudo yum update
|
||||
|
||||
3. Run the Docker installation script.
|
||||
|
||||
$ curl -sSL https://get.docker.com/ | sh
|
||||
|
||||
This script adds the `docker.repo` repository and installs Docker.
|
||||
|
||||
4. Start the Docker daemon.
|
||||
|
||||
$ sudo service docker start
|
||||
|
||||
5. Verify `docker` is installed correctly by running a test image in a container.
|
||||
|
||||
$ sudo docker run hello-world
|
||||
Unable to find image 'hello-world:latest' locally
|
||||
latest: Pulling from hello-world
|
||||
a8219747be10: Pull complete
|
||||
91c95931e552: Already exists
|
||||
hello-world:latest: The image you are pulling has been verified. Important: image verification is a tech preview feature and should not be relied on to provide security.
|
||||
Digest: sha256:aa03e5d0d5553b4c3473e89c8619cf79df368babd1.7.1cf5daeb82aab55838d
|
||||
Status: Downloaded newer image for hello-world:latest
|
||||
Hello from Docker.
|
||||
This message shows that your installation appears to be working correctly.
|
||||
|
||||
To generate this message, Docker took the following steps:
|
||||
1. The Docker client contacted the Docker daemon.
|
||||
2. The Docker daemon pulled the "hello-world" image from the Docker Hub.
|
||||
(Assuming it was not already locally available.)
|
||||
3. The Docker daemon created a new container from that image which runs the
|
||||
executable that produces the output you are currently reading.
|
||||
4. The Docker daemon streamed that output to the Docker client, which sent it
|
||||
to your terminal.
|
||||
|
||||
To try something more ambitious, you can run an Ubuntu container with:
|
||||
$ docker run -it ubuntu bash
|
||||
|
||||
For more examples and ideas, visit:
|
||||
http://docs.docker.com/userguide/
|
||||
|
||||
### Install without the script
|
||||
### Install with yum
|
||||
|
||||
1. Log into your machine as a user with `sudo` or `root` privileges.
|
||||
|
||||
|
@ -98,9 +51,7 @@ There are two ways to install Docker Engine. You can use `curl` with the `get.
|
|||
|
||||
$ sudo yum update
|
||||
|
||||
3. Add the yum repo yourself.
|
||||
|
||||
For CentOS 7 run:
|
||||
3. Add the yum repo.
|
||||
|
||||
$ cat >/etc/yum.repos.d/docker.repo <<-EOF
|
||||
[dockerrepo]
|
||||
|
@ -122,6 +73,54 @@ There are two ways to install Docker Engine. You can use `curl` with the `get.
|
|||
6. Verify `docker` is installed correctly by running a test image in a container.
|
||||
|
||||
$ sudo docker run hello-world
|
||||
Unable to find image 'hello-world:latest' locally
|
||||
latest: Pulling from hello-world
|
||||
a8219747be10: Pull complete
|
||||
91c95931e552: Already exists
|
||||
hello-world:latest: The image you are pulling has been verified. Important: image verification is a tech preview feature and should not be relied on to provide security.
|
||||
Digest: sha256:aa03e5d0d5553b4c3473e89c8619cf79df368babd1.7.1cf5daeb82aab55838d
|
||||
Status: Downloaded newer image for hello-world:latest
|
||||
Hello from Docker.
|
||||
This message shows that your installation appears to be working correctly.
|
||||
|
||||
To generate this message, Docker took the following steps:
|
||||
1. The Docker client contacted the Docker daemon.
|
||||
2. The Docker daemon pulled the "hello-world" image from the Docker Hub.
|
||||
(Assuming it was not already locally available.)
|
||||
3. The Docker daemon created a new container from that image which runs the
|
||||
executable that produces the output you are currently reading.
|
||||
4. The Docker daemon streamed that output to the Docker client, which sent it
|
||||
to your terminal.
|
||||
|
||||
To try something more ambitious, you can run an Ubuntu container with:
|
||||
$ docker run -it ubuntu bash
|
||||
|
||||
For more examples and ideas, visit:
|
||||
http://docs.docker.com/userguide/
|
||||
|
||||
### Install with the script
|
||||
|
||||
|
||||
1. Log into your machine as a user with `sudo` or `root` privileges.
|
||||
|
||||
2. Make sure your existing yum packages are up-to-date.
|
||||
|
||||
$ sudo yum update
|
||||
|
||||
3. Run the Docker installation script.
|
||||
|
||||
$ curl -sSL https://get.docker.com/ | sh
|
||||
|
||||
This script adds the `docker.repo` repository and installs Docker.
|
||||
|
||||
4. Start the Docker daemon.
|
||||
|
||||
$ sudo service docker start
|
||||
|
||||
5. Verify `docker` is installed correctly by running a test image in a container.
|
||||
|
||||
$ sudo docker run hello-world
|
||||
|
||||
|
||||
## Create a docker group
|
||||
|
||||
|
@ -172,8 +171,7 @@ You can uninstall the Docker software with `yum`.
|
|||
|
||||
$ yum list installed | grep docker
|
||||
yum list installed | grep docker
|
||||
docker-engine.x86_64 1.7.1-1.el7
|
||||
@/docker-engine-1.7.1-1.el7.x86_64.rpm
|
||||
docker-engine.x86_64 1.7.1-1.el7 @/docker-engine-1.7.1-1.el7.x86_64.rpm
|
||||
|
||||
2. Remove the package.
|
||||
|
||||
|
|
|
@ -5,6 +5,7 @@ description = "Instructions for installing Docker on Debian."
|
|||
keywords = ["Docker, Docker documentation, installation, debian"]
|
||||
[menu.main]
|
||||
parent = "smn_linux"
|
||||
weight=-2
|
||||
+++
|
||||
<![end-metadata]-->
|
||||
|
||||
|
@ -12,113 +13,98 @@ parent = "smn_linux"
|
|||
|
||||
Docker is supported on the following versions of Debian:
|
||||
|
||||
- [*Debian testing stretch (64-bit)*](#debian-wheezy-stable-7-x-64-bit)
|
||||
- [*Debian 8.0 Jessie (64-bit)*](#debian-jessie-80-64-bit)
|
||||
- [*Debian 7.7 Wheezy (64-bit)*](#debian-wheezy-stable-7-x-64-bit)
|
||||
|
||||
## Debian Jessie 8.0 (64-bit)
|
||||
>**Note**: If you previously installed Docker using `apt`, make sure you update
|
||||
your `apt` sources to the new `apt` repository.
|
||||
|
||||
Debian 8 comes with a 3.16.0 Linux kernel, the `docker.io` package can be found in the `jessie-backports` repository. Reasoning behind this can be found <a href="https://lists.debian.org/debian-release/2015/03/msg00685.html" target="_blank">here</a>. Instructions how to enable the backports repository can be found <a href="http://backports.debian.org/Instructions/" target="_blank">here</a>.
|
||||
## Prerequisites
|
||||
|
||||
> **Note**:
|
||||
> Debian contains a much older KDE3/GNOME2 package called ``docker``, so the
|
||||
> package and the executable are called ``docker.io``.
|
||||
Docker requires a 64-bit installation regardless of your Debian version.
|
||||
Additionally, your kernel must be 3.10 at minimum. The latest 3.10 minor
|
||||
version or a newer maintained version are also acceptable.
|
||||
|
||||
### Installation
|
||||
Kernels older than 3.10 lack some of the features required to run Docker
|
||||
containers. These older versions are known to have bugs which cause data loss
|
||||
and frequently panic under certain conditions.
|
||||
|
||||
Make sure you enabled the `jessie-backports` repository, as stated above.
|
||||
To check your current kernel version, open a terminal and use `uname -r` to
|
||||
display your kernel version:
|
||||
|
||||
To install the latest Debian package (may not be the latest Docker release):
|
||||
$ uname -r
|
||||
|
||||
$ sudo apt-get update
|
||||
$ sudo apt-get install docker.io
|
||||
### Update your apt repository
|
||||
|
||||
To verify that everything has worked as expected:
|
||||
Docker's `apt` repository contains Docker 1.7.1 and higher. To set `apt` to use
|
||||
from the new repository:
|
||||
|
||||
$ sudo docker run --rm hello-world
|
||||
1. If you haven't already done so, log into your machine as a user with `sudo` or `root` privileges.
|
||||
|
||||
This command downloads and runs the `hello-world` image in a container. When the
|
||||
container runs, it prints an informational message. Then, it exits.
|
||||
2. Open a terminal window.
|
||||
|
||||
If you need to add an HTTP Proxy, set a different directory or partition for the
|
||||
Docker runtime files, or make other customizations, read our Systemd article to
|
||||
learn how to [customize your Systemd Docker daemon options](/articles/systemd/).
|
||||
3. Purge any older repositories.
|
||||
|
||||
> **Note**:
|
||||
> If you want to enable memory and swap accounting see
|
||||
> [this](/installation/ubuntulinux/#adjust-memory-and-swap-accounting).
|
||||
$ apt-get purge lxc-docker*
|
||||
$ apt-get purge docker.io*
|
||||
|
||||
### Uninstallation
|
||||
4. Add the new `gpg` key.
|
||||
|
||||
To uninstall the Docker package:
|
||||
$ apt-key adv --keyserver hkp://pgp.mit.edu:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
|
||||
|
||||
$ sudo apt-get purge docker.io
|
||||
5. Open the `/etc/apt/sources.list.d/docker.list` file in your favorite editor.
|
||||
|
||||
To uninstall the Docker package and dependencies that are no longer needed:
|
||||
If the file doesn't exist, create it.
|
||||
|
||||
$ sudo apt-get autoremove --purge docker.io
|
||||
6. Remove any existing entries.
|
||||
|
||||
The above commands will not remove images, containers, volumes, or user created
|
||||
configuration files on your host. If you wish to delete all images, containers,
|
||||
and volumes run the following command:
|
||||
7. Add an entry for your Debian operating system.
|
||||
|
||||
$ rm -rf /var/lib/docker
|
||||
The possible entries are:
|
||||
|
||||
You must delete the user created configuration files manually.
|
||||
# Debian Wheezy
|
||||
deb https://apt.dockerproject.org/repo debian-wheezy main
|
||||
# Debian Jessie
|
||||
deb https://apt.dockerproject.org/repo debian-jessie main
|
||||
# Debian Stretch/Sid
|
||||
deb https://apt.dockerproject.org/repo debian-stretch main
|
||||
|
||||
## Debian Wheezy/Stable 7.x (64-bit)
|
||||
8. Save and close the file.
|
||||
|
||||
Docker requires Kernel 3.8+, while Wheezy ships with Kernel 3.2 (for more details
|
||||
on why 3.8 is required, see discussion on
|
||||
[bug #407](https://github.com/docker/docker/issues/407)).
|
||||
9. Update the `apt` package index.
|
||||
|
||||
Fortunately, wheezy-backports currently has [Kernel 3.16
|
||||
](https://packages.debian.org/search?suite=wheezy-backports§ion=all&arch=any&searchon=names&keywords=linux-image-amd64),
|
||||
which is officially supported by Docker.
|
||||
$ apt-get update
|
||||
|
||||
### Installation
|
||||
10. Verify that `apt` is pulling from the right repository.
|
||||
|
||||
1. Install Kernel from wheezy-backports
|
||||
$ apt-cache policy docker-engine
|
||||
|
||||
Add the following line to your `/etc/apt/sources.list`
|
||||
From now on when you run `apt-get upgrade`, `apt` pulls from the new apt repository.
|
||||
|
||||
`deb http://http.debian.net/debian wheezy-backports main`
|
||||
## Install Docker
|
||||
|
||||
then install the `linux-image-amd64` package (note the use of
|
||||
`-t wheezy-backports`)
|
||||
Before installing Docker, make sure you have set your `apt` repository correctly as described in the prerequisites.
|
||||
|
||||
1. Update the `apt` package index.
|
||||
|
||||
$ sudo apt-get update
|
||||
$ sudo apt-get install -t wheezy-backports linux-image-amd64
|
||||
|
||||
2. Restart your system. This is necessary for Debian to use your new kernel.
|
||||
2. Install Docker.
|
||||
|
||||
3. Install Docker using the get.docker.com script:
|
||||
$ sudo apt-get install docker-engine
|
||||
|
||||
`curl -sSL https://get.docker.com/ | sh`
|
||||
5. Start the `docker` daemon.
|
||||
|
||||
>**Note**: If your company is behind a filtering proxy, you may find that the
|
||||
>`apt-key`
|
||||
>command fails for the Docker repo during installation. To work around this,
|
||||
>add the key directly using the following:
|
||||
>
|
||||
> $ curl -sSL https://get.docker.com/gpg | sudo apt-key add -
|
||||
$ sudo service docker start
|
||||
|
||||
### Uninstallation
|
||||
6. Verify `docker` is installed correctly.
|
||||
|
||||
To uninstall the Docker package:
|
||||
$ sudo docker run hello-world
|
||||
|
||||
$ sudo apt-get purge docker-engine
|
||||
This command downloads a test image and runs it in a container. When the
|
||||
container runs, it prints an informational message. Then, it exits.
|
||||
|
||||
To uninstall the Docker package and dependencies that are no longer needed:
|
||||
|
||||
$ sudo apt-get autoremove --purge docker-engine
|
||||
|
||||
The above commands will not remove images, containers, volumes, or user created
|
||||
configuration files on your host. If you wish to delete all images, containers,
|
||||
and volumes run the following command:
|
||||
|
||||
$ rm -rf /var/lib/docker
|
||||
|
||||
You must delete the user created configuration files manually.
|
||||
|
||||
## Giving non-root access
|
||||
|
||||
|
@ -154,6 +140,29 @@ use the `-G` flag to specify an alternative group.
|
|||
# Restart the Docker daemon.
|
||||
$ sudo service docker restart
|
||||
|
||||
## Upgrade Docker
|
||||
|
||||
To install the latest version of Docker with `apt-get`:
|
||||
|
||||
$ apt-get upgrade docker-engine
|
||||
|
||||
## Uninstall
|
||||
|
||||
To uninstall the Docker package:
|
||||
|
||||
$ sudo apt-get purge docker-engine
|
||||
|
||||
To uninstall the Docker package and dependencies that are no longer needed:
|
||||
|
||||
$ sudo apt-get autoremove --purge docker-engine
|
||||
|
||||
The above commands will not remove images, containers, volumes, or user created
|
||||
configuration files on your host. If you wish to delete all images, containers,
|
||||
and volumes run the following command:
|
||||
|
||||
$ rm -rf /var/lib/docker
|
||||
|
||||
You must delete the user created configuration files manually.
|
||||
|
||||
## What next?
|
||||
|
||||
|
|
|
@ -5,20 +5,17 @@ description = "Instructions for installing Docker on Fedora."
|
|||
keywords = ["Docker, Docker documentation, Fedora, requirements, linux"]
|
||||
[menu.main]
|
||||
parent = "smn_linux"
|
||||
weight=-3
|
||||
+++
|
||||
<![end-metadata]-->
|
||||
|
||||
# Fedora
|
||||
|
||||
Docker is supported on the following versions of Fedora:
|
||||
|
||||
- Fedora 21
|
||||
- Fedora 22
|
||||
|
||||
This page instructs you to install using Docker-managed release packages and
|
||||
installation mechanisms. Using these packages ensures you get the latest release
|
||||
of Docker. If you wish to install using Fedora-managed packages, consult your
|
||||
Fedora release documentation for information on Fedora's Docker support.
|
||||
Docker is supported Fedora version 21 and 22. This page instructs you to install
|
||||
using Docker-managed release packages and installation mechanisms. Using these
|
||||
packages ensures you get the latest release of Docker. If you wish to install
|
||||
using Fedora-managed packages, consult your Fedora release documentation for
|
||||
information on Fedora's Docker support.
|
||||
|
||||
## Prerequisites
|
||||
|
||||
|
@ -26,7 +23,7 @@ Docker requires a 64-bit installation regardless of your Fedora version. Also, y
|
|||
version, open a terminal and use `uname -r` to display your kernel version:
|
||||
|
||||
$ uname -r
|
||||
3.19.5-100.fc20.x86_64
|
||||
3.19.5-100.fc21.x86_64
|
||||
|
||||
If your kernel is at a older version, you must update it.
|
||||
|
||||
|
@ -37,56 +34,9 @@ reported kernel bugs may have already been fixed on the latest kernel packages
|
|||
|
||||
## Install
|
||||
|
||||
There are two ways to install Docker Engine. You can use `curl` with the `get.docker.com` site. This method runs an installation script which installs via the `yum` package manager. Or you can install with the `yum` package manager directly yourself.
|
||||
There are two ways to install Docker Engine. You can install with the `yum` package manager. Or you can use `curl` with the `get.docker.com` site. This second method runs an installation script which also installs via the `yum` package manager.
|
||||
|
||||
### Install with the script
|
||||
|
||||
|
||||
1. Log into your machine as a user with `sudo` or `root` privileges.
|
||||
|
||||
2. Make sure your existing yum packages are up-to-date.
|
||||
|
||||
$ sudo yum update
|
||||
|
||||
3. Run the Docker installation script.
|
||||
|
||||
$ curl -sSL https://get.docker.com/ | sh
|
||||
|
||||
This script adds the `docker.repo` repository and installs Docker.
|
||||
|
||||
4. Start the Docker daemon.
|
||||
|
||||
$ sudo service docker start
|
||||
|
||||
5. Verify `docker` is installed correctly by running a test image in a container.
|
||||
|
||||
$ sudo docker run hello-world
|
||||
Unable to find image 'hello-world:latest' locally
|
||||
latest: Pulling from hello-world
|
||||
a8219747be10: Pull complete
|
||||
91c95931e552: Already exists
|
||||
hello-world:latest: The image you are pulling has been verified. Important: image verification is a tech preview feature and should not be relied on to provide security.
|
||||
Digest: sha256:aa03e5d0d5553b4c3473e89c8619cf79df368babd1.7.1cf5daeb82aab55838d
|
||||
Status: Downloaded newer image for hello-world:latest
|
||||
Hello from Docker.
|
||||
This message shows that your installation appears to be working correctly.
|
||||
|
||||
To generate this message, Docker took the following steps:
|
||||
1. The Docker client contacted the Docker daemon.
|
||||
2. The Docker daemon pulled the "hello-world" image from the Docker Hub.
|
||||
(Assuming it was not already locally available.)
|
||||
3. The Docker daemon created a new container from that image which runs the
|
||||
executable that produces the output you are currently reading.
|
||||
4. The Docker daemon streamed that output to the Docker client, which sent it
|
||||
to your terminal.
|
||||
|
||||
To try something more ambitious, you can run an Ubuntu container with:
|
||||
$ docker run -it ubuntu bash
|
||||
|
||||
For more examples and ideas, visit:
|
||||
http://docs.docker.com/userguide/
|
||||
|
||||
### Install without the script
|
||||
### Install with yum
|
||||
|
||||
1. Log into your machine as a user with `sudo` or `root` privileges.
|
||||
|
||||
|
@ -96,17 +46,6 @@ There are two ways to install Docker Engine. You can use `curl` with the `get.
|
|||
|
||||
3. Add the yum repo yourself.
|
||||
|
||||
For Fedora 20 run:
|
||||
|
||||
$ cat >/etc/yum.repos.d/docker.repo <<-EOF
|
||||
[dockerrepo]
|
||||
name=Docker Repository
|
||||
baseurl=https://yum.dockerproject.org/repo/main/fedora/20
|
||||
enabled=1
|
||||
gpgcheck=1
|
||||
gpgkey=https://yum.dockerproject.org/gpg
|
||||
EOF
|
||||
|
||||
For Fedora 21 run:
|
||||
|
||||
$ cat >/etc/yum.repos.d/docker.repo <<-EOF
|
||||
|
@ -139,6 +78,55 @@ There are two ways to install Docker Engine. You can use `curl` with the `get.
|
|||
|
||||
6. Verify `docker` is installed correctly by running a test image in a container.
|
||||
|
||||
|
||||
$ sudo docker run hello-world
|
||||
Unable to find image 'hello-world:latest' locally
|
||||
latest: Pulling from hello-world
|
||||
a8219747be10: Pull complete
|
||||
91c95931e552: Already exists
|
||||
hello-world:latest: The image you are pulling has been verified. Important: image verification is a tech preview feature and should not be relied on to provide security.
|
||||
Digest: sha256:aa03e5d0d5553b4c3473e89c8619cf79df368babd1.7.1cf5daeb82aab55838d
|
||||
Status: Downloaded newer image for hello-world:latest
|
||||
Hello from Docker.
|
||||
This message shows that your installation appears to be working correctly.
|
||||
|
||||
To generate this message, Docker took the following steps:
|
||||
1. The Docker client contacted the Docker daemon.
|
||||
2. The Docker daemon pulled the "hello-world" image from the Docker Hub.
|
||||
(Assuming it was not already locally available.)
|
||||
3. The Docker daemon created a new container from that image which runs the
|
||||
executable that produces the output you are currently reading.
|
||||
4. The Docker daemon streamed that output to the Docker client, which sent it
|
||||
to your terminal.
|
||||
|
||||
To try something more ambitious, you can run an Ubuntu container with:
|
||||
$ docker run -it ubuntu bash
|
||||
|
||||
For more examples and ideas, visit:
|
||||
http://docs.docker.com/userguide/
|
||||
|
||||
|
||||
### Install with the script
|
||||
|
||||
|
||||
1. Log into your machine as a user with `sudo` or `root` privileges.
|
||||
|
||||
2. Make sure your existing yum packages are up-to-date.
|
||||
|
||||
$ sudo yum update
|
||||
|
||||
3. Run the Docker installation script.
|
||||
|
||||
$ curl -sSL https://get.docker.com/ | sh
|
||||
|
||||
This script adds the `docker.repo` repository and installs Docker.
|
||||
|
||||
4. Start the Docker daemon.
|
||||
|
||||
$ sudo service docker start
|
||||
|
||||
5. Verify `docker` is installed correctly by running a test image in a container.
|
||||
|
||||
$ sudo docker run hello-world
|
||||
|
||||
## Create a docker group
|
||||
|
@ -170,30 +158,6 @@ To create the `docker` group and add your user:
|
|||
4. Verify your work by running `docker` without `sudo`.
|
||||
|
||||
$ docker run hello-world
|
||||
Unable to find image 'hello-world:latest' locally
|
||||
latest: Pulling from hello-world
|
||||
a8219747be10: Pull complete
|
||||
91c95931e552: Already exists
|
||||
hello-world:latest: The image you are pulling has been verified. Important: image verification is a tech preview feature and should not be relied on to provide security.
|
||||
Digest: sha256:aa03e5d0d5553b4c3473e89c8619cf79df368babd18681cf5daeb82aab55838d
|
||||
Status: Downloaded newer image for hello-world:latest
|
||||
Hello from Docker.
|
||||
This message shows that your installation appears to be working correctly.
|
||||
|
||||
To generate this message, Docker took the following steps:
|
||||
1. The Docker client contacted the Docker daemon.
|
||||
2. The Docker daemon pulled the "hello-world" image from the Docker Hub.
|
||||
(Assuming it was not already locally available.)
|
||||
3. The Docker daemon created a new container from that image which runs the
|
||||
executable that produces the output you are currently reading.
|
||||
4. The Docker daemon streamed that output to the Docker client, which sent it
|
||||
to your terminal.
|
||||
|
||||
To try something more ambitious, you can run an Ubuntu container with:
|
||||
$ docker run -it ubuntu bash
|
||||
|
||||
For more examples and ideas, visit:
|
||||
http://docs.docker.com/userguide/
|
||||
|
||||
## Start the docker daemon at boot
|
||||
|
||||
|
@ -230,10 +194,8 @@ You can uninstall the Docker software with `yum`.
|
|||
|
||||
1. List the package you have installed.
|
||||
|
||||
$ yum list installed | grep docker
|
||||
yum list installed | grep docker
|
||||
docker-engine.x86_64 1.7.1-0.1.fc20
|
||||
@/docker-engine-1.7.1-0.1.fc20.el7.x86_64
|
||||
$ yum list installed | grep docker yum list installed | grep docker
|
||||
docker-engine.x86_64 1.7.1-0.1.fc21 @/docker-engine-1.7.1-0.1.fc21.el7.x86_64
|
||||
|
||||
2. Remove the package.
|
||||
|
||||
|
|
|
@ -8,86 +8,143 @@ parent = "smn_linux"
|
|||
+++
|
||||
<![end-metadata]-->
|
||||
|
||||
# Oracle Linux 6 and 7
|
||||
# Oracle Linux
|
||||
|
||||
You do not require an Oracle Linux Support subscription to install Docker on
|
||||
Oracle Linux.
|
||||
Docker is supported Oracle Linux 6 and 7. You do not require an Oracle Linux
|
||||
Support subscription to install Docker on Oracle Linux.
|
||||
|
||||
*For Oracle Linux customers with an active support subscription:*
|
||||
Docker is available in either the `ol6_x86_64_addons` or `ol7_x86_64_addons`
|
||||
channel for Oracle Linux 6 and Oracle Linux 7 on the [Unbreakable Linux Network
|
||||
(ULN)](https://linux.oracle.com).
|
||||
This page instructs you to install using Docker-managed release packages and
|
||||
installation mechanisms. Using these packages ensures you get the latest release
|
||||
of Docker. If you wish to install using Oracle-managed packages, consult your
|
||||
[Oracle Linux documentation](https://linux.oracle.com).
|
||||
|
||||
*For Oracle Linux users without an active support subscription:*
|
||||
Docker is available in the appropriate `ol6_addons` or `ol7_addons` repository
|
||||
on [Oracle Public Yum](http://public-yum.oracle.com).
|
||||
|
||||
Docker requires the use of the Unbreakable Enterprise Kernel Release 3 (3.8.13)
|
||||
or higher on Oracle Linux. This kernel supports the Docker btrfs storage engine
|
||||
on both Oracle Linux 6 and 7.
|
||||
## Prerequisites
|
||||
|
||||
Due to current Docker limitations, Docker is only able to run only on the x86_64
|
||||
architecture.
|
||||
architecture. Docker requires the use of the Unbreakable Enterprise Kernel
|
||||
Release 3 (3.8.13) or higher on Oracle Linux. This kernel supports the Docker
|
||||
btrfs storage engine on both Oracle Linux 6 and 7.
|
||||
|
||||
## To enable the *addons* channel via the Unbreakable Linux Network:
|
||||
|
||||
1. Enable either the *ol6\_x86\_64\_addons* or *ol7\_x86\_64\_addons* channel
|
||||
via the ULN web interface.
|
||||
Consult the [Unbreakable Linux Network User's
|
||||
Guide](http://docs.oracle.com/cd/E52668_01/E39381/html/index.html) for
|
||||
documentation on subscribing to channels.
|
||||
|
||||
## To enable the *addons* repository via Oracle Public Yum:
|
||||
## Install
|
||||
|
||||
The latest release of Oracle Linux 6 and 7 are automatically configured to use
|
||||
the Oracle Public Yum repositories during installation. However, the *addons*
|
||||
repository is not enabled by default.
|
||||
1. Log into your machine as a user with `sudo` or `root` privileges.
|
||||
|
||||
To enable the *addons* repository:
|
||||
2. Make sure your existing yum packages are up-to-date.
|
||||
|
||||
1. Edit either `/etc/yum.repos.d/public-yum-ol6.repo` or
|
||||
`/etc/yum.repos.d/public-yum-ol7.repo`
|
||||
and set `enabled=1` in the `[ol6_addons]` or the `[ol7_addons]` stanza.
|
||||
$ sudo yum update
|
||||
|
||||
## Installation
|
||||
3. Add the yum repo yourself.
|
||||
|
||||
1. Ensure the appropriate *addons* channel or repository has been enabled.
|
||||
For version 6:
|
||||
|
||||
2. Use yum to install the Docker package:
|
||||
$ cat >/etc/yum.repos.d/docker.repo <<-EOF
|
||||
[dockerrepo]
|
||||
name=Docker Repository
|
||||
baseurl=https://yum.dockerproject.org/repo/main/oraclelinux/6
|
||||
enabled=1
|
||||
gpgcheck=1
|
||||
gpgkey=https://yum.dockerproject.org/gpg
|
||||
EOF
|
||||
|
||||
For version 7:
|
||||
|
||||
$ cat >/etc/yum.repos.d/docker.repo <<-EOF
|
||||
[dockerrepo]
|
||||
name=Docker Repository
|
||||
baseurl=https://yum.dockerproject.org/repo/main/oraclelinux/7
|
||||
enabled=1
|
||||
gpgcheck=1
|
||||
gpgkey=https://yum.dockerproject.org/gpg
|
||||
EOF
|
||||
|
||||
4. Install the Docker package.
|
||||
|
||||
$ sudo yum install docker
|
||||
|
||||
## Starting Docker
|
||||
5. Start the Docker daemon.
|
||||
|
||||
1. Now that it's installed, start the Docker daemon:
|
||||
On Oracle Linux 6:
|
||||
|
||||
1. On Oracle Linux 6:
|
||||
$ sudo service docker start
|
||||
|
||||
$ sudo service docker start
|
||||
On Oracle Linux 7:
|
||||
|
||||
2. On Oracle Linux 7:
|
||||
$ sudo systemctl start docker.service
|
||||
|
||||
$ sudo systemctl start docker.service
|
||||
6. Verify `docker` is installed correctly by running a test image in a container.
|
||||
|
||||
2. If you want the Docker daemon to start automatically at boot:
|
||||
$ sudo docker run hello-world
|
||||
|
||||
1. On Oracle Linux 6:
|
||||
## Optional configurations
|
||||
|
||||
$ sudo chkconfig docker on
|
||||
This section contains optional procedures for configuring your Oracle Linux to work
|
||||
better with Docker.
|
||||
|
||||
2. On Oracle Linux 7:
|
||||
* [Create a docker group](#create-a-docker-group)
|
||||
* [Configure Docker to start on boot](#configure-docker-to-start-on-boot)
|
||||
* [Use the btrfs storage engine](#use-the-btrfs-storage-engine)
|
||||
|
||||
$ sudo systemctl enable docker.service
|
||||
### Create a Docker group
|
||||
|
||||
**Done!**
|
||||
The `docker` daemon binds to a Unix socket instead of a TCP port. By default
|
||||
that Unix socket is owned by the user `root` and other users can access it with
|
||||
`sudo`. For this reason, `docker` daemon always runs as the `root` user.
|
||||
|
||||
## Custom daemon options
|
||||
To avoid having to use `sudo` when you use the `docker` command, create a Unix
|
||||
group called `docker` and add users to it. When the `docker` daemon starts, it
|
||||
makes the ownership of the Unix socket read/writable by the `docker` group.
|
||||
|
||||
>**Warning**: The `docker` group is equivalent to the `root` user; For details
|
||||
>on how this impacts security in your system, see [*Docker Daemon Attack
|
||||
>Surface*](/articles/security/#docker-daemon-attack-surface) for details.
|
||||
|
||||
To create the `docker` group and add your user:
|
||||
|
||||
1. Log into Oracle Linux as a user with `sudo` privileges.
|
||||
|
||||
2. Create the `docker` group and add your user.
|
||||
|
||||
sudo usermod -aG docker username
|
||||
|
||||
3. Log out and log back in.
|
||||
|
||||
This ensures your user is running with the correct permissions.
|
||||
|
||||
4. Verify your work by running `docker` without `sudo`.
|
||||
|
||||
$ docker run hello-world
|
||||
|
||||
If this fails with a message similar to this:
|
||||
|
||||
Cannot connect to the Docker daemon. Is 'docker daemon' running on this host?
|
||||
|
||||
Check that the `DOCKER_HOST` environment variable is not set for your shell.
|
||||
If it is, unset it.
|
||||
|
||||
### Configure Docker to start on boot
|
||||
|
||||
You can configure the Docker daemon to start automatically at boot.
|
||||
|
||||
On Oracle Linux 6:
|
||||
|
||||
```
|
||||
$ sudo chkconfig docker on
|
||||
```
|
||||
|
||||
On Oracle Linux 7:
|
||||
|
||||
```
|
||||
$ sudo systemctl enable docker.service
|
||||
```
|
||||
|
||||
If you need to add an HTTP Proxy, set a different directory or partition for the
|
||||
Docker runtime files, or make other customizations, read our systemd article to
|
||||
learn how to [customize your systemd Docker daemon options](/articles/systemd/).
|
||||
|
||||
## Using the btrfs storage engine
|
||||
### Use the btrfs storage engine
|
||||
|
||||
Docker on Oracle Linux 6 and 7 supports the use of the btrfs storage engine.
|
||||
Before enabling btrfs support, ensure that `/var/lib/docker` is stored on a
|
||||
|
@ -100,10 +157,10 @@ on how to create and mount btrfs filesystems.
|
|||
To enable btrfs support on Oracle Linux:
|
||||
|
||||
1. Ensure that `/var/lib/docker` is on a btrfs filesystem.
|
||||
1. Edit `/etc/sysconfig/docker` and add `-s btrfs` to the `OTHER_ARGS` field.
|
||||
2. Restart the Docker daemon:
|
||||
|
||||
You can now continue with the [Docker User Guide](/userguide/).
|
||||
2. Edit `/etc/sysconfig/docker` and add `-s btrfs` to the `OTHER_ARGS` field.
|
||||
|
||||
3. Restart the Docker daemon:
|
||||
|
||||
## Uninstallation
|
||||
|
||||
|
|
|
@ -5,19 +5,17 @@ description = "Instructions for installing Docker on Red Hat Enterprise Linux."
|
|||
keywords = ["Docker, Docker documentation, requirements, linux, rhel"]
|
||||
[menu.main]
|
||||
parent = "smn_linux"
|
||||
weight = -5
|
||||
+++
|
||||
<![end-metadata]-->
|
||||
|
||||
# Red Hat Enterprise Linux
|
||||
|
||||
Docker is supported on the following versions of RHEL:
|
||||
|
||||
- Red Hat Enterprise Linux 7
|
||||
|
||||
This page instructs you to install using Docker-managed release packages and
|
||||
installation mechanisms. Using these packages ensures you get the latest release
|
||||
of Docker. If you wish to install using Red Hat-managed packages, consult your
|
||||
Red Hat release documentation for information on Red Hat's Docker support.
|
||||
Docker is supported on Red Hat Enterprise Linux 7. This page instructs you to
|
||||
install using Docker-managed release packages and installation mechanisms. Using
|
||||
these packages ensures you get the latest release of Docker. If you wish to
|
||||
install using Red Hat-managed packages, consult your Red Hat release
|
||||
documentation for information on Red Hat's Docker support.
|
||||
|
||||
## Prerequisites
|
||||
|
||||
|
@ -37,7 +35,62 @@ packages.
|
|||
|
||||
## Install Docker Engine
|
||||
|
||||
There are two ways to install Docker Engine. You can use `curl` with the `get.docker.com` site. This method runs an installation script which installs via the `yum` package manager. Or you can install with the `yum` package manager directly yourself.
|
||||
There are two ways to install Docker Engine. You can install with the `yum` package manager directly yourself. Or you can use `curl` with the `get.docker.com` site. This second method runs an installation script which installs via the `yum` package manager.
|
||||
|
||||
### Install with yum
|
||||
|
||||
1. Log into your machine as a user with `sudo` or `root` privileges.
|
||||
|
||||
2. Make sure your existing yum packages are up-to-date.
|
||||
|
||||
$ sudo yum update
|
||||
|
||||
3. Add the yum repo yourself.
|
||||
|
||||
$ cat >/etc/yum.repos.d/docker.repo <<-EOF
|
||||
[dockerrepo]
|
||||
name=Docker Repository
|
||||
baseurl=https://yum.dockerproject.org/repo/main/centos/7
|
||||
enabled=1
|
||||
gpgcheck=1
|
||||
gpgkey=https://yum.dockerproject.org/gpg
|
||||
EOF
|
||||
|
||||
4. Install the Docker package.
|
||||
|
||||
$ sudo yum install docker-engine
|
||||
|
||||
5. Start the Docker daemon.
|
||||
|
||||
$ sudo service docker start
|
||||
|
||||
6. Verify `docker` is installed correctly by running a test image in a container.
|
||||
|
||||
$ sudo docker run hello-world
|
||||
Unable to find image 'hello-world:latest' locally
|
||||
latest: Pulling from hello-world
|
||||
a8219747be10: Pull complete
|
||||
91c95931e552: Already exists
|
||||
hello-world:latest: The image you are pulling has been verified. Important: image verification is a tech preview feature and should not be relied on to provide security.
|
||||
Digest: sha256:aa03e5d0d5553b4c3473e89c8619cf79df368babd1.7.1cf5daeb82aab55838d
|
||||
Status: Downloaded newer image for hello-world:latest
|
||||
Hello from Docker.
|
||||
This message shows that your installation appears to be working correctly.
|
||||
|
||||
To generate this message, Docker took the following steps:
|
||||
1. The Docker client contacted the Docker daemon.
|
||||
2. The Docker daemon pulled the "hello-world" image from the Docker Hub.
|
||||
(Assuming it was not already locally available.)
|
||||
3. The Docker daemon created a new container from that image which runs the
|
||||
executable that produces the output you are currently reading.
|
||||
4. The Docker daemon streamed that output to the Docker client, which sent it
|
||||
to your terminal.
|
||||
|
||||
To try something more ambitious, you can run an Ubuntu container with:
|
||||
$ docker run -it ubuntu bash
|
||||
|
||||
For more examples and ideas, visit:
|
||||
http://docs.docker.com/userguide/
|
||||
|
||||
### Install with the script
|
||||
|
||||
|
@ -60,63 +113,6 @@ You use the same installation procedure for all versions of CentOS.
|
|||
5. Verify `docker` is installed correctly by running a test image in a container.
|
||||
|
||||
$ sudo docker run hello-world
|
||||
Unable to find image 'hello-world:latest' locally
|
||||
latest: Pulling from hello-world
|
||||
a8219747be10: Pull complete
|
||||
91c95931e552: Already exists
|
||||
hello-world:latest: The image you are pulling has been verified. Important: image verification is a tech preview feature and should not be relied on to provide security.
|
||||
Digest: sha256:aa03e5d0d5553b4c3473e89c8619cf79df368babd1.7.1cf5daeb82aab55838d
|
||||
Status: Downloaded newer image for hello-world:latest
|
||||
Hello from Docker.
|
||||
This message shows that your installation appears to be working correctly.
|
||||
|
||||
To generate this message, Docker took the following steps:
|
||||
1. The Docker client contacted the Docker daemon.
|
||||
2. The Docker daemon pulled the "hello-world" image from the Docker Hub.
|
||||
(Assuming it was not already locally available.)
|
||||
3. The Docker daemon created a new container from that image which runs the
|
||||
executable that produces the output you are currently reading.
|
||||
4. The Docker daemon streamed that output to the Docker client, which sent it
|
||||
to your terminal.
|
||||
|
||||
To try something more ambitious, you can run an Ubuntu container with:
|
||||
$ docker run -it ubuntu bash
|
||||
|
||||
For more examples and ideas, visit:
|
||||
http://docs.docker.com/userguide/
|
||||
|
||||
### Install without the script
|
||||
|
||||
1. Log into your machine as a user with `sudo` or `root` privileges.
|
||||
|
||||
2. Make sure your existing yum packages are up-to-date.
|
||||
|
||||
$ sudo yum update
|
||||
|
||||
3. Add the yum repo yourself.
|
||||
|
||||
For RHEL 7 run:
|
||||
|
||||
$ cat >/etc/yum.repos.d/docker.repo <<-EOF
|
||||
[dockerrepo]
|
||||
name=Docker Repository
|
||||
baseurl=https://yum.dockerproject.org/repo/main/centos/7
|
||||
enabled=1
|
||||
gpgcheck=1
|
||||
gpgkey=https://yum.dockerproject.org/gpg
|
||||
EOF
|
||||
|
||||
4. Install the Docker package.
|
||||
|
||||
$ sudo yum install docker-engine
|
||||
|
||||
5. Start the Docker daemon.
|
||||
|
||||
$ sudo service docker start
|
||||
|
||||
6. Verify `docker` is installed correctly by running a test image in a container.
|
||||
|
||||
$ sudo docker run hello-world
|
||||
|
||||
## Create a docker group
|
||||
|
||||
|
@ -167,8 +163,7 @@ You can uninstall the Docker software with `yum`.
|
|||
|
||||
$ yum list installed | grep docker
|
||||
yum list installed | grep docker
|
||||
docker-engine.x86_64 1.7.1-0.1.el7
|
||||
@/docker-engine-1.7.1-0.1.el7.x86_64
|
||||
docker-engine.x86_64 1.7.1-0.1.el7@/docker-engine-1.7.1-0.1.el7.x86_64
|
||||
|
||||
2. Remove the package.
|
||||
|
||||
|
|
|
@ -2,9 +2,10 @@
|
|||
+++
|
||||
title = "Installation on Ubuntu "
|
||||
description = "Instructions for installing Docker on Ubuntu. "
|
||||
keywords = ["Docker, Docker documentation, requirements, virtualbox, installation, ubuntu"]
|
||||
keywords = ["Docker, Docker documentation, requirements, apt, installation, ubuntu"]
|
||||
[menu.main]
|
||||
parent = "smn_linux"
|
||||
weight = -6
|
||||
+++
|
||||
<![end-metadata]-->
|
||||
|
||||
|
@ -12,6 +13,7 @@ parent = "smn_linux"
|
|||
|
||||
Docker is supported on these Ubuntu operating systems:
|
||||
|
||||
- Ubuntu Wily 15.10
|
||||
- Ubuntu Vivid 15.04
|
||||
- Ubuntu Trusty 14.04 (LTS)
|
||||
- Ubuntu Precise 12.04 (LTS)
|
||||
|
@ -21,6 +23,8 @@ installation mechanisms. Using these packages ensures you get the latest release
|
|||
of Docker. If you wish to install using Ubuntu-managed packages, consult your
|
||||
Ubuntu documentation.
|
||||
|
||||
>**Note**: Ubuntu Utopic 14.10 exists in Docker's `apt` repository but it is no longer officially supported.
|
||||
|
||||
## Prerequisites
|
||||
|
||||
Docker requires a 64-bit installation regardless of your Ubuntu version.
|
||||
|
@ -31,26 +35,70 @@ Kernels older than 3.10 lack some of the features required to run Docker
|
|||
containers. These older versions are known to have bugs which cause data loss
|
||||
and frequently panic under certain conditions.
|
||||
|
||||
To check your current kernel version, open a terminal and use `uname -r` to display
|
||||
your kernel version:
|
||||
To check your current kernel version, open a terminal and use `uname -r` to
|
||||
display your kernel version:
|
||||
|
||||
$ uname -r
|
||||
3.11.0-15-generic
|
||||
|
||||
>**Caution** Some Ubuntu OS versions **require a version higher than 3.10** to
|
||||
>run Docker, see the prerequisites on this page that apply to your Ubuntu
|
||||
>version.
|
||||
>**Note**: If you previously installed Docker using `apt`, make sure you update
|
||||
your `apt` sources to the new Docker repository.
|
||||
|
||||
### Update your apt sources
|
||||
|
||||
### For Vivid 15.04
|
||||
Docker's `apt` repository contains Docker 1.7.1 and higher. To set `apt` to use
|
||||
packages from the new repository:
|
||||
|
||||
There are no prerequisites for this version.
|
||||
1. If you haven't already done so, log into your Ubuntu instance.
|
||||
|
||||
### For Trusty 14.04
|
||||
2. Open a terminal window.
|
||||
|
||||
There are no prerequisites for this version.
|
||||
3. Add the new `gpg` key.
|
||||
|
||||
### For Precise 12.04 (LTS)
|
||||
$ apt-key adv --keyserver hkp://pgp.mit.edu:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
|
||||
|
||||
4. Open the `/etc/apt/sources.list.d/docker.list` file in your favorite editor.
|
||||
|
||||
If the file doesn't exist, create it.
|
||||
|
||||
5. Remove any existing entries.
|
||||
|
||||
6. Add an entry for your Ubuntu operating system.
|
||||
|
||||
The possible entries are:
|
||||
|
||||
# Ubuntu Precise
|
||||
deb https://apt.dockerproject.org/repo ubuntu-precise main
|
||||
# Ubuntu Trusty
|
||||
deb https://apt.dockerproject.org/repo ubuntu-trusty main
|
||||
# Ubuntu Vivid
|
||||
deb https://apt.dockerproject.org/repo ubuntu-vivid main
|
||||
# Ubuntu Wily
|
||||
deb https://apt.dockerproject.org/repo ubuntu-wily main
|
||||
|
||||
7. Save and close the `/etc/apt/sources.list.d/docker.list` file.
|
||||
|
||||
8. Update the `apt` package index.
|
||||
|
||||
$ apt-get update
|
||||
|
||||
9. Purge the old repo if it exists.
|
||||
|
||||
$ apt-get purge lxc-docker*
|
||||
|
||||
10. Verify that `apt` is pulling from the right repository.
|
||||
|
||||
$ apt-cache policy docker-engine
|
||||
|
||||
From now on when you run `apt-get upgrade`, `apt` pulls from the new repository.
|
||||
|
||||
### Prerequisites by Ubuntu Version
|
||||
|
||||
The following Ubuntu versions have no additional prerequisites:
|
||||
|
||||
- Ubuntu Wily 15.10
|
||||
- Ubuntu Vivid 15.04
|
||||
- Ubuntu Trusty 14.04 (LTS)
|
||||
|
||||
For Ubuntu Precise, Docker requires the 3.13 kernel version. If your kernel
|
||||
version is older than 3.13, you must upgrade it. Refer to this table to see
|
||||
|
@ -69,12 +117,13 @@ kernel, then you can skip these headers for the"trusty" kernel. If you're
|
|||
unsure, you should include this package for safety.</td> </tr> <tr> <td
|
||||
class="tg-031">xserver-xorg-lts-trusty</td> <td class="tg-031e"
|
||||
rowspan="2">Optional in non-graphical environments without Unity/Xorg.
|
||||
<i>Required</i> when running Docker on machine with a graphical environment.
|
||||
|
||||
<p>To learn more about the reasons for these packages, read the installation
|
||||
<b>Required</b> when running Docker on machine with a graphical environment.
|
||||
<br>
|
||||
<br>To learn more about the reasons for these packages, read the installation
|
||||
instructions for backported kernels, specifically the <a
|
||||
href="https://wiki.ubuntu.com/Kernel/LTSEnablementStack" target="_blank">LTS
|
||||
Enablement Stack</a> — refer to note 5 under each version.</p></td> </tr>
|
||||
Enablement Stack</a> — refer to note 5 under each version.
|
||||
</td> </tr>
|
||||
<tr> <td class="tg-031">libgl1-mesa-glx-lts-trusty</td> </tr> </table>
|
||||
|
||||
To upgrade your kernel and install the additional packages, do the following:
|
||||
|
@ -95,37 +144,24 @@ To upgrade your kernel and install the additional packages, do the following:
|
|||
|
||||
$ sudo reboot
|
||||
|
||||
5. After your system reboots, go ahead and [install Docker](#installation).
|
||||
5. After your system reboots, go ahead and install Docker.
|
||||
|
||||
## Installation
|
||||
|
||||
|
||||
## Install
|
||||
|
||||
Make sure you have installed the prerequisites for your Ubuntu version. Then,
|
||||
install Docker using the following:
|
||||
|
||||
1. Log into your Ubuntu installation as a user with `sudo` privileges.
|
||||
|
||||
2. Verify that you have `curl` installed.
|
||||
|
||||
$ which curl
|
||||
|
||||
If `curl` isn't installed, install it after updating your manager:
|
||||
2. Update your `apt` package index.
|
||||
|
||||
$ sudo apt-get update
|
||||
$ sudo apt-get install curl
|
||||
|
||||
3. Get the latest Docker package.
|
||||
3. Install Docker.
|
||||
|
||||
$ curl -sSL https://get.docker.com/ | sh
|
||||
|
||||
The system prompts you for your `sudo` password. Then, it downloads and
|
||||
installs Docker and its dependencies.
|
||||
|
||||
>**Note**: If your company is behind a filtering proxy, you may find that the
|
||||
>`apt-key`
|
||||
>command fails for the Docker repo during installation. To work around this,
|
||||
>add the key directly using the following:
|
||||
>
|
||||
> $ curl -sSL https://get.docker.com/gpg | sudo apt-key add -
|
||||
$ sudo apt-get install docker-engine
|
||||
|
||||
4. Start the `docker` daemon.
|
||||
|
||||
|
@ -135,9 +171,10 @@ install Docker using the following:
|
|||
|
||||
$ sudo docker run hello-world
|
||||
|
||||
This command downloads a test image and runs it in a container.
|
||||
This command downloads a test image and runs it in a container. When the
|
||||
container runs, it prints an informational message. Then, it exits.
|
||||
|
||||
## Optional configurations for Docker on Ubuntu
|
||||
## Optional configurations
|
||||
|
||||
This section contains optional procedures for configuring your Ubuntu to work
|
||||
better with Docker.
|
||||
|
@ -145,7 +182,7 @@ better with Docker.
|
|||
* [Create a docker group](#create-a-docker-group)
|
||||
* [Adjust memory and swap accounting](#adjust-memory-and-swap-accounting)
|
||||
* [Enable UFW forwarding](#enable-ufw-forwarding)
|
||||
* [Configure a DNS server for use by Docker](#configure-a-dns-server-for-docker)
|
||||
* [Configure a DNS server for use by Docker](#configure-a-dns-server-for-use-by-docker)
|
||||
* [Configure Docker to start on boot](#configure-docker-to-start-on-boot)
|
||||
|
||||
### Create a Docker group
|
||||
|
@ -335,16 +372,14 @@ For `15.04` and up, to configure the `docker` daemon to start on boot, run
|
|||
|
||||
$ sudo systemctl enable docker
|
||||
|
||||
|
||||
|
||||
For `14.10` and below the above installation method automatically configures `upstart`
|
||||
to start the docker daemon on boot
|
||||
|
||||
## Upgrade Docker
|
||||
|
||||
To install the latest version of Docker with `curl`:
|
||||
To install the latest version of Docker with `apt-get`:
|
||||
|
||||
$ curl -sSL https://get.docker.com/ | sh
|
||||
$ apt-get upgrade docker-engine
|
||||
|
||||
## Uninstallation
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue