Closed mclean25 closed 4 years ago
Bind mounts are always relative to the machine / VM the Docker daemon runs on. Instead of .
as the source folder, try the absolute path to your workspace folder on your host machine.
(Closing as this is not specific to Remote-Containers.)
I'm attempting to build a dev container where you can call
docker-compose ...
from within the dev container to interact with the workspacesdocker-compose
file. I've mounted the docker socket from my host to the dev container and can successfully call the host's docker daemon from the container. The issue is that if I rundocker-compose
commands from the dev container, volumes don't get properly mounted to the containers thatdocker-compose
creates as they would if I had called them from the host.Calling
docker-compose run --entrypoint=bash django
from the dev container, thenls -al
yields no files or directories inside the container. If I run the same command from the host, all the desired files and folders will be populated in the container.Steps to Reproduce:
.devcontainer/devcontainer.json:
.devcontainer/Dockerfile:
./docker-compose.yml
Does this issue occur when all extensions are disabled?: No because I need the remote extension.