Skip to content
New issue

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

Dev Container build fails on mount config if folders don't exist on local filesystem. #4271

Open
alanmegaw77 opened this issue Jan 16, 2025 · 4 comments · May be fixed by #4290
Open

Dev Container build fails on mount config if folders don't exist on local filesystem. #4271

alanmegaw77 opened this issue Jan 16, 2025 · 4 comments · May be fixed by #4290

Comments

@alanmegaw77
Copy link

Hi, trying to setup the dev container to run the make auth and getting error as per attachment:

Image

  • running on Azure ubuntu VM, Ubuntu 24.04.1 LTS
  • docker installed and running, Docker version 27.5.0, build a187fa5
  • VS has Dev Containers and Remote Development extensions installed

Any help greatly appreciated..!

@marrobi
Copy link
Member

marrobi commented Jan 16, 2025

Can you try removing the mounts, other than the Docker one from https://github.com/microsoft/AzureTRE/blob/main/.devcontainer%2Fdevcontainer.json#L24

I think it's as one of Azure CLI or VSCode have not been used in the VM.

Let us know, thanks.

@alanmegaw77
Copy link
Author

yes this worked, thank you @marrobi !!! - any chance you could look at issue 4278 please - #4278

@LizaShak
Copy link
Collaborator

Hi @marrobi , I have encountered the same issue as well just now. I was working inside a vm, and following our conversation, there might be an issue with the mounting in devcontainer when not all the required tools are in place.

@marrobi marrobi reopened this Jan 23, 2025
@marrobi marrobi changed the title Dev Container Issue Dev Container build fails on mount config if folders don't exist on local filesystem. Jan 23, 2025
@marrobi
Copy link
Member

marrobi commented Jan 23, 2025

Seems like the discussion is happening here - devcontainers/spec#132

@stuartleeks raised it in 2022, maybe when building this devcontainer! Looks like could potentially make the directories using something similar to:

"initializeCommand": {
    "mkdir-posix": "mkdir -p $HOME/.config $HOME/.docker || true",
},

marrobi added a commit that referenced this issue Jan 29, 2025
Fixes #4271

Add an `initializeCommand` to create necessary directories before the build.

* Add `initializeCommand` in `devcontainer/devcontainer.json` to create `$HOME/.azure` and `$HOME/.config` directories if they do not exist.
* Ensure the command runs before the container is created to prevent build failures due to missing directories.

---

For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/microsoft/AzureTRE/issues/4271?shareId=XXXX-XXXX-XXXX-XXXX).
@marrobi marrobi linked a pull request Jan 29, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants