-
Notifications
You must be signed in to change notification settings - Fork 302
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
Feature request: Support defining "initializeCommand" specific to an operating system #3981
Comments
Dev-container is an OCI container. OCI container is always portable. It has no own OS, it is not a VM. Its OS is the Host machine OS. Of course, Container can't modify the Host OS or execute something on the Host OS because it shares it with all running containers. Only privileged containers may have limited access to the Host OS but working in such a mode is "security suicide". The container is initialized by entry-point script or executable, not by Initialize command. It is defaulted by Dockerfile and configured by --entry-point option. There is no way to know which OS is used as a base image of the running container - it is not a part of the container's metadata. The image OS is known only inside Dockerfile - it has FROM term in the 1st line. The only exception is Windows Containers that can be run only by Docker-for-Win - hardcode. |
Of course Docker container itself is portable, but I meant the whole VSCode's |
I use something like this.
However, another user/machine may not have the folders/files, and the mount will fail. So I use
Obviously this will not work well on Windows. |
Since
initializeCommand
indevcontainer.json
is executed locally, to make a dev container fully portable please make it possible to define it for every operating system like we can currently do for tasks. For example:The text was updated successfully, but these errors were encountered: