-
Notifications
You must be signed in to change notification settings - Fork 297
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
Add options to control the consistency of the source mount #41
Comments
Not sure if In the meantime you could used a Docker Compose file to control all options. |
I agree it shouldn't be a choice for all workloads, I think it should be an option user can set. But without it, the performance is so bad on mac, it is barely usable. you could try building a large c++ program and compare it with the native performance. |
I have seen the best performance when using a volume mount and checking out the source there. You can do that and/or control the consistency by using a Docker Compose file: https://code.visualstudio.com/docs/remote/containers#_using-docker-compose |
so I have tried docker compose, somehow, vscode got stuck at the "creating container" stage. the container was created, as I was able to see it with docker container ls. there is no additional info for me to debug. |
@shi-yan What's in the Dev Container terminal when it gets stuck? |
@egamma @chrmarti We could add this in, but VS Code would still volume mount the project using |
@chrmarti this is all the output I saw from the terminal: Run: docker-compose -f /Users/shiyan/xxx/docker/docker-compose.yml up -d --build Pulling ide (ubuntu:)... latest: Pulling from library/ubuntu Recreating docker_ide_1 ... done` vscode got stuck at this point. the progressbar keeps loading, even it says recreating docker_ide_1 ... done. manually checking all containers, I could see docker_ide_1 being created. |
could be, I don't remember I set it. I will try again when I get back home. Thanks! |
Thanks @shi-yan. Keeping this issue for the consistency option. |
Adding |
How do you use |
@chrmarti I don't think this particular case is fixed yet. We'd realistically need to support This works: "workspaceFolder": "/workspace",
"workspaceMount": "src=/absolute/path/to/where/source/code/is/on/host,dst=/workspace,type=bind" This doesn't: "workspaceFolder": "/workspace",
"workspaceMount": "src=${workspaceFolder},dst=/workspace,type=bind" The remote case is supported, but this one requires an absolute path as things are now which really isn't workable - we could close in favor of #306, but it seems to bump up the priority of that one to me at least. |
Tracking in #442, so we can test and verify this independently. |
on mac, the workspace folder doesn't seem to be mounted with consistency=cached
this causes low io performance
see https://stories.amazee.io/docker-on-mac-performance-docker-machine-vs-docker-for-mac-4c64c0afdf99?gi=ab8ea7964793
for details.
docker run --mount src="$(pwd)/../../myproj",target=/work/myproj,type=bind,consistency=cached
The text was updated successfully, but these errors were encountered: