You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to mount ~/.azure into my devcontainer. The issue is that this directory is a symlink to my Windows path. I can get the mount to work if I mount both paths, the problem is that I don't want to commit my Windows path into git because it wont be the same for others. For others, it may not even be a symlink. Is it possible to mount my symlink using an environment variable if the user has it set?
The text was updated successfully, but these errors were encountered:
Yes, you can use an environment variable in your devcontainer.json to mount the symlink. Define the variable in an .env file and reference it in the mounts section.
eg.
{
"name": "My Dev Container",
"image": "mcr.microsoft.com/vscode/devcontainers/base:0.202.6",
"mounts": [
"source=${AZURE_PATH},target=/root/.azure,type=bind,consistency=cached"
],
"remoteEnv": {
"AZURE_PATH": "${localEnv:AZURE_PATH}"
}
}
I am trying to mount ~/.azure into my devcontainer. The issue is that this directory is a symlink to my Windows path. I can get the mount to work if I mount both paths, the problem is that I don't want to commit my Windows path into git because it wont be the same for others. For others, it may not even be a symlink. Is it possible to mount my symlink using an environment variable if the user has it set?
The text was updated successfully, but these errors were encountered: