-
Notifications
You must be signed in to change notification settings - Fork 287
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
Post Create Command fails when cloning docker compose repo in container volume #6538
Comments
I think the latest extension version broke the current working directory when the My container also complains about not being able to find scripts that I set from |
Moving to Given your output, I assume you're doing this in Remote - Containers correct (not Codespaces)? //cc @chrmarti |
If you're asking me, I'm indeed using the Remote Containers (not Codespaces). I had originally used these instructions for my I used the "Clone repository into named volume". In previous versions of the extension, the |
same scenario as @JeremyGrieshop |
I have the same issue. My devcontainer is based on https://github.com/microsoft/vscode-dev-containers/tree/v0.209.6/containers/javascript-node-postgres. If I open the repo using "Open a folder in Container" it works but not when using "Clone Reposository in container volume" since recent changes on vscode or extension. I have replace my postCreateCommand with :
And the path is /workspace instead of /workspaces. I am really confuse why I have both of them. |
@ijaouani The path should be @JeremyGrieshop @daniellaera Do your devcontainer.json files have something set in |
Thanks to @JeremyGrieshop I have found a workaround : Downgrade the version to 0.224.3 here : |
Yep, I used the same sample from https://code.visualstudio.com/remote/advancedcontainers/improve-performance#_use-a-named-volume-for-your-entire-source-tree:
And this is how it has been working for a long, long time. The |
@chrmarti Is this as a result of a bug fix that caused |
It's exactly that I don't understand and really confusing to me :
|
my |
Ahh got it workspace**s** while the config says workspace (w/o s) - that does sound like a bug. |
@chrmarti SImple repro: Open this in a container volume: https://github.com/Chuxel/empty/tree/python-postgres On macOS you have to allow sharing Regardless, the npm install will fail - you can see its |
Just to provide more analysis on the subject : Using docker inspect we have the following :
The second volume is the git in docker volume for the repo. The last one is used certainly by vscode nothing interesting here but the first one makes no sense for me from docker perspective. The source of the bind is normally a local path and on windows /workspaces/platform does not exist at all. I am really curious how this bind is working and that it's currently targeting. And also : From the devcontainer build log we have the following : [43729 ms] Start: Run in container: cat /workspaces/platform/.devcontainer/devcontainer.json 2>/dev/null |
Seems to me that it's sort like creating a symlink at the docker mount level by re-mapping |
Fixed in Remote-Containers v0.231.2 and v0.232.2-pre-release. |
@chrmarti can you just put the link of the commit. Curious about it. |
Once cloned repo in the container volume, the post create command
"postCreateCommand": "yarn install"
or"postCreateCommand": "npm install"
throws an error saying that impossible to find yarn.lock/package.json so impossible to install dependencies
latest
Steps to Reproduce:
"postCreateCommand": "yarn install"
fails
example with npm
The text was updated successfully, but these errors were encountered: