Check out example codes for "docker exec bash". It will help you in understanding the concepts better.

Code Example 1

docker exec -it [containerid/name] [shell]

docker exec -it fa80b69 bash
#if its an apline container use "sh" instead of "bash"

Code Example 2

//For executing commands in the container
docker exec -it <CONTAINER_NAME> bash

Code Example 3

docker exec -it nginx /bin/bash

Learn ReactJs, React Native from