Reputation: 360
The Docker extension for VS-code attaches /bin/sh to your containers by default. The settings file confirms this:
"docker.attachShellCommand.linuxContainer": "/bin/sh"
I have changed this in the settings editor of VS-code to attach to bash instead:
"docker.attachShellCommand.linuxContainer": "/bin/bash"
I expected to get /bin/bash
as CLI when attaching to the container. Instead, it still attached me to /bin/sh
.
Upvotes: 2
Views: 1638
Reputation: 11
I've had similar issues trying to use:
"docker.attachShellCommand.linuxContainer": "/bin/bash"
Getting and error:
"The terminal process failed to launch: Path to shell executable "/bin/bash" does not exist.
Ended up reverting back to:
"docker.attachShellCommand.linuxContainer": "/bin/sh"
Upvotes: 0
Reputation: 360
In the meantime, I'm a day further and the behaviour of my shell has changed to the behaviour of /bin/bash. This is confusing.
After even more experimenting, I found out that I have a problem with the Chrome cache. I installed a clear-cache button in Chrome, which allowed me to clear the cache whenever I suspected this problem. Now I am in control. I did nothing wrong with the settings.
Question answered. :-)
Upvotes: 1