Open with VSCode breaks everything, Docker Environments are useless? #137
Description
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:
- Launch a dev environment
- Click Open with VSCode
- Container is now broken (mysql, apache, etc.) is no longer running
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
menu
Version
4.13.1 (90346)
Engine: 20.10.20
Compose: v2.12.1
Credential Helper: v0.7.0
Kubernetes: v1.25.2
Snyk: v1.1025.0
Additional context
I really don't understand Docker Development Environments if you cannot actually attach VSCode to any of the containers to edit your code.