Top Docker Commands

 What all commands we tried

        0. Docker build . 
create the docker image for the docker file kept in folder
1. Docker-compose build 
Used to build the docker file using docker compose
Docker-compose up command also does it but also run the image 
When you just want to build it  use only build

2. Docker run -itd "ImageName"
Run the image in deatached mode "d"
It --> interactive
3. Docker exec -it bash
Execute a command on running container
4. Docker image ls
List images
5. Docker image history
See the history of the image 
All layers and how much space they contribute in total size
--no-trunc | to ask image history not to truncate the text in results printed
6. Docker rmi imageName -f
Remove the Docker image
7. Docker image prune
Remove the dangling images 
8. Docker stats
See the current information of all conatienrs
9. Docker ps 
See all processes running in docker
10. Docker inspect
Inspect the Docker image or container
Info such as IP address , path , port exposed etc  is shown
11. Docker Copy
docker cp /opt/newfile.txt 043869c58300:/opt/

Comments

Popular posts from this blog

Command Line tool for Android and iOS [ adb and cfgutil ]

Convert Chrome recording to Vugen Script

Jmeter-CheatSheet