Configuring HTTPD Server on Docker Container

Configuring HTTPD Server on Docker Container

To configure Httpd Server on Docker Container we need to follow following steps:

✍️Step 1 : launch new container in Docker using image (Centos:8)

docker run -it centos
No alt text provided for this image
Check the container is launch we use command “docker ps” ( show all the OS(container) running)
docker ps
No alt text provided for this image

✍️Step-2: Now install Httpd software using yum command

yum install httpd
No alt text provided for this image
Start Httpd Service
usr/sbin/httpd
No alt text provided for this image

✍️Step-3: Now create a folder in /etc/var/html for creating a web page and create html file inside that folder

cd /var/www/html
vi arp.html


No alt text provided for this image
Now install the software containing infconfig command
yum install net-tools
No alt text provided for this image

✍️Step-4: we can see our IP using ifconfig command

No alt text provided for this image

✍️Step-5: Finally we can see our web page running

curl <IP>/arp.html
No alt text provided for this image
No alt text provided for this image


To view or add a comment, sign in

More articles by Arpit Patel

Explore content categories