diff --git a/containers/docker-in-docker-compose/README.md b/containers/docker-in-docker-compose/README.md index 82da00f3ce..ef7ed66686 100644 --- a/containers/docker-in-docker-compose/README.md +++ b/containers/docker-in-docker-compose/README.md @@ -2,9 +2,7 @@ ## Summary -*Illustrates how you can use it to access your local Docker install from inside the a dev container by simply volume mounting the Docker unix socket. This variation uses Docker Compose to do the volume mounting.* - -> **Note:** You can also check out the [Dockerfile](../docker-in-docker) variation of this same definition. +*Illustrates how you can use it to access your local Docker install from inside a dev container by simply volume mounting the Docker unix socket. This variation uses Docker Compose to do the volume mounting.* | Metadata | Value | |----------|-------| @@ -12,6 +10,8 @@ | *Definition type* | Docker Compose | | *Languages, platforms* | Any | +> **Note:** There is also a single [Dockerfile](../docker-in-docker) variation of this same definition. + ## Description Dev containers can be useful for all types of applications including those that also deploy into a container based-environment. While you can directly build and run the application inside the dev container you create, you may also want to test it by deploying a built container image into your local Docker Desktop instance without affecting your dev container. This example illustrates how you can do this by running CLI commands and using the [Docker VS Code extension](https://marketplace.visualstudio.com/items?itemName=PeterJausovec.vscode-docker) right from inside your dev container. @@ -42,7 +42,7 @@ See the [Docker CE installation steps for Linux](https://docs.docker.com/install The trick that makes this work is as follows: -1. Install the Docker CLI in the container. From `dev-container.dockerfile`: +1. First, install the Docker CLI in the container. From `dev-container.dockerfile`: ```Dockerfile # Install Docker CE CLI @@ -52,7 +52,7 @@ The trick that makes this work is as follows: && apt-get update \ && apt-get install -y docker-ce-cli ``` -2. Forward the Docker socket. From `docker-compose.dev-container.yml`: +2. Then just forward the Docker socket by mounting it in the container. From `docker-compose.dev-container.yml`: ```yaml volumes: diff --git a/containers/docker-in-docker/README.md b/containers/docker-in-docker/README.md index 5f3f9c5e53..668f969a6e 100644 --- a/containers/docker-in-docker/README.md +++ b/containers/docker-in-docker/README.md @@ -2,9 +2,7 @@ ## Summary -*Illustrates how you can use it to access your local Docker install from inside the a dev container by simply volume mounting the Docker unix socket. This variation uses `runArgs` and a `Dockerfile` to do the volume mounting* - -> **Note:** You can also check out the [Docker Compose](../docker-in-docker-compose) variation of this same definition. +*Illustrates how you can use it to access your local Docker install from inside a dev container by simply volume mounting the Docker unix socket. This variation uses `runArgs` in `devContainer.json` to do the volume mounting.* | Metadata | Value | |----------|-------| @@ -12,6 +10,8 @@ | *Definition type* | Dockerfile | | *Languages, platforms* | Any | +> **Note:** There is also a [Docker Compose](../docker-in-docker-compose) variation of this same definition. + ## Description Dev containers can be useful for all types of applications including those that also deploy into a container based-environment. While you can directly build and run the application inside the dev container you create, you may also want to test it by deploying a built container image into your local Docker Desktop instance without affecting your dev container. This example illustrates how you can do this by running CLI commands and using the [Docker VS Code extension](https://marketplace.visualstudio.com/items?itemName=PeterJausovec.vscode-docker) right from inside your dev container. @@ -42,7 +42,7 @@ See the [Docker CE installation steps for Linux](https://docs.docker.com/install The trick that makes this work is as follows: -1. Install the Docker CLI in the container. From `dev-container.dockerfile`: +1. First, install the Docker CLI in the container. From `dev-container.dockerfile`: ```Dockerfile # Install Docker CE CLI @@ -52,10 +52,10 @@ The trick that makes this work is as follows: && apt-get update \ && apt-get install -y docker-ce-cli ``` -2. Forward the Docker socket. From `devContainer.json`: +2. Then just forward the Docker socket by mounting it in the container. From `devContainer.json`: ```json "runArgs": ["-v","/var/run/docker.sock:/var/run/docker.sock"] ``` -That's it! \ No newline at end of file +That's it! diff --git a/containers/kubernetes-helm/README.md b/containers/kubernetes-helm/README.md index 0a45edfbc2..8c6e773373 100644 --- a/containers/kubernetes-helm/README.md +++ b/containers/kubernetes-helm/README.md @@ -2,7 +2,7 @@ ## Summary -*Illustrates how you access a Kubernetes cluster from inside a dev container. Includes the Docker CLI, kubectl, and Helm.* +*Illustrates how you can access a local (or remote) Kubernetes cluster from inside a dev container. Includes the Docker CLI, kubectl, and Helm.* | Metadata | Value | |----------|-------| @@ -87,7 +87,7 @@ To get started, follow the appropriate steps below for your operating system. The trick that makes this work is as follows: -1. Install all of the needed CLIs in the container. From `dev-container.dockerfile`: +1. First, install all of the needed CLIs in the container. From `dev-container.dockerfile`: ```Dockerfile # Install Docker CE CLI @@ -107,7 +107,7 @@ The trick that makes this work is as follows: RUN curl -s https://raw.githubusercontent.com/helm/helm/master/scripts/get | bash - ``` -2. Forward the local Docker socket and mount the local `.kube` folder in the container so the configuration can be reused. From `devContainer.json`: +2. Next, forward the local Docker socket and mount the local `.kube` folder in the container so the configuration can be reused. From `devContainer.json`: ```json "runArgs": ["-e", "SYNC_LOCALHOST_KUBECONFIG=true", @@ -115,7 +115,7 @@ The trick that makes this work is as follows: "-v", "$HOME/.kube:/root/.kube-localhost"] ``` -3. Update `.bashrc` to automatically copy the local machine's Kubernetes config into the container and swap out localhost for host.docker.internal whenever a new shell starts. From `dev-container.dockerfile`: +3. Finally, update `.bashrc` to automatically swap out localhost for host.docker.internal in a containr copy of the Kubernetes config. From `dev-container.dockerfile`: ```Dockerfile RUN echo 'if [ "$SYNC_LOCALHOST_KUBECONFIG" == "true" ]; then \