Assignment 1 Day 2
Limited Time Offer!
For Less Than the Cost of a Starbucks Coffee, Access All DevOpsSchool Videos on YouTube Unlimitedly.
Master DevOps, SRE, DevSecOps Skills!
What is Storage Driver and types of Storage Driver? Explain with Images.
A docker image can have different layers. When a container is created out of this image it will also have a writable layer on top of all the read only layers created out of the image. A storage driver manages all these layers making it appear as a single file system to the user. Multiple implementations of storage driver are available.
What is Docker Images and Explain 10 bullet lines?
A docker image contains all the dependencies needed to run an application
It is created as layers of file system on top of each other
Layering help update easy and efficient
When conflict happens, topmost layer gets precedence.
Any no.of containers can be created out of a single image
`
Create one Image which have base as centos and with git – ntp – httpd
used chrony instead of ntp
root@ip-172-31-28-155:/home/ubuntu# docker run -itd centos
793a59b5cbbebb3af8d373c20b28161cfca60e050a282a455b4349bdadb45315
docker attach 793a59b5cbbe
yum install git
yum install chrony
yum install httpd
docker commit -m”cent-git-chrony-httpd” 793a59b5cbbe cent-git-chrony-http
cent-git-chrony-http latest 62682df1872f 10 minutes ago 372MB
Create one Image which have base as ubuntu and with git – ntp – apache2.
root@ip-172-31-28-155:/home/ubuntu# docker run -itd ubuntu
254f2f37b7a7f7656d9595f2277c0ecefcf25ea9fcf3b1440055ec45b07a19fd
docker attach 254f2f37b7a7
apt-get update
apt-get install git
apt-get install ntp
apt-get install apache2
docker commit -m”ubu-git-ntp-apa” 254f2f37b7a7 ubu-git-ntp-apa
ubu-git-ntp-apa latest 43175557dca4 About a minute ago 259MB
root@ip-172-31-28-155:/home/ubuntu# docker run -itd ubu-git-ntp-apa
4c7c73feedd35567edef71c35d7ad7ce42d843a0d92aa5045364607d75614f95
root@ip-172-31-28-155:/home/ubuntu# docker exec 4c7c73feedd3 git
usage: git [–version] [–help] [-C ] [-c =]