How to change the default /bin/sh to /bin/bash on opening CLI for selected container?

Not sure if this is actually an issue related to Docker Desktop, but I’m out of ideas where to change following.

I use Laradock which consists of multiple containers. If I select any container and click CLI button, the /bin/sh shell will be opened by default. Is there any way to manually reconfigure Docker to open /bin/bash?

1 Like

Сергей, нашел решение?)

This is an English forum. Please, write in English so everyone can understand without a translator.

/bin/sh is almost always available in containers, except when no shell can be found in that container. Lens (Kubernetes IDE) tries multiple shell commands like this:

sh -c 'clear; (bash || ash || sh)'

Docker could do something similar, but it would not guarantee that the chosen shel is what you prefer. Since you can run your favorite shell in the container immediately after Docker Desktop opened the default for you, my personal opinion is that a configurable default shell would just complicate the UI, but it would be great if Docker Desktop could inspect the Docker image and use try the shell configured in the Docker image using the SHELL instruction before trying other alternatives. That way you could use a custom image.

There is an old and closed issue for this on GitHub:

but you could ask for this feature in the roadmap:

or use docker exec from a terminal to run your preferred shell