diff --git a/_vale/config/vocabularies/Docker/accept.txt b/_vale/config/vocabularies/Docker/accept.txt index 774adcc4ca36..37e782dc22ba 100644 --- a/_vale/config/vocabularies/Docker/accept.txt +++ b/_vale/config/vocabularies/Docker/accept.txt @@ -76,6 +76,7 @@ Jamf JFrog JetBrains Kerberos +[Kk]eyrings? Kitematic Kubernetes LTS diff --git a/content/manuals/build/buildkit/dockerfile-release-notes.md b/content/manuals/build/buildkit/dockerfile-release-notes.md index a5964298e74f..7505071da589 100644 --- a/content/manuals/build/buildkit/dockerfile-release-notes.md +++ b/content/manuals/build/buildkit/dockerfile-release-notes.md @@ -13,6 +13,21 @@ issues, and bug fixes in [Dockerfile reference](/reference/dockerfile.md). For usage, see the [Dockerfile frontend syntax](frontend.md) page. +## 1.11.1 + +{{< release-date date="2024-11-08" >}} + +The full release note for this release is available +[on GitHub](https://github.com/moby/buildkit/releases/tag/dockerfile%2F1.11.1). + +```dockerfile +# syntax=docker/dockerfile:1.11.1 +``` + +- Fix regression when using the `ONBUILD` instruction in stages inherited within the same Dockerfile. [moby/buildkit#5490] + +[moby/buildkit#5490]: https://github.com/moby/buildkit/pull/5490 + ## 1.11.0 {{< release-date date="2024-10-30" >}} diff --git a/content/manuals/build/ci/github-actions/multi-platform.md b/content/manuals/build/ci/github-actions/multi-platform.md index 5fb013ed7ef5..0d4d2bfd58c7 100644 --- a/content/manuals/build/ci/github-actions/multi-platform.md +++ b/content/manuals/build/ci/github-actions/multi-platform.md @@ -45,6 +45,59 @@ jobs: tags: user/app:latest ``` +## Build and load multi-platform images + +The default Docker setup for GitHub Actions runners does not support loading +multi-platform images to the local image store of the runner after building +them. To load a multi-platform image, you need to enable the containerd image +store option for the Docker Engine. + +There is no way to configure the default Docker setup in the GitHub Actions +runners directly, but you can use the `crazy-max/ghaction-setup-docker` action +to customize the Docker Engine and CLI settings for a job. + +The following example workflow enables the containerd image store, builds a +multi-platform image, and loads the results into the GitHub runner's local +image store. + +```yaml +name: ci + +on: + push: + +jobs: + docker: + runs-on: ubuntu-latest + steps: + - name: Set up Docker + uses: crazy-max/ghaction-setup-docker@v3 + with: + daemon-config: | + { + "debug": true, + "features": { + "containerd-snapshotter": true + } + } + + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + + - name: Login to Docker Hub + uses: docker/login-action@v3 + with: + username: ${{ vars.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + + - name: Build and push + uses: docker/build-push-action@v6 + with: + platforms: linux/amd64,linux/arm64 + load: true + tags: user/app:latest +``` + ## Distribute build across multiple runners In the previous example, each platform is built on the same runner which can diff --git a/content/manuals/engine/install/centos.md b/content/manuals/engine/install/centos.md index 50529472c182..c560cea9fa45 100644 --- a/content/manuals/engine/install/centos.md +++ b/content/manuals/engine/install/centos.md @@ -1,7 +1,7 @@ --- description: Learn how to install Docker Engine on CentOS. These instructions cover the different installation methods, how to uninstall, and next steps. -keywords: requirements, yum, installation, centos, install, uninstall, docker engine, upgrade, update +keywords: requirements, dnf, yum, installation, centos, install, uninstall, docker engine, upgrade, update title: Install Docker Engine on CentOS linkTitle: CentOS weight: 60 @@ -36,12 +36,14 @@ default. If you have disabled it, you need to re-enable it. ### Uninstall old versions -Older versions of Docker went by `docker` or `docker-engine`. -Uninstall any such older versions before attempting to install a new version, -along with associated dependencies. +Before you can install Docker Engine, you need to uninstall any conflicting packages. + +Your Linux distribution may provide unofficial Docker packages, which may conflict +with the official packages provided by Docker. You must uninstall these packages +before you install the official version of Docker Engine. ```console -$ sudo yum remove docker \ +$ sudo dnf remove docker \ docker-client \ docker-client-latest \ docker-common \ @@ -51,7 +53,7 @@ $ sudo yum remove docker \ docker-engine ``` -`yum` might report that you have none of these packages installed. +`dnf` might report that you have none of these packages installed. Images, containers, volumes, and networks stored in `/var/lib/docker/` aren't automatically removed when you uninstall Docker. @@ -81,17 +83,17 @@ Docker from the repository. #### Set up the repository -Install the `yum-utils` package (which provides the `yum-config-manager` -utility) and set up the repository. +Install the `dnf-plugins-core` package (which provides the commands to manage +your DNF repositories) and set up the repository. ```console -$ sudo yum install -y yum-utils -$ sudo yum-config-manager --add-repo {{% param "download-url-base" %}}/docker-ce.repo +$ sudo dnf -y install dnf-plugins-core +$ sudo dnf config-manager --add-repo {{% param "download-url-base" %}}/docker-ce.repo ``` #### Install Docker Engine -1. Install Docker Engine, containerd, and Docker Compose: +1. Install the Docker packages. {{< tabs >}} {{< tab name="Latest" >}} @@ -99,7 +101,7 @@ $ sudo yum-config-manager --add-repo {{% param "download-url-base" %}}/docker-ce To install the latest version, run: ```console - $ sudo yum install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin + $ sudo dnf install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin ``` If prompted to accept the GPG key, verify that the fingerprint matches @@ -115,7 +117,7 @@ $ sudo yum-config-manager --add-repo {{% param "download-url-base" %}}/docker-ce the repository: ```console - $ yum list docker-ce --showduplicates | sort -r + $ dnf list docker-ce --showduplicates | sort -r docker-ce.x86_64 3:27.3.1-1.el9 docker-ce-stable docker-ce.x86_64 3:27.3.0-1.el9 docker-ce-stable @@ -133,7 +135,7 @@ $ sudo yum-config-manager --add-repo {{% param "download-url-base" %}}/docker-ce command to install: ```console - $ sudo yum install docker-ce- docker-ce-cli- containerd.io docker-buildx-plugin docker-compose-plugin + $ sudo dnf install docker-ce- docker-ce-cli- containerd.io docker-buildx-plugin docker-compose-plugin ``` This command installs Docker, but it doesn't start Docker. It also creates a @@ -142,14 +144,17 @@ $ sudo yum-config-manager --add-repo {{% param "download-url-base" %}}/docker-ce {{< /tab >}} {{< /tabs >}} -2. Start Docker. +2. Start Docker Engine. ```console - $ sudo systemctl start docker + $ sudo systemctl enable --now docker ``` -3. Verify that the Docker Engine installation is successful by running the - `hello-world` image. + This configures the Docker systemd service to start automatically when you + boot your system. If you don't want Docker to start automatically, use `sudo + systemctl start docker` instead. + +3. Verify that the installation is successful by running the `hello-world` image: ```console $ sudo docker run hello-world @@ -182,20 +187,23 @@ download a new file each time you want to upgrade Docker Engine. the Docker package. ```console - $ sudo yum install /path/to/package.rpm + $ sudo dnf install /path/to/package.rpm ``` 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. ```console - $ sudo systemctl start docker + $ sudo systemctl enable --now docker ``` -4. Verify that the Docker Engine installation is successful by running the - `hello-world` image. + This configures the Docker systemd service to start automatically when you + boot your system. If you don't want Docker to start automatically, use `sudo + systemctl start docker` instead. + +4. Verify that the installation is successful by running the `hello-world` image: ```console $ sudo docker run hello-world @@ -211,8 +219,8 @@ You have now successfully installed and started Docker Engine. #### Upgrade Docker Engine To upgrade Docker Engine, download the newer package files and repeat the -[installation procedure](#install-from-a-package), using `yum -y upgrade` -instead of `yum -y install`, and point to the new files. +[installation procedure](#install-from-a-package), using `dnf upgrade` +instead of `dnf install`, and point to the new files. {{< include "install-script.md" >}} @@ -221,7 +229,7 @@ instead of `yum -y install`, and point to the new files. 1. Uninstall the Docker Engine, CLI, containerd, and Docker Compose packages: ```console - $ sudo yum remove docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin docker-ce-rootless-extras + $ sudo dnf remove docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin docker-ce-rootless-extras ``` 2. Images, containers, volumes, or custom configuration files on your host diff --git a/content/manuals/engine/install/debian.md b/content/manuals/engine/install/debian.md index 9f16f925baf4..ebb0b94d56b6 100644 --- a/content/manuals/engine/install/debian.md +++ b/content/manuals/engine/install/debian.md @@ -52,9 +52,9 @@ and ppc64le (ppc64el) architectures. Before you can install Docker Engine, you need to uninstall any conflicting packages. -Distro maintainers provide unofficial distributions of Docker packages in -their repositories. You must uninstall these packages before you can install the -official version of Docker Engine. +Your Linux distribution may provide unofficial Docker packages, which may conflict +with the official packages provided by Docker. You must uninstall these packages +before you install the official version of Docker Engine. The unofficial packages to uninstall are: @@ -170,8 +170,7 @@ Docker from the repository. {{< /tab >}} {{< /tabs >}} -3. Verify that the installation is successful by running the `hello-world` - image: +3. Verify that the installation is successful by running the `hello-world` image: ```console $ sudo docker run hello-world @@ -226,8 +225,7 @@ download a new file each time you want to upgrade Docker Engine. The Docker daemon starts automatically. -6. Verify that the Docker Engine installation is successful by running the - `hello-world` image: +6. Verify that the installation is successful by running the `hello-world` image: ```console $ sudo service docker start @@ -250,26 +248,26 @@ To upgrade Docker Engine, download the newer package files and repeat the ## Uninstall Docker Engine -1. Uninstall the Docker Engine, CLI, containerd, and Docker Compose packages: +1. Uninstall the Docker Engine, CLI, containerd, and Docker Compose packages: - ```console - $ sudo apt-get purge docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin docker-ce-rootless-extras - ``` + ```console + $ sudo apt-get purge docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin docker-ce-rootless-extras + ``` -2. Images, containers, volumes, or custom configuration files on your host - aren't automatically removed. To delete all images, containers, and volumes: +2. Images, containers, volumes, or custom configuration files on your host + aren't automatically removed. To delete all images, containers, and volumes: - ```console - $ sudo rm -rf /var/lib/docker - $ sudo rm -rf /var/lib/containerd - ``` + ```console + $ sudo rm -rf /var/lib/docker + $ sudo rm -rf /var/lib/containerd + ``` -3. Remove source list and keyrings +3. Remove source list and keyrings - ```console - $ sudo rm /etc/apt/sources.list.d/docker.list - $ sudo rm /etc/apt/keyrings/docker.asc - ``` + ```console + $ sudo rm /etc/apt/sources.list.d/docker.list + $ sudo rm /etc/apt/keyrings/docker.asc + ``` You have to delete any edited configuration files manually. diff --git a/content/manuals/engine/install/fedora.md b/content/manuals/engine/install/fedora.md index 7e7123883523..e1bed80474cc 100644 --- a/content/manuals/engine/install/fedora.md +++ b/content/manuals/engine/install/fedora.md @@ -1,7 +1,7 @@ --- description: Learn how to install Docker Engine on Fedora. These instructions cover the different installation methods, how to uninstall, and next steps. -keywords: requirements, apt, installation, fedora, install fedora, install docker engine, rpm, install, uninstall, upgrade, +keywords: requirements, dnf, installation, fedora, install fedora, install docker engine, rpm, install, uninstall, upgrade, update title: Install Docker Engine on Fedora linkTitle: Fedora @@ -31,9 +31,11 @@ Fedora versions: ### Uninstall old versions -Older versions of Docker went by `docker` or `docker-engine`. -Uninstall any such older versions before attempting to install a new version, -along with associated dependencies. +Before you can install Docker Engine, you need to uninstall any conflicting packages. + +Your Linux distribution may provide unofficial Docker packages, which may conflict +with the official packages provided by Docker. You must uninstall these packages +before you install the official version of Docker Engine. ```console $ sudo dnf remove docker \ @@ -88,11 +90,11 @@ $ sudo dnf-3 config-manager --add-repo {{% param "download-url-base" %}}/docker- #### Install Docker Engine -1. Install Docker Engine, containerd, and Docker Compose: +1. Install the Docker packages. {{< tabs >}} {{< tab name="Latest" >}} - + To install the latest version, run: ```console @@ -130,23 +132,26 @@ $ sudo dnf-3 config-manager --add-repo {{% param "download-url-base" %}}/docker- command to install: ```console - $ sudo dnf -y install docker-ce- docker-ce-cli- containerd.io docker-buildx-plugin docker-compose-plugin + $ sudo dnf install docker-ce- docker-ce-cli- containerd.io docker-buildx-plugin docker-compose-plugin ``` This command installs Docker, but it doesn't start Docker. It also creates a `docker` group, however, it doesn't add any users to the group by default. - + {{< /tab >}} {{< /tabs >}} -2. Start Docker. +2. Start Docker Engine. ```console - $ sudo systemctl start docker + $ sudo systemctl enable --now docker ``` -3. Verify that the Docker Engine installation is successful by running the - `hello-world` image. + This configures the Docker systemd service to start automatically when you + boot your system. If you don't want Docker to start automatically, use `sudo + systemctl start docker` instead. + +3. Verify that the installation is successful by running the `hello-world` image: ```console $ sudo docker run hello-world @@ -179,26 +184,23 @@ download a new file each time you want to upgrade Docker Engine. the Docker package. ```console - $ sudo dnf -y install /path/to/package.rpm + $ sudo dnf install /path/to/package.rpm ``` 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. ```console - $ sudo systemctl start docker + $ sudo systemctl enable --now docker ``` -4. Make Docker start automatically after reboot. - - ```console - $ sudo systemctl enable docker - ``` + This configures the Docker systemd service to start automatically when you + boot your system. If you don't want Docker to start automatically, use `sudo + systemctl start docker` instead. -5. Verify that the Docker Engine installation is successful by running the - `hello-world` image. +4. Verify that the installation is successful by running the `hello-world` image: ```console $ sudo docker run hello-world @@ -214,8 +216,8 @@ You have now successfully installed and started Docker Engine. #### Upgrade Docker Engine To upgrade Docker Engine, download the newer package files and repeat the -[installation procedure](#install-from-a-package), using `dnf -y upgrade` -instead of `dnf -y install`, and point to the new files. +[installation procedure](#install-from-a-package), using `dnf upgrade` +instead of `dnf install`, and point to the new files. {{< include "install-script.md" >}} diff --git a/content/manuals/engine/install/raspberry-pi-os.md b/content/manuals/engine/install/raspberry-pi-os.md index 87cb33a91472..927f6498d153 100644 --- a/content/manuals/engine/install/raspberry-pi-os.md +++ b/content/manuals/engine/install/raspberry-pi-os.md @@ -53,9 +53,9 @@ To install Docker Engine, you need one of the following OS versions: Before you can install Docker Engine, you need to uninstall any conflicting packages. -Distro maintainers provide an unofficial distributions of Docker packages in -APT. You must uninstall these packages before you can install the official -version of Docker Engine. +Your Linux distribution may provide unofficial Docker packages, which may conflict +with the official packages provided by Docker. You must uninstall these packages +before you install the official version of Docker Engine. The unofficial packages to uninstall are: @@ -158,8 +158,7 @@ Docker from the repository. {{< /tab >}} {{< /tabs >}} -3. Verify that the installation is successful by running the `hello-world` - image: +3. Verify that the installation is successful by running the `hello-world` image: ```console $ sudo docker run hello-world @@ -214,8 +213,7 @@ download a new file each time you want to upgrade Docker Engine. The Docker daemon starts automatically. -6. Verify that the Docker Engine installation is successful by running the - `hello-world` image: +6. Verify that the installation is successful by running the `hello-world` image: ```console $ sudo service docker start @@ -238,19 +236,26 @@ To upgrade Docker Engine, download the newer package files and repeat the ## Uninstall Docker Engine -1. Uninstall the Docker Engine, CLI, containerd, and Docker Compose packages: +1. Uninstall the Docker Engine, CLI, containerd, and Docker Compose packages: - ```console - $ sudo apt-get purge docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin docker-ce-rootless-extras - ``` + ```console + $ sudo apt-get purge docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin docker-ce-rootless-extras + ``` + +2. Images, containers, volumes, or custom configuration files on your host + aren't automatically removed. To delete all images, containers, and volumes: + + ```console + $ sudo rm -rf /var/lib/docker + $ sudo rm -rf /var/lib/containerd + ``` -2. Images, containers, volumes, or custom configuration files on your host - aren't automatically removed. To delete all images, containers, and volumes: +3. Remove source list and keyrings - ```console - $ sudo rm -rf /var/lib/docker - $ sudo rm -rf /var/lib/containerd - ``` + ```console + $ sudo rm /etc/apt/sources.list.d/docker.list + $ sudo rm /etc/apt/keyrings/docker.asc + ``` You have to delete any edited configuration files manually. diff --git a/content/manuals/engine/install/rhel.md b/content/manuals/engine/install/rhel.md index c7a6ad09b88e..b8cde38551e5 100644 --- a/content/manuals/engine/install/rhel.md +++ b/content/manuals/engine/install/rhel.md @@ -1,7 +1,7 @@ --- description: Learn how to install Docker Engine on RHEL. These instructions cover the different installation methods, how to uninstall, and next steps. -keywords: requirements, apt, installation, rhel, rpm, install, install docker engine, uninstall, upgrade, +keywords: requirements, dnf, installation, rhel, rpm, install, install docker engine, uninstall, upgrade, update title: Install Docker Engine on RHEL linkTitle: RHEL @@ -34,13 +34,14 @@ RHEL versions: ### Uninstall old versions -Older versions of Docker went by `docker` or `docker-engine`. -Uninstall any such older versions before attempting to install a new version, -along with associated dependencies. Also uninstall `Podman` and the associated -dependencies if installed already: +Before you can install Docker Engine, you need to uninstall any conflicting packages. + +Your Linux distribution may provide unofficial Docker packages, which may conflict +with the official packages provided by Docker. You must uninstall these packages +before you install the official version of Docker Engine. ```console -$ sudo yum remove docker \ +$ sudo dnf remove docker \ docker-client \ docker-client-latest \ docker-common \ @@ -52,7 +53,7 @@ $ sudo yum remove docker \ runc ``` -`yum` might report that you have none of these packages installed. +`dnf` might report that you have none of these packages installed. Images, containers, volumes, and networks stored in `/var/lib/docker/` aren't automatically removed when you uninstall Docker. @@ -82,17 +83,17 @@ Docker from the repository. #### Set up the repository -Install the `yum-utils` package (which provides the `yum-config-manager` -utility) and set up the repository. +Install the `dnf-plugins-core` package (which provides the commands to manage +your DNF repositories) and set up the repository. ```console -$ sudo yum install -y yum-utils -$ sudo yum-config-manager --add-repo {{% param "download-url-base" %}}/docker-ce.repo +$ sudo dnf -y install dnf-plugins-core +$ sudo dnf config-manager --add-repo {{% param "download-url-base" %}}/docker-ce.repo ``` #### Install Docker Engine -1. Install Docker Engine, containerd, and Docker Compose: +1. Install the Docker packages. {{< tabs >}} {{< tab name="Latest" >}} @@ -100,7 +101,7 @@ $ sudo yum-config-manager --add-repo {{% param "download-url-base" %}}/docker-ce To install the latest version, run: ```console - $ sudo yum install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin + $ sudo dnf install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin ``` If prompted to accept the GPG key, verify that the fingerprint matches @@ -116,7 +117,7 @@ $ sudo yum-config-manager --add-repo {{% param "download-url-base" %}}/docker-ce the repository: ```console - $ yum list docker-ce --showduplicates | sort -r + $ dnf list docker-ce --showduplicates | sort -r docker-ce.x86_64 3:27.3.1-1.el9 docker-ce-stable docker-ce.x86_64 3:27.3.0-1.el9 docker-ce-stable @@ -134,7 +135,7 @@ $ sudo yum-config-manager --add-repo {{% param "download-url-base" %}}/docker-ce command to install: ```console - $ sudo yum install docker-ce- docker-ce-cli- containerd.io docker-buildx-plugin docker-compose-plugin + $ sudo dnf install docker-ce- docker-ce-cli- containerd.io docker-buildx-plugin docker-compose-plugin ``` This command installs Docker, but it doesn't start Docker. It also creates a @@ -143,14 +144,17 @@ $ sudo yum-config-manager --add-repo {{% param "download-url-base" %}}/docker-ce {{< /tab >}} {{< /tabs >}} -2. Start Docker. +2. Start Docker Engine. ```console - $ sudo systemctl start docker + $ sudo systemctl enable --now docker ``` -3. Verify that the Docker Engine installation is successful by running the - `hello-world` image. + This configures the Docker systemd service to start automatically when you + boot your system. If you don't want Docker to start automatically, use `sudo + systemctl start docker` instead. + +3. Verify that the installation is successful by running the `hello-world` image: ```console $ sudo docker run hello-world @@ -195,7 +199,7 @@ download a new file each time you want to upgrade Docker Engine. the packages. ```console - $ sudo yum install ./containerd.io-..rpm \ + $ sudo dnf install ./containerd.io-..rpm \ ./docker-ce-..rpm \ ./docker-ce-cli-..rpm \ ./docker-buildx-plugin-..rpm \ @@ -205,14 +209,17 @@ 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. ```console - $ sudo systemctl start docker + $ sudo systemctl enable --now docker ``` -7. Verify that the Docker Engine installation is successful by running the - `hello-world` image. + This configures the Docker systemd service to start automatically when you + boot your system. If you don't want Docker to start automatically, use `sudo + systemctl start docker` instead. + +7. Verify that the installation is successful by running the `hello-world` image: ```console $ sudo docker run hello-world @@ -228,8 +235,8 @@ You have now successfully installed and started Docker Engine. #### Upgrade Docker Engine To upgrade Docker Engine, download the newer package files and repeat the -[installation procedure](#install-from-a-package), using `yum -y upgrade` -instead of `yum -y install`, and point to the new files. +[installation procedure](#install-from-a-package), using `dnf upgrade` +instead of `dnf install`, and point to the new files. {{< include "install-script.md" >}} @@ -238,7 +245,7 @@ instead of `yum -y install`, and point to the new files. 1. Uninstall the Docker Engine, CLI, containerd, and Docker Compose packages: ```console - $ sudo yum remove docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin docker-ce-rootless-extras + $ sudo dnf remove docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin docker-ce-rootless-extras ``` 2. Images, containers, volumes, or custom configuration files on your host diff --git a/content/manuals/engine/install/sles.md b/content/manuals/engine/install/sles.md index 39f73b54cf7f..d8b501634017 100644 --- a/content/manuals/engine/install/sles.md +++ b/content/manuals/engine/install/sles.md @@ -58,9 +58,11 @@ $ sudo zypper addrepo $opensuse_repo ### Uninstall old versions -Older versions of Docker went by `docker` or `docker-engine`. -Uninstall any such older versions before attempting to install a new version, -along with associated dependencies. +Before you can install Docker Engine, you need to uninstall any conflicting packages. + +Your Linux distribution may provide unofficial Docker packages, which may conflict +with the official packages provided by Docker. You must uninstall these packages +before you install the official version of Docker Engine. ```console $ sudo zypper remove docker \ @@ -112,7 +114,7 @@ $ sudo zypper addrepo {{% param "download-url-base" %}}/docker-ce.repo #### Install Docker Engine -1. Install Docker Engine, containerd, and Docker Compose: +1. Install the Docker packages. {{< tabs >}} {{< tab name="Latest" >}} @@ -128,7 +130,7 @@ $ sudo zypper addrepo {{% param "download-url-base" %}}/docker-ce.repo This command installs Docker, but it doesn't start Docker. It also creates a `docker` group, however, it doesn't add any users to the group by default. - + {{< /tab >}} {{< tab name="Specific version" >}} @@ -162,14 +164,17 @@ $ sudo zypper addrepo {{% param "download-url-base" %}}/docker-ce.repo {{< /tab >}} {{< /tabs >}} -2. Start Docker. +2. Start Docker Engine. ```console - $ sudo systemctl start docker + $ sudo systemctl enable --now docker ``` -3. Verify that the Docker Engine installation is successful by running the - `hello-world` image. + This configures the Docker systemd service to start automatically when you + boot your system. If you don't want Docker to start automatically, use `sudo + systemctl start docker` instead. + +3. Verify that the installation is successful by running the `hello-world` image: ```console $ sudo docker run hello-world @@ -208,14 +213,17 @@ 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. ```console - $ sudo systemctl start docker + $ sudo systemctl enable --now docker ``` -4. Verify that the Docker Engine installation is successful by running the - `hello-world` image. + This configures the Docker systemd service to start automatically when you + boot your system. If you don't want Docker to start automatically, use `sudo + systemctl start docker` instead. + +4. Verify that the installation is successful by running the `hello-world` image: ```console $ sudo docker run hello-world diff --git a/content/manuals/engine/install/ubuntu.md b/content/manuals/engine/install/ubuntu.md index 3af691594a6b..0989b8cec43b 100644 --- a/content/manuals/engine/install/ubuntu.md +++ b/content/manuals/engine/install/ubuntu.md @@ -62,9 +62,9 @@ s390x, and ppc64le (ppc64el) architectures. Before you can install Docker Engine, you need to uninstall any conflicting packages. -Distro maintainers provide unofficial distributions of Docker packages in -APT. You must uninstall these packages before you can install the official -version of Docker Engine. +Your Linux distribution may provide unofficial Docker packages, which may conflict +with the official packages provided by Docker. You must uninstall these packages +before you install the official version of Docker Engine. The unofficial packages to uninstall are: @@ -111,7 +111,7 @@ You can install Docker Engine in different ways, depending on your needs: ### Install using the `apt` repository {#install-using-the-repository} Before you install Docker Engine for the first time on a new host machine, you -need to set up the Docker repository. Afterward, you can install and update +need to set up the Docker `apt` repository. Afterward, you can install and update Docker from the repository. 1. Set up Docker's `apt` repository. @@ -123,7 +123,7 @@ Docker from the repository. sudo install -m 0755 -d /etc/apt/keyrings sudo curl -fsSL {{% param "download-url-base" %}}/gpg -o /etc/apt/keyrings/docker.asc sudo chmod a+r /etc/apt/keyrings/docker.asc - + # Add the repository to Apt sources: echo \ "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] {{% param "download-url-base" %}} \ @@ -166,15 +166,14 @@ Docker from the repository. Select the desired version and install: ```console - $ VERSION_STRING=5:27.1.1-1~ubuntu.24.04~noble + $ VERSION_STRING=5:27.3.1-1~ubuntu.24.04~noble $ sudo apt-get install docker-ce=$VERSION_STRING docker-ce-cli=$VERSION_STRING containerd.io docker-buildx-plugin docker-compose-plugin ``` - + {{< /tab >}} {{< /tabs >}} -3. Verify that the Docker Engine installation is successful by running the - `hello-world` image. +3. Verify that the installation is successful by running the `hello-world` image: ```console $ sudo docker run hello-world @@ -229,8 +228,7 @@ download a new file each time you want to upgrade Docker Engine. The Docker daemon starts automatically. -6. Verify that the Docker Engine installation is successful by running the - `hello-world` image. +6. Verify that the installation is successful by running the `hello-world` image: ```console $ sudo service docker start @@ -267,6 +265,13 @@ To upgrade Docker Engine, download the newer package files and repeat the $ sudo rm -rf /var/lib/containerd ``` +3. Remove source list and keyrings + + ```console + $ sudo rm /etc/apt/sources.list.d/docker.list + $ sudo rm /etc/apt/keyrings/docker.asc + ``` + You have to delete any edited configuration files manually. ## Next steps diff --git a/content/reference/compose-file/services.md b/content/reference/compose-file/services.md index 85a20df4496c..78222054d8ad 100644 --- a/content/reference/compose-file/services.md +++ b/content/reference/compose-file/services.md @@ -1505,7 +1505,7 @@ ports: mode: host ``` -## post_start +### post_start {{< introduced compose 2.30.0 "../../manuals/compose/releases/release-notes.md#2300" >}} @@ -1530,7 +1530,7 @@ services: For more information, see [Use lifecycle hooks](/manuals/compose/how-tos/lifecycle.md). -## pre_stop +### pre_stop {{< introduced compose 2.30.0 "../../manuals/compose/releases/release-notes.md#2300" >}}