How to install docker in Ubuntu ?
> sudo apt-get update
> sudo apt install docker.io
How to pull images from docker hub ?
> Docker pull httpd
How to remove all docker images from the repository ?
> Docker system prune -a
What is prune ?
Prune command allows you to clean up unused images
Docker image prune only cleans up dangling images and that is not tagged or referenced.
How to list all the dockers status running on the machine
> docker stats
The above command show all the current usage of the running docker containers in the host with the usage of mem usage,cpu usage, pid's ( we can call this ideally as a Task manager in Windows )
The main important arguments commands in the Docker
-d --> detached mode (runs the container in background mode)
-i --> interactive/input ( allows you to input your values)
-t --> terminal ( takes you to the shell window that you wish )
How to list all the running docker process ?
> docker ps
It will show all the running docker container with their respective id's
How to get a container logs in docker ?
>docker logs containerid
You can get the containerid by specifying below command
> docker ps -a
0 Comments