Run Docker Container In Detached Mode
Most of the time you need to run the container in the detached mode or we can say in the background. By this, the application will continuously run when we are not engaged by this we can work on the remaining features of containers like networks or volumes of containers and also we can work on different multiple containers. To run the container in “detached” mode use the below command.
docker run -d -p 80:80 Nginix: latest
We can use “–detach” or “-d” in short. The Docker container will start and run in the “detach” mode and it returns you to the terminal prompt.
How to Map Ports in Docker?
In docker, all the application in the container runs on particular ports when you run a container. If you want to access the particular application with the help of a port number you need to map the port number of the container with the port number of the docker host.