Docker – Lab – Assignment – Narender Yalamadhi

DevOps

YOUR COSMETIC CARE STARTS HERE

Find the Best Cosmetic Hospitals

Trusted • Curated • Easy

Looking for the right place for a cosmetic procedure? Explore top cosmetic hospitals in one place and choose with confidence.

“Small steps lead to big changes — today is a perfect day to begin.”

Explore Cosmetic Hospitals Compare hospitals, services & options quickly.

✓ Shortlist providers • ✓ Review options • ✓ Take the next step with confidence

Step 3 – Install Docker Engine in Centos#1 Vm.

Install Docker

  sudo 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 install -y docker-ce
  docker -v
  sudo systemctl enable docker
  sudo systemctl start docker
  docker info
  which docker
  which dockerd
  ps -eaf | grep dockerd
  which containerd
  ps -eaf | grep containerd
  history
[root@localhost ~]#Code language: PHP (php)

Step 4 – Assignment#1

  • Create a Ubuntu container
  • Install Update, git & apache2
  • run a git command in container from outside
docker run -itd ubuntu
docker ps -a
docker exec -it 4d5fce1241d5 /bin/bash

docker run -d httpd
docker ps -a

apt-get -y install git
apt-get -y install apache2
apt-get -y update git
git --versionCode language: JavaScript (javascript)

Step 5 – Assignment#2

  • Create a httpd container exposed at 8080 port
  • Access(curl) container from node
docker run -d -p 80:80 httpd
wget localhost:80
Code language: CSS (css)