From 6eca34e727638c005446ae26028368ea08267475 Mon Sep 17 00:00:00 2001 From: Stuart Leeks Date: Wed, 22 Mar 2023 19:30:18 +0000 Subject: [PATCH] Update dev container feature docs to include docker (#1263) Signed-off-by: Stuart Leeks --- dev-container-feature/src/dapr-cli/NOTES.md | 16 ++++++++++++++++ dev-container-feature/src/dapr-cli/README.md | 15 +++++++++++++++ 2 files changed, 31 insertions(+) create mode 100644 dev-container-feature/src/dapr-cli/NOTES.md diff --git a/dev-container-feature/src/dapr-cli/NOTES.md b/dev-container-feature/src/dapr-cli/NOTES.md new file mode 100644 index 00000000..803dd6d0 --- /dev/null +++ b/dev-container-feature/src/dapr-cli/NOTES.md @@ -0,0 +1,16 @@ +## Using with `docker-in-docker` feature + +Since the Dapr CLI requires Docker, an easy way to get started is to use the `docker-in-docker` feature. This will install a separate Docker daemon inside the container for `dapr` to use: + +```jsonc +"features": { + // Install the Dapr CLI + "ghcr.io/dapr/cli/dapr-cli:0": {}, + // Enable Docker (via Docker-in-Docker) + "ghcr.io/devcontainers/features/docker-in-docker:2": {}, + // Alternatively, use Docker-outside-of-Docker (uses Docker in the host) + //"ghcr.io/devcontainers/features/docker-outside-of-docker:1": {}, +} +``` + +For more details on setting up a Dev Container with Dapr, see the [Developing Dapr applications with Dev Containers docs](https://docs.dapr.io/developing-applications/local-development/ides/vscode/vscode-remote-dev-containers/). \ No newline at end of file diff --git a/dev-container-feature/src/dapr-cli/README.md b/dev-container-feature/src/dapr-cli/README.md index e4878e8e..aff96d9c 100644 --- a/dev-container-feature/src/dapr-cli/README.md +++ b/dev-container-feature/src/dapr-cli/README.md @@ -17,7 +17,22 @@ Install the Dapr CLI |-----|-----|-----|-----| | version | Version of the Dapr CLI to install (or "latest") | string | latest | +## Using with `docker-in-docker` feature +Since the Dapr CLI requires Docker, an easy way to get started is to use the `docker-in-docker` feature. This will install a separate Docker daemon inside the container for `dapr` to use: + +```jsonc +"features": { + // Install the Dapr CLI + "ghcr.io/dapr/cli/dapr-cli:0": {}, + // Enable Docker (via Docker-in-Docker) + "ghcr.io/devcontainers/features/docker-in-docker:2": {}, + // Alternatively, use Docker-outside-of-Docker (uses Docker in the host) + //"ghcr.io/devcontainers/features/docker-outside-of-docker:1": {}, +} +``` + +For more details on setting up a Dev Container with Dapr, see the [Developing Dapr applications with Dev Containers docs](https://docs.dapr.io/developing-applications/local-development/ides/vscode/vscode-remote-dev-containers/). ---