Closed marianfoo closed 2 years ago
Not being a GUI-first user, I've never done this before, so I tried it and got the same result. So I did some research, and using the "CLI" feature from the Docker Desktop GUI places you in a sh
environment. According to the Docker Desktop GUI documentation for this, the Explore Containers section says:
You also have the option to open an integrated terminal, on a running container, directly within Docker Desktop. This allows you to quickly execute commands within your container so you can understand its current state or debug when something goes wrong. Using the integrated terminal is the same as running
docker exec -it <container-id> /bin/sh
This makes sense, in that it allows you to connect to an already running container in the normal (exec
) way and is not the equivalent of launching a fresh container instance (where the CMD
would be carried out).
When you open the terminal from the Docker GUI as a external terminal, you need to run
bash
:Would good if this is in the documentation as well