Configuring HTTPD Webserver and Python on Top of Docker Container
🔅Configuring HTTPD Server on Docker Container
🔅Setting up Python Interpreter and running Python Code on Docker Container
1️⃣Configuring HTTPD Server on Docker Container
First we have to create a repository for yum to download the software from the browser.
- Now lets install docker and start docker service.
Now lets start docker service in the base OS.
Now let pull the latest version of centos image from the docker hub
Now lets launch a container on top of docker of image centos.
Now lets install httpd using yum
In centos systemctl command wont work but w have to start the server using a command which will internally run in redhat ==> # /usr/sbin/httpd
Now we need the ip of the os but in centos by default ifconfig command is not available.So we ha to install net-tools software for that
Now create a web page in the httpd root folder /var/www/html
Now open in the webpage and give the ip
Now we have finally configured the httpd server.
Now lets run python interpreter on top of docker container.For we have to install python3 software
2️⃣Now lets run code in python
Hence we have finally configured both webserver and python on top of docker container.
Thanks for Reading..