Configuring Web server n Python interpreter on Docker
Before configuring the httpd web server and python interpreter we first have to instal Docker in the system.
First by going inside the /etc/yum.repos.d/ lets create a repo.
Now, let’s the the following things in repo file…
Docker is now succesfully installed in your system. Now let’s start the docker service
Let’s now pull the docker image to configure webserver on it.
Now launching, run and booting the OS in 1 sec using docker:
Installing httpd software for webserver:
Now, moving to /var/www/html folder and creating a html file.
In docker as systemctl cmd doesn’t work, we use /usr/sbin/httpd to start the httpd services
Now installing python3 using yum:
Now, moving to /var/www/cgi-bin folder to create the python API file. We can simply create the file locally in any folder and run it. We can view the file in browser by making the file executable, but here I’m just running locally to check if python interpreter is working on docker: