Docker Useful Commands
Docker is natively Linux based software so that it provides commands to interact and work in the client-server environment.
Here, we have listed some important and useful Docker commands.
Check Docker version
It shows docker version for both client and server. As given in the following image.
Build Docker Image from a Dockerfile
-t : it is used to tag Docker image with the provided name.
Run Docker Image
-d : It is used to create a daemon process.
Check available Docker images
Check for latest running container
-l : it is used to show latest available container.
Check all running containers
-a : It is used to show all available containers.
Stop running container
container_id : It is an Id assigned by the Docker to the container.
Delete an image
Delete all images
Delete all images forcefully
-r : It is used to delete image forcefully.
Delete all containers
Enter into Docker container