Day2: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

root@ip-172-31-28-155:/var/lib/docker/overlay2# docker run -itd –name anoop_centos_2 centos
460aebb7de8bde42112d32e5e37df7617fb8e0588a9bdccf79f47d98357cede7

[root@ip-172-31-28-155:/var/lib/docker/overlay2# docker ps | grep anoop
460aebb7de8b centos “/bin/bash” 4 seconds ago Up 3 seconds anoop_centos_2

root@ip-172-31-28-155:/var/lib/docker/overlay2# docker attach 460aebb7de8b

[root@460aebb7de8b /]# yum update

[root@460aebb7de8b /]# yum install git

[root@460aebb7de8b /]# yum install epel-release

[root@460aebb7de8b /]# yum install -y ntp –> failed

Extra Packages for Enterprise Linux Modular 8 - x86_64                                                                                                                                                       176 kB/s | 931 kB     00:05
Extra Packages for Enterprise Linux 8 - x86_64                                                                                                                                                               623 kB/s |  10 MB     00:16
Last metadata expiration check: 0:00:03 ago on Tue 31 Aug 2021 05:47:55 AM UTC.
No match for argument: ntp
Error: Unable to find a match: ntp

[root@460aebb7de8b /]# yum install httpd

[root@460aebb7de8b /]# read escape sequence
root@ip-172-31-28-155:/var/lib/docker/overlay2# docker ps | grep anoop
460aebb7de8b centos “/bin/bash” 12 minutes ago Up 12 minutes anoop_centos_2

root@ip-172-31-28-155:/var/lib/docker/overlay2# docker commit -a “anoop” -m “centos with httpd git” 460aebb7de8b anoop_centos_git_httpd_2
sha256:997ad83c89e51ec5758c8615c73005b7f9aee66081f16b06e5a738344b56799d

root@ip-172-31-28-155:/var/lib/docker/overlay2# docker images | grep anoop_centos_git_httpd
anoop_centos_git_httpd_2 latest 997ad83c89e5 10 seconds ago 640MB

root@ip-172-31-28-155:/var/lib/docker/overlay2# docker history anoop_centos_git_httpd_2

IMAGE          CREATED         CREATED BY                                      SIZE      COMMENT
997ad83c89e5   3 minutes ago   /bin/bash                                       431MB     centos with httpd git
300e315adb2f   8 months ago    /bin/sh -c #(nop)  CMD ["/bin/bash"]            0B
<missing>      8 months ago    /bin/sh -c #(nop)  LABEL org.label-schema.sc…   0B
<missing>      8 months ago    /bin/sh -c #(nop) ADD file:bd7a2aed6ede423b7…   209MB