Question 1: What is docker container with image?
Limited Time Offer!
For Less Than the Cost of a Starbucks Coffee, Access All DevOpsSchool Videos on YouTube Unlimitedly.
Master DevOps, SRE, DevSecOps Skills!
–
Inside a container all the necessary files/libraries/code to execute a program will be present.
- Running instance of image is called container
- Created a container
- started a container
- stopped a container
docker create --name rajuc httpd
548886386f8b3e430db0957ee104b53f004fd67f55044252d6566c5d3f25f926
docker ps | grep rajuc
548886386f8b httpd "httpd-foreground" 4 minutes ago Up 14 seconds 80/tcp rajuc
root@ip-172-31-28-155:/home/ubuntu# docker stop rajuc
rajuc
root@ip-172-31-28-155:/home/ubuntu# docker ps | grep rajuc
root@ip-172-31-28-155:/home/ubuntu# docker ps -a | grep rajuc
548886386f8b httpd "httpd-foreground" 12 minutes ago Exited (0) 22 seconds ago rajuc