-
Notifications
You must be signed in to change notification settings - Fork 32
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
Open with VSCode breaks everything, Docker Environments are useless? #137
Comments
@glours any input on this? I'm actually super confused on what Docker Development Environments are for? |
Can you please set This seems like a pretty big oversight. See (https://containers.dev/implementors/json_reference/)
|
Found another issue on this here #52 Please fix ASAP if possible. Let me know if there's anything I can do to assist on my end. |
I have the same "issue". The "Open with VSCode" button does something to the container (re-creates it) and while I can edit my code in VSCode the services are not running. I'm using https://github.com/docker/awesome-compose/tree/master/react-express-mysql. |
I have been having this same issue and this is the only place I've seen this reported. I'm coming from a Windows 10 Home 22H2 environment. Fortunately I can workaround this by opening VSCode and attaching it to the container, instead of clicking that button in the Docker Desktop interface. I'd like to use the Docker Desktop interface to connect and work with them though. Why else would I have the option there? |
This is a major issue with docker dev containers. The issue also causes the ports to be reassigned an incremental by 1 port for any service you are running. so for vscode remote-containers you need to do something like this in the devcontainer.json for vscode remote-containers (but this means you are maintaining a compose yaml file and devcontainers.json): https://containers.dev/implementors/json_reference/#compose-specific
In my view microsoft remote-containers is different implementation of a docker yaml file and it should have been a service that is configured in docker yaml format which exists side by side of your other wanted docker services...
I do not work at docker, so it would be good for someone official to have input here. |
Describe the bug
If you click Open with VSCode on any container, it breaks the original container (stops whatever is running, whether its nginx or apache.) What's worse is there is no way to get your original container working again (through a restart.). There is no way to start apache or nginx afterwards? So how are you suppose to change your code and actually see the results in nginx/apache?
This means Docker Development Environments are essentially pointless? If you cannot edit your code and see the results then what exactly are Docker Development Environments doing?
Do we need to do something special to our Dockerfiles so when VSCode attaches the original program (apache/nginx) starts again? I can't find anything on this...
Is this a Docker bug or a VSCode Attach bug? I'm using a custom
compose-dev.yaml
which just runs a simple apache and mysql container (seems like the most basic use case of a dev environment.)To Reproduce
Steps to reproduce the behavior:
Expected behavior
You should be able to open your web container in VSCode to change the code? What's the point of Dev Environments, seems completely useless if you cannot actually use VSCode on a Remote Container to change anything since it breaks the container anyway?
Desktop (please complete the following information):
OS: Mac OSX (M1 Pro)
Version: Ventura 13.0.1
Version of Docker Desktop:
You can find the version by clicking on the
About Docker Desktop
menuAdditional context
I really don't understand Docker Development Environments if you cannot actually attach VSCode to any of the containers to edit your code.
The text was updated successfully, but these errors were encountered: