for docker run to exit out of the docker container bash shell. Just run exit or hit ctrl + D
for docker-compose you use ctrl + c
remember to use docker ps to check the status of your container and docker stop <container name> to actually stop the container
I hope this helps.