In this lesson, we'll find out the basics of running Docker containers. We'll go to the download images from Docker Hub, what's happens when you stop containers, how to restart a container on Ce it ' s been stopped, and also how to remove containers.
Run a container:
Docker run MONGO // run the container, if container not exists, download from hub
This would output the console log in the command line
Another-to-run Docker is in the Backage:
Docker run-d MONGO
To stop a container running:
Docker Stop <container id>
To varify there are not container running:
Docker PS
List all the container REGARELSS running or not:
Docker Ps-a
Start an container:
Docker start <container_id>
Remove an container:
Docker RM <container_id>
Notice that container shoud is stop first, then you can remove it.
[Docker] Run, Stop and Remove Docker Containers