Docker – Lab – Assignment – Excercise-khaja babu
Limited Time Offer!
For Less Than the Cost of a Starbucks Coffee, Access All DevOpsSchool Videos on YouTube Unlimitedly.
Master DevOps, SRE, DevSecOps Skills!
Step 3 – Install Docker Engine in Centos#1 Vm.
sudo yum install -y yum-utilssudo yum install -y yum-utils device-mapper-persistent-data lvm2
sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
sudo yum install –y https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
sudo yum-config-manager --enable rhui-REGION-rhel-server-extras
sudo yum install -y docker-ce
docker -v
clear
sudo systemctl enable docker
sudo systemctl start docker
clear
docker info
Step 4 – Assignment#1
docker ps -a
docker exec -it 5276bae5464e bash
apt-get -y update
apt-get -y install git
apt-get install apache2
docker exec 5276bae5464e git
Step 5 – Assignment#2
docker run -d -p 8080:80 httpd
curl http://192.168.2.16:8080/