Configuring HTTPD Server on Docker Container | Task 7.2 | ARTH

What is Docker??

How to Install Docker??

To install new version of docker we have to include “nobest” in the command:-

#yum install docker-ce --nobest

Some basic pre-requisites

#docker pull centos

We can see the docker images in the OS using command:-

#docker images

So after this pre-requisite let’s do the task

#docker run -it --name <Container_Name>  <Image_Name>:<Version>

After installing container we have to install “net-tools” software for “ifconfig” command.

Now to see the IP of the container we can use ifconfig command.

So for Apache webserver we to install “httpd” software.

Here you can observe a beautiful thing about docker that we don’t have to configure the yum before installing the softwares.

Now lets create a webpage inside “/var/www/html” folder.

As “systemctl” commands won’t work in docker so we have to use another command to start webservices in container.

/usr/sbin/httpd

Now we can access the webpages inside the Redhat OS using IP of Container & name of file.

So finally you can see the webpage i just start in the docker container.

******Thanks For Reading this Article******

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store