Once you have install docker logical next step is to playaround with basic commands to ensure you get comfortable . If you haven’t had chance then you can refer my previous post of Docker Installation (Click Here)
Full set of commands along with description can be found on
I thought of sharing the basic commands which could be useful for the guys who are doing it for the first time
Category
|
Command
|
Description
|
Output
|
Containers
|
docker run “image name”
|
creates and starts a container in one operation
|
|
Containers
|
docker run -it ubuntu /bin/bash
|
launch a bash shell interactively in the new Ubuntu container
Note
Notice the prompt has change from host to container
|
|
Containers
|
docker run -d ubuntu /bin/sh -c \”while true; do echo \’hello docker\’; sleep 10; done\”
|
You can run containers in the
background as daemons with the docker run -d switch
|
|
Containers
|
docker ps
docker ps –a
With recent release of docker we can also use
docker container ls
docker container ls –a
|
List Active containers.
If used –a it lists all containers
|
|
Containers
|
docker exec -it “containerid” “cmd”
|
Run a command in a running container
|
|
Containers
|
docker rm “Container ID ”
|
Remove one or more containers
|
|
Images
|
docker images
|
List images
|
|
Images
|
docker rmi “Image ID”
|
Remove one or more images
|
|
Debugging/Troubleshooting
|
docker log “containerid’
|
Fetch the logs of a container
|
|
Debugging/Troubleshooting
|
docker stats -a
|
Display a live stream of container(s) resource usage statistics
|
|
Debugging/Troubleshooting
|
docker top “containerid”
|
Display the running processes of a container
|
|
Debugging/Troubleshooting
|
docker inspect “containerid”
|
Return low-level information on Docker objects.
In my example I have searched for IP Address of the container using grep
|
Great site for these post and i am seeing the most of contents have useful for my Carrier.Thanks to such a useful information.Any information are commands like to share him.digital marketing company in india
Great information on too techinical, I don't know that how i'm going to teach those commands to my students.LOW Fees MBAbySt hopkins MBA College
Thanks for helping me to understand basic concepts. As a beginner in DevOps, your post helps me a lot. best devops training in chennai | DevOps training in Chennai omr | DevOps training in Chennai with placement
I gather more information through this article, so please keep me informed of any update in this regard. For more relevant articles click on: how to recover deleted datacustom filedisk image softwareretrieve deleted files windowsdiskdiggerdiskdigger prousb drivedownload diskdigger
Thanks for sharing such a good blog. You’re doing a great job. Keep posting like this useful info !! Best Ethical Hacking Training in Chennai | Best Ethical Hacking Course in Chennai | Ethical Hacking Training with Placement | ceh Training in Chennai at TwinTech Solutions | Ethical Hacking Course | ceh Training | Ethical Hacking Training