Make sure that the users enable both the socket and service for docker
as part of the default install instructions. If both are not enabled
docker will not start at boot and restart containers.
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
| ... | ... |
@@ -60,11 +60,15 @@ There are two ways to install Docker Engine. You can install with the `dnf` pac |
| 60 | 60 |
|
| 61 | 61 |
$ sudo dnf install docker-engine |
| 62 | 62 |
|
| 63 |
-5. Start the Docker daemon. |
|
| 63 |
+5. Enable the socket and service. |
|
| 64 |
+ |
|
| 65 |
+ $ sudo systemctl enable docker.socket docker.service |
|
| 66 |
+ |
|
| 67 |
+6. Start the Docker daemon. |
|
| 64 | 68 |
|
| 65 | 69 |
$ sudo systemctl start docker |
| 66 | 70 |
|
| 67 |
-6. Verify `docker` is installed correctly by running a test image in a container. |
|
| 71 |
+7. Verify `docker` is installed correctly by running a test image in a container. |
|
| 68 | 72 |
|
| 69 | 73 |
|
| 70 | 74 |
$ sudo docker run hello-world |
| ... | ... |
@@ -109,11 +113,15 @@ There are two ways to install Docker Engine. You can install with the `dnf` pac |
| 109 | 109 |
|
| 110 | 110 |
This script adds the `docker.repo` repository and installs Docker. |
| 111 | 111 |
|
| 112 |
-4. Start the Docker daemon. |
|
| 112 |
+4. Enable the socket and service. |
|
| 113 |
+ |
|
| 114 |
+ $ sudo systemctl enable docker.socket docker.service |
|
| 115 |
+ |
|
| 116 |
+5. Start the Docker daemon. |
|
| 113 | 117 |
|
| 114 | 118 |
$ sudo systemctl start docker |
| 115 | 119 |
|
| 116 |
-5. Verify `docker` is installed correctly by running a test image in a container. |
|
| 120 |
+6. Verify `docker` is installed correctly by running a test image in a container. |
|
| 117 | 121 |
|
| 118 | 122 |
$ sudo docker run hello-world |
| 119 | 123 |
|
| ... | ... |
@@ -151,12 +159,6 @@ To create the `docker` group and add your user: |
| 151 | 151 |
|
| 152 | 152 |
$ docker run hello-world |
| 153 | 153 |
|
| 154 |
-## Start the docker daemon at boot |
|
| 155 |
- |
|
| 156 |
-To ensure Docker starts when you boot your system, do the following: |
|
| 157 |
- |
|
| 158 |
- $ sudo systemctl enable docker |
|
| 159 |
- |
|
| 160 | 154 |
If you need to add an HTTP Proxy, set a different directory or partition for the |
| 161 | 155 |
Docker runtime files, or make other customizations, read our Systemd article to |
| 162 | 156 |
learn how to [customize your Systemd Docker daemon options](../../admin/systemd.md). |