From 6531a767edacbd4e506f3f7e27f0d45d28ac339a Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Fri, 8 Nov 2024 12:15:02 +0100 Subject: [PATCH] engine/install: enable engine as system service on rpm installs Unlike deb-based systems, installing an rpm doesn't automatically start the Docker service, and starting the service doesn't make it automatically start on (re)boot. Update the instructions so that Docker is automatically started on boot. Signed-off-by: Sebastiaan van Stijn --- content/manuals/engine/install/centos.md | 20 ++++++++++++++---- content/manuals/engine/install/fedora.md | 26 +++++++++++++++--------- content/manuals/engine/install/rhel.md | 20 ++++++++++++++---- content/manuals/engine/install/sles.md | 20 ++++++++++++++---- 4 files changed, 64 insertions(+), 22 deletions(-) diff --git a/content/manuals/engine/install/centos.md b/content/manuals/engine/install/centos.md index 50529472c182..99780add82f3 100644 --- a/content/manuals/engine/install/centos.md +++ b/content/manuals/engine/install/centos.md @@ -142,12 +142,18 @@ $ sudo yum-config-manager --add-repo {{% param "download-url-base" %}}/docker-ce {{< /tab >}} {{< /tabs >}} -2. Start Docker. +2. Start Docker Engine. + + Start the Docker Engine and containerd as a systemd service that will launch + on boot: ```console - $ sudo systemctl start docker + $ sudo systemctl enable --now containerd docker ``` + If you prefer Docker to only start manually, use `sudo systemctl start docker` + instead, which runs it only for the current session. + 3. Verify that the Docker Engine installation is successful by running the `hello-world` image. @@ -188,12 +194,18 @@ download a new file each time you want to upgrade Docker Engine. Docker is installed but not started. The `docker` group is created, but no users are added to the group. -3. Start Docker. +3. Start Docker Engine. + + Start the Docker Engine and containerd as a systemd service that will launch + on boot: ```console - $ sudo systemctl start docker + $ sudo systemctl enable --now containerd docker ``` + If you prefer Docker to only start manually, use `sudo systemctl start docker` + instead, which runs it only for the current session. + 4. Verify that the Docker Engine installation is successful by running the `hello-world` image. diff --git a/content/manuals/engine/install/fedora.md b/content/manuals/engine/install/fedora.md index 7e7123883523..203606764f45 100644 --- a/content/manuals/engine/install/fedora.md +++ b/content/manuals/engine/install/fedora.md @@ -139,12 +139,18 @@ $ sudo dnf-3 config-manager --add-repo {{% param "download-url-base" %}}/docker- {{< /tab >}} {{< /tabs >}} -2. Start Docker. +2. Start Docker Engine. + + Start the Docker Engine and containerd as a systemd service that will launch + on boot: ```console - $ sudo systemctl start docker + $ sudo systemctl enable --now containerd docker ``` + If you prefer Docker to only start manually, use `sudo systemctl start docker` + instead, which runs it only for the current session. + 3. Verify that the Docker Engine installation is successful by running the `hello-world` image. @@ -185,19 +191,19 @@ download a new file each time you want to upgrade Docker Engine. Docker is installed but not started. The `docker` group is created, but no users are added to the group. -3. Start Docker. - - ```console - $ sudo systemctl start docker - ``` +3. Start Docker Engine. -4. Make Docker start automatically after reboot. + Start the Docker Engine and containerd as a systemd service that will launch + on boot: ```console - $ sudo systemctl enable docker + $ sudo systemctl enable --now containerd docker ``` -5. Verify that the Docker Engine installation is successful by running the + If you prefer Docker to only start manually, use `sudo systemctl start docker` + instead, which runs it only for the current session. + +4. Verify that the Docker Engine installation is successful by running the `hello-world` image. ```console diff --git a/content/manuals/engine/install/rhel.md b/content/manuals/engine/install/rhel.md index c7a6ad09b88e..24f4118d5cab 100644 --- a/content/manuals/engine/install/rhel.md +++ b/content/manuals/engine/install/rhel.md @@ -143,12 +143,18 @@ $ sudo yum-config-manager --add-repo {{% param "download-url-base" %}}/docker-ce {{< /tab >}} {{< /tabs >}} -2. Start Docker. +2. Start Docker Engine. + + Start the Docker Engine and containerd as a systemd service that will launch + on boot: ```console - $ sudo systemctl start docker + $ sudo systemctl enable --now containerd docker ``` + If you prefer Docker to only start manually, use `sudo systemctl start docker` + instead, which runs it only for the current session. + 3. Verify that the Docker Engine installation is successful by running the `hello-world` image. @@ -205,12 +211,18 @@ download a new file each time you want to upgrade Docker Engine. Docker is installed but not started. The `docker` group is created, but no users are added to the group. -6. Start Docker. +6. Start Docker Engine. + + Start the Docker Engine and containerd as a systemd service that will launch + on boot: ```console - $ sudo systemctl start docker + $ sudo systemctl enable --now containerd docker ``` + If you prefer Docker to only start manually, use `sudo systemctl start docker` + instead, which runs it only for the current session. + 7. Verify that the Docker Engine installation is successful by running the `hello-world` image. diff --git a/content/manuals/engine/install/sles.md b/content/manuals/engine/install/sles.md index 39f73b54cf7f..8d3fa3d0a6d3 100644 --- a/content/manuals/engine/install/sles.md +++ b/content/manuals/engine/install/sles.md @@ -162,12 +162,18 @@ $ sudo zypper addrepo {{% param "download-url-base" %}}/docker-ce.repo {{< /tab >}} {{< /tabs >}} -2. Start Docker. +2. Start Docker Engine. + + Start the Docker Engine and containerd as a systemd service that will launch + on boot: ```console - $ sudo systemctl start docker + $ sudo systemctl enable --now containerd docker ``` + If you prefer Docker to only start manually, use `sudo systemctl start docker` + instead, which runs it only for the current session. + 3. Verify that the Docker Engine installation is successful by running the `hello-world` image. @@ -208,12 +214,18 @@ download a new file each time you want to upgrade Docker Engine. Docker is installed but not started. The `docker` group is created, but no users are added to the group. -3. Start Docker. +3. Start Docker Engine. + + Start the Docker Engine and containerd as a systemd service that will launch + on boot: ```console - $ sudo systemctl start docker + $ sudo systemctl enable --now containerd docker ``` + If you prefer Docker to only start manually, use `sudo systemctl start docker` + instead, which runs it only for the current session. + 4. Verify that the Docker Engine installation is successful by running the `hello-world` image.