7.2 Docker Task

1.Configuring HTTPD Server on Docker Container


To check whether my docker software has been installed or not.We use the below-mentioned command


We can start the docker service by using the docker start command and enable the docker service permanently by using the docker enable command

and can also check the docker status whether it is enabled or not by using docker status command


After launching the docker container, we have to use this command to run the container.


The next step is to install the httpd software.


Now,by going to the directory cd /var/www/html,we will make a HTML file docker.html


Now starting the services.Services will not work if we are starting it using

###systemctl start httpd

So,that's why now we will use this command /usr/sbin/httpd


Next is we will copy the ip that is shown above and will use the ip in the command given below..

Now use the command curl http://Containerip/Webpage.html

Voilaaa! Now we can see that the httpd server is configured and is working fine and we can see the output…..


Here we will pull one more image using the command docker pull imagename:version

Step 2

Docker images command will show all the images…

Step 3

We run the docker container


Install the Python software using the command given below


We will then create a separate workspace for python programs using the command given below

In the above examples we can see that I have made a directory for python programs and I am going into the directory using the cd command using vi editor I am creating a python file


After that, I have been running the python code using the command python3 filename.py

So the objective of my task has been accomplished…..

ENjoy reaDing…..

— -Divya Jain



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