From 31ccd0029263172f5f85fae29570acce86587ccc Mon Sep 17 00:00:00 2001 From: Chuck Lantz Date: Sun, 24 Mar 2019 12:14:39 -0700 Subject: [PATCH 01/10] Update README.md --- containers/docker-in-docker/README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/containers/docker-in-docker/README.md b/containers/docker-in-docker/README.md index 6cb087721e..dff400c243 100644 --- a/containers/docker-in-docker/README.md +++ b/containers/docker-in-docker/README.md @@ -4,14 +4,14 @@ *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. - | Metadata | Value | |----------|-------| | *Contributors* | The VS Code team | | *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. @@ -44,4 +44,4 @@ The trick that makes this work is as follows: "runArgs": ["-v","/var/run/docker.sock:/var/run/docker.sock"] ``` -That's it! \ No newline at end of file +That's it! From 4221a0c88d16bf7320e473a07a83f3efefd1d3d2 Mon Sep 17 00:00:00 2001 From: Chuck Lantz Date: Sun, 24 Mar 2019 12:15:50 -0700 Subject: [PATCH 02/10] Update README.md --- containers/docker-in-docker/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/containers/docker-in-docker/README.md b/containers/docker-in-docker/README.md index dff400c243..0f9b474669 100644 --- a/containers/docker-in-docker/README.md +++ b/containers/docker-in-docker/README.md @@ -2,7 +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* +*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` in `devContainer.json` to do the volume mounting.* | Metadata | Value | |----------|-------| From b741a994fdf20fec091078f58460e74d813a4ffe Mon Sep 17 00:00:00 2001 From: Chuck Lantz Date: Sun, 24 Mar 2019 12:16:32 -0700 Subject: [PATCH 03/10] Update README.md --- containers/docker-in-docker-compose/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/containers/docker-in-docker-compose/README.md b/containers/docker-in-docker-compose/README.md index 5657607bf5..3cf5e2203c 100644 --- a/containers/docker-in-docker-compose/README.md +++ b/containers/docker-in-docker-compose/README.md @@ -4,14 +4,14 @@ *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. - | Metadata | Value | |----------|-------| | *Contributors* | The VS Code team | | *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. From d3bb969abbbe4394a1b2f3c5e3c28d3d458b8d67 Mon Sep 17 00:00:00 2001 From: Chuck Lantz Date: Sun, 24 Mar 2019 12:17:40 -0700 Subject: [PATCH 04/10] Update README.md --- containers/kubernetes-helm/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/containers/kubernetes-helm/README.md b/containers/kubernetes-helm/README.md index 0a45edfbc2..63ca629f65 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 | |----------|-------| From 1e7837b95e07e2b97fff2af9e409955874348dd8 Mon Sep 17 00:00:00 2001 From: Chuck Lantz Date: Sun, 24 Mar 2019 12:20:44 -0700 Subject: [PATCH 05/10] Update README.md --- containers/kubernetes-helm/README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/containers/kubernetes-helm/README.md b/containers/kubernetes-helm/README.md index 63ca629f65..8c6e773373 100644 --- a/containers/kubernetes-helm/README.md +++ b/containers/kubernetes-helm/README.md @@ -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 \ From 2f453617a713d1658848e71805ff3523753b5180 Mon Sep 17 00:00:00 2001 From: Chuck Lantz Date: Sun, 24 Mar 2019 12:21:37 -0700 Subject: [PATCH 06/10] Update README.md --- containers/docker-in-docker/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/containers/docker-in-docker/README.md b/containers/docker-in-docker/README.md index 0f9b474669..5705fa1764 100644 --- a/containers/docker-in-docker/README.md +++ b/containers/docker-in-docker/README.md @@ -28,7 +28,7 @@ FROM node:8 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 @@ -38,7 +38,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 `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"] From 7d87e509727577d1daf67741fe4f6a9604d63274 Mon Sep 17 00:00:00 2001 From: Chuck Lantz Date: Sun, 24 Mar 2019 12:22:15 -0700 Subject: [PATCH 07/10] Update README.md --- containers/docker-in-docker-compose/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/containers/docker-in-docker-compose/README.md b/containers/docker-in-docker-compose/README.md index 3cf5e2203c..7600b48492 100644 --- a/containers/docker-in-docker-compose/README.md +++ b/containers/docker-in-docker-compose/README.md @@ -28,7 +28,7 @@ FROM node:8 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 @@ -38,7 +38,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: From 68efc0c6df0868a1dd34e1907b7096bfa2c2aa12 Mon Sep 17 00:00:00 2001 From: Chuck Lantz Date: Sun, 24 Mar 2019 12:24:06 -0700 Subject: [PATCH 08/10] Update README.md --- containers/docker-in-docker/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/containers/docker-in-docker/README.md b/containers/docker-in-docker/README.md index 5705fa1764..a7b7aa2257 100644 --- a/containers/docker-in-docker/README.md +++ b/containers/docker-in-docker/README.md @@ -2,7 +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` in `devContainer.json` to do the volume mounting.* +*Illustrates how you can use it to access your local Docker install from inside the dev container by simply volume mounting the Docker unix socket. This variation uses `runArgs` in `devContainer.json` to do the volume mounting.* | Metadata | Value | |----------|-------| From 52a1631a8d27be76596a9a3d35e0dec56a581dee Mon Sep 17 00:00:00 2001 From: Chuck Lantz Date: Sun, 24 Mar 2019 12:24:35 -0700 Subject: [PATCH 09/10] Update README.md --- containers/docker-in-docker-compose/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/containers/docker-in-docker-compose/README.md b/containers/docker-in-docker-compose/README.md index 7600b48492..9bd997923d 100644 --- a/containers/docker-in-docker-compose/README.md +++ b/containers/docker-in-docker-compose/README.md @@ -2,7 +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.* +*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 | |----------|-------| From a40ec202b6f36cd2df617b7e4469520479266262 Mon Sep 17 00:00:00 2001 From: Chuck Lantz Date: Sun, 24 Mar 2019 12:24:49 -0700 Subject: [PATCH 10/10] Update README.md --- containers/docker-in-docker/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/containers/docker-in-docker/README.md b/containers/docker-in-docker/README.md index a7b7aa2257..33d1ad5bd8 100644 --- a/containers/docker-in-docker/README.md +++ b/containers/docker-in-docker/README.md @@ -2,7 +2,7 @@ ## Summary -*Illustrates how you can use it to access your local Docker install from inside the dev container by simply volume mounting the Docker unix socket. This variation uses `runArgs` in `devContainer.json` to do the volume mounting.* +*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 | |----------|-------|