The error is clear: The file bash
could not be found.
Possible problems are:
- To variable
$PATH
is not properly defined to find
the binary.
- The image used in your container doesn’t really have the
bash
available.
To solve the first case, try calling by the full path (the path may vary depending on the base image). An example:
docker exec -it meu-container /bin/bash
The bash
not being available is quite common in images that use Alpine Linux as a base image, as these do not have the bash
installed by default. An alternative in this case is to use sh
or install the bash
in your container.
To use the sh
execute:
docker exec -it meu-container sh
If you prefer the bash
, add the installation to your Dockerfile
and generate a new image.
Your question has neither foot nor head.
– epx
Hello Richard. What command are you using exactly to receive this error? If possible, also give details of which Docker image you are using in your container.
– Eduardo Baitello