We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Docker: https://docs.docker.com/storage/bind-mounts/ Podman: https://docs.podman.io/en/latest/markdown/podman-run.1.html#mount-type-type-type-specific-option
The text was updated successfully, but these errors were encountered:
Yes.
By default, mount type volume is used, so Dev Containers behave the same as Codespaces.
volume
When working with Docker Desktop, volumes are more performant than bind mounts.
volumes
bind mounts
Sorry, something went wrong.
To work with a bind mount, e.g. modify the devcontainer.json for Python base as follows:
bind mount
devcontainer.json
diff --git a/.devcontainer/python-base/devcontainer.json b/.devcontainer/python-base/devcontainer.json index b31e40c..dae65cc 100644 --- a/.devcontainer/python-base/devcontainer.json +++ b/.devcontainer/python-base/devcontainer.json @@ -77,8 +77,8 @@ // Set 'remoteUser' to 'root' to connect as root instead. "remoteUser": "vscode", - "workspaceMount": "source=python-base-home-vscode,target=/home/vscode,type=volume", - // "workspaceMount": "source=${localWorkspaceFolder}/.bind-mounts/python-base-home-vscode,target=/home/vscode,type=bind", + // "workspaceMount": "source=python-base-home-vscode,target=/home/vscode,type=volume", + "workspaceMount": "source=${localWorkspaceFolder}/.bind-mounts/python-base-home-vscode,target=/home/vscode,type=bind", "workspaceFolder": "/home/vscode" // "remoteUser": "root",
ℹ️ This will mount <root-of-this-repository>/.bind-mounts/python-base-home-vscode to /home/vscode in the Dev Container.
<root-of-this-repository>/.bind-mounts/python-base-home-vscode
/home/vscode
benz0li
No branches or pull requests
Docker: https://docs.docker.com/storage/bind-mounts/
Podman: https://docs.podman.io/en/latest/markdown/podman-run.1.html#mount-type-type-type-specific-option
The text was updated successfully, but these errors were encountered: