Create one Image which have base as centos and with git – ntp – httpd

Limited Time Offer!

For Less Than the Cost of a Starbucks Coffee, Access All DevOpsSchool Videos on YouTube Unlimitedly.
Master DevOps, SRE, DevSecOps Skills!

Enroll Now

Created an image

docker run –name sree -itd centos
b50dcbcba771a111bf7c0b9a08eb4f14acfb83c666b2d5f8afbc13a7afc0748e
root@ip-172-31-28-155:/home/ubuntu# docker ps|grep sree
b50dcbcba771 centos “/bin/bash” 15 seconds ago Up 14 se conds sree
root@ip-172-31-28-155:/home/ubuntu# docker attach sree
yum install git -y
yum install httpd
docker commit -a”sreerekha” -m”ce-git-httpd -sree” sree ce-git-httpd-sree

docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
ce-git-httpd-sree latest b50885a6b058 19 seconds ago 346MB

docker run –name rekha -itd ce-git-httpd-sree
0d9262edc8ec86f142dc3fcb0b78cd1b923f9003ca022aa4a68b258bf6b0efc9
root@ip-172-31-28-155:/home/ubuntu# docker ps|grep rekha
0d9262edc8ec ce-git-httpd-sree “/bin/bash” 17 seconds ago Up 16 seconds rekha

docker exec rekha git –version
git version 2.27.0