How to run docker container with bash shell?
You can attach to the container with:
docker exec -ti 820d3a292b2c bash
or:
docker exec -ti upbeat_visvesvaraya bash
That image you are trying to run i.e. vulnerables/web-dvwa
contains ENTRYPOINT ["/main.sh"]
which runs mysqld on startup. If you need a just a shell in that image you can override the main entry like so below ...
docker run -it --rm --entrypoint /bin/bash vulnerables/web-dvwa
OR if you want a shell on the running mysqld container, you can run it normally w/ out -it
argument and then do the following to get a bash shell in the running container.
docker exec -it <container_id> /bin/bash