An error was reported when using docker to enter the specified container today. The screenshot of the error is as follows:
After careful verification, the command is correct, but it can’t get into the container. After checking the data, it is realized that there is a problem with the docker. It can be understood in combination with the error report:
Error response from daemon: OCI runtime exec failed: exec failed: container_linux.go:345: starting container process caused "exec: \"/bin/bash\": stat /bin/bash: no such file or directory": unknown
The above is complete error reporting information, of which the key information is as follows:
"/bin/bash\": stat /bin/bash: no such file or directory": unknown
That is, there is no directory/bin/bash, so an error will be reported when you want to enter the container according to the initial command.
You can enter by using the following command. The screenshot is as follows:
docker exec -it mqtt /bin/sh
Perfect solution, record notes!