Day2: Create one image which have base as ubuntu and with git -ntp – apache2

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# docker run -itd –name anoop_ubuntu_base ubuntu
bcba3eb8cfb3d221c9f8f753a65c86ee5ea924d8c69438342d3e83d429d572a9
root@ip-172-31-28-155:/var/lib/docker# docker ps | grep anoop
bcba3eb8cfb3 ubuntu “bash” 5 seconds ago Up 4 seconds anoop_ubuntu_base
root@ip-172-31-28-155:/var/lib/docker# docker attach bcba3eb8cfb3

root@bcba3eb8cfb3:/# apt-get update

root@bcba3eb8cfb3:/# apt-get install git

root@bcba3eb8cfb3:/# apt-get install httpd

root@bcba3eb8cfb3:/# apt-get install mini-httpd

root@bcba3eb8cfb3:/# which git
/usr/bin/git

root@bcba3eb8cfb3:/# mini_httpd
bind: Address already in use

root@bcba3eb8cfb3:/# apt-get install ntp
Reading package lists… Done

root@ip-172-31-28-155:/var/lib/docker# docker ps | grep anoop
bcba3eb8cfb3 ubuntu “bash” 6 minutes ago Up 6 minutes anoop_ubuntu_base

root@ip-172-31-28-155:/var/lib/docker# docker commit -a “anoop” -m “ubuntu with git, ntp and mini-httpd” bcba3eb8cfb3 anoop_ubuntu_git_ntp_mini_httpd
sha256:c8c682de044446269eb0b9b667037c8fc3f79a36a4367ed26c19e58644f35c5a

root@ip-172-31-28-155:/var/lib/docker# docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
anoop_ubuntu_git_ntp_mini_httpd latest c8c682de0444 4 seconds ago 211MB