To access the bash of a Docker container, we need to run the container in interactive mode. We can use the interactive and pseudo-TTY options to allow the terminal to let us input commands using a terminal driver. You can use the following command:
$ docker run -i -t <image-name> bash