To run another command inside a container you use docker exec every time but by enabling shell or terminal access in the container you won’t have to use this again.
Here is the docker command which you use to enable shell access inside a container:
$ docker exec -it <container ID> sh
where exec is used to run another command, -it is input flag, and sh is shell enablement
Below image shows you the example:

