Skip to content

Commit

Permalink
Switch to docker-from-docker
Browse files Browse the repository at this point in the history
- Allows the dev container to share the host's docker instance, allowing the host to see any containers launched in the dev container.

Signed-off-by: Wade Barnes <[email protected]>
  • Loading branch information
WadeBarnes committed Jul 22, 2024
1 parent 55a4fa0 commit 5e11f97
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
7 changes: 5 additions & 2 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"ghcr.io/devcontainers/features/dotnet:2": {},
"ghcr.io/devcontainers/features/aws-cli:1": {},
"ghcr.io/devcontainers/features/terraform:1": {},
"ghcr.io/devcontainers/features/docker-in-docker:2": {},
"ghcr.io/devcontainers/features/docker-from-docker:1.5.0": {},
"ghcr.io/devcontainers-contrib/features/aws-cdk:2": {}
},
"customizations": {
Expand All @@ -31,5 +31,8 @@
}
}
},
"remoteUser": "root"
"remoteUser": "root",
"containerEnv": {
"LOCAL_WORKSPACE_FOLDER": "${localWorkspaceFolder}"
}
}
4 changes: 2 additions & 2 deletions docker/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ services:
ports:
- 8080:1339
volumes:
- "../web/src:/opt/app-root/src/src"
- "../web/package.json:/opt/app-root/src/package.json"
- "${LOCAL_WORKSPACE_FOLDER-..}/web/src:/opt/app-root/src/src"
- "${LOCAL_WORKSPACE_FOLDER-..}/web/package.json:/opt/app-root/src/package.json"
depends_on:
- api

Expand Down

0 comments on commit 5e11f97

Please sign in to comment.