Skip to content

Commit 8cbf0ff

Browse files
fix: mount Docker socket in devcontainer to fix bazel run (#248) (#258)
* fix: mount Docker socket in devcontainer to fix bazel run Fixes #248 When running inside the devcontainer, the generated run_docker.sh script calls and . These fail because the host Docker socket (/var/run/docker.sock) was not mounted into the container, resulting in: failed to connect to the docker API at unix:///var/run/docker.sock; dial unix /var/run/docker.sock: connect: no such file or directory Add a bind mount for the Docker socket in .devcontainer/devcontainer.json so that Docker commands inside the devcontainer communicate with the host Docker daemon. * Fix Formatting --------- Co-authored-by: akshaylg0314 <akshay14.garg@lge.com>
1 parent 77877e6 commit 8cbf0ff

1 file changed

Lines changed: 7 additions & 4 deletions

File tree

.devcontainer/devcontainer.json

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
{
2-
"name": "eclipse-s-core",
3-
"image": "ghcr.io/eclipse-score/devcontainer:v1.3.0",
4-
"postCreateCommand": "bash .devcontainer/prepare_workspace.sh",
5-
"postStartCommand": "ssh-keygen -f '/home/vscode/.ssh/known_hosts' -R '[localhost]:2222' || true"
2+
"name": "eclipse-s-core",
3+
"image": "ghcr.io/eclipse-score/devcontainer:v1.3.0",
4+
"mounts": [
5+
"source=/var/run/docker.sock,target=/var/run/docker.sock,type=bind"
6+
],
7+
"postCreateCommand": "bash .devcontainer/prepare_workspace.sh",
8+
"postStartCommand": "ssh-keygen -f '/home/vscode/.ssh/known_hosts' -R '[localhost]:2222' || true"
69
}

0 commit comments

Comments
 (0)