The tutorial guide us docker run -it --rm -p 5200:80 --name pizzabackendcontainer pizzabackend
- -it: That means you will execute the container by terminal mode.
- -rm: Automatically remove the container when it exits
So when you execute the command you will be interactive container command line and the container will be stopped when you exit.
docker run -itd -p 5200:80 --name pizzabackendcontainer-1 pizzabackend
If you want to run a container and keep it in your original terminal you can try to add -d
parameter that will run the container in the background and print container ID.
more detail about docker run parameter you can refer docker run