How to configure Httpd web-server and Python interpreter on Docker OS(Arth-Task-7.2)

Neeteesh Yadav
4 min readNov 7, 2020

--

Task Descriptions………………………

Step1:-Configuring HTTPD Server on Docker Container.

Step2:-Setting up Python Interpreter and running Python Code on Docker Container.

Solution of Task……………………

Docker:-

Docker is a set of platform as a service (PaaS) products that use OS-level virtualization to deliver software in packages called containers. Containers are isolated from one another and bundle their own software, libraries and configuration files; they can communicate with each other through well-defined channels. All containers are run by a single operating system kernel and therefore use fewer resources than virtual machines.

#docker info

Above command show the information docker install or not if not install then install docker software and run this command show the information of docker.

Check the status of docker activate or not then run the command like,

#systemctl status docker

Above command use to show the status of Docker, Docker activated or not.

Discuss some Basic commands of Docker………….

#docker images

Above command use to check the how many images available to use.

#docker pull centos

Use above command download docker image on centralized docker hub.

Run the #docker images command check the image download or not.

Step1:-Configuring HTTPD Server on Docker Container.

#docker run -it — name httpd_conf centos

Use above command run the centos operating systems.

run-> Run keyword use to run the operating systems.

  • i ->Use this keyword find interactive.
  • t-> use this keyword find terminal.
  • — name-> Use this keyword to give image some name.

#docker ps -a

Use this command to check the how many images run in the systems.

  • >Centos image is based on the Linux operating systems also centos work on yum repo.
  • >Cenos docker image all-ready yum configure check yum configure or not run command like

#yum repolist

#yum install httpd

Use above command install apache webserver.

In the docker systemctl command not work then check httpd server status run the commands like

#/user/sbin/httpd

Create a web file use command like,

#cat > index.html

And write some code.

In the centos not install ifconfig command to find ip address.

#yum whatprovides ifconfig

Use above command to find the how to install ifconfig command and find ip address.

#yum install net-tools

Above Command use to install ifconfig command to see the IP address of the docker operating systems.

#ifconfig

Use above command to find the IP address.

Use IP address open page.

Step2:-Setting up Python Interpreter and running Python Code on Docker Container.

#yum whatprovides python3

Above command use to find which software use to install Python interpreter.

#yum install python3

Use Above command install python interpreter.

Check the python install or not run command like,

#python — version

Write code on python and run code.

#print(“Hello Python”).

Above code use to run using python.

#python3 hello.py

Use above command to run python code.

Summary:-

In this Blog we learn how to use docker install operating system and configure webserver and configure python interpreter.

Thanks Vimal Daga sir give high level knowledge to solve great use case.

--

--

Neeteesh Yadav
Neeteesh Yadav

Written by Neeteesh Yadav

Technical Enthusiast | MlOps(Machine learning + Operations)| DevOps Assembly Line| Hybrid Multi cloud

No responses yet