From c99886b1c533b3b8fed396cf4d6f0094febed743 Mon Sep 17 00:00:00 2001 From: Anton Gilgur Date: Fri, 18 Oct 2024 01:11:06 -0400 Subject: [PATCH] docs: remove incorrect statement about DIND not working - as users have mentioned, it does still work and the image used was one that comes with Docker Engine and so does not rely on the k8s container engine - replace with a note about "Alternatives", since DIND is still not as secure - use a proper admonition for the note as well, instead of "Note:" with a horizontal rule after - also follow docs style guide for the rest of the page while at it - prefer 1 sentence per line, per [style guide](https://argo-workflows.readthedocs.io/en/release-3.5/doc-changes/) - use active voice, per [k8s style guide](https://kubernetes.io/docs/contribute/style/style-guide/#use-active-voice) - simple and direct, per [k8s style guide](https://kubernetes.io/docs/contribute/style/style-guide/#use-simple-and-direct-language) Signed-off-by: Anton Gilgur --- docs/walk-through/docker-in-docker-using-sidecars.md | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/docs/walk-through/docker-in-docker-using-sidecars.md b/docs/walk-through/docker-in-docker-using-sidecars.md index 53bcdb7ae2904..85024e886c899 100644 --- a/docs/walk-through/docker-in-docker-using-sidecars.md +++ b/docs/walk-through/docker-in-docker-using-sidecars.md @@ -1,10 +1,13 @@ # Docker-in-Docker Using Sidecars -Note: It is increasingly unlikely that the below example will work for you on your version of Kubernetes. [Since Kubernetes 1.24, the dockershim has been unavailable as part of Kubernetes](https://kubernetes.io/blog/2022/02/17/dockershim-faq/), rendering Docker-in-Docker unworkable. It is recommended to seek alternative methods of building containers, such as [Kaniko](https://github.com/GoogleContainerTools/kaniko) or [Buildkit](https://github.com/moby/buildkit). A [Buildkit Workflow example](https://raw.githubusercontent.com/argoproj/argo-workflows/main/examples/buildkit-template.yaml) is available in the examples directory of the Argo Workflows repository. +!!! Note "Alternatives" + Alternative methods of building containers, such as [Kaniko](https://github.com/GoogleContainerTools/kaniko) or [Buildkit](https://github.com/moby/buildkit) can be simpler and more secure. + See the [Buildkit template](https://github.com/argoproj/argo-workflows/main/examples/buildkit-template.yaml) as an example. ---- +You can use [sidecars](sidecars.md) to implement Docker-in-Docker (DIND). +You can use DIND to run Docker commands inside a container, such as to build and push a container image. -An application of sidecars is to implement Docker-in-Docker (DIND). DIND is useful when you want to run Docker commands from inside a container. For example, you may want to build and push a container image from inside your build container. In the following example, we use the `docker:dind` image to run a Docker daemon in a sidecar and give the main container access to the daemon. +In the following example, use the `docker:dind` image to run a Docker daemon in a sidecar and give the main container access to the daemon. ```yaml apiVersion: argoproj.io/v1alpha1