HTTPD & Python on Docker

To configure the httpd web server and python interpreter we first must install Docker in the system.

Go inside the /etc/yum.repos.d/ to create a repo.

Now, write this in repo file:

Install docker:

Start docker:

Pull docker image.

Now run (launch, run and booting) the OS in 1 sec using docker:

Install httpd software for webserver:

Go to /var/www/html folder and create a html file.

In docker as systemctl cmd doesn’t work, so we use /usr/sbin/httpd to start the httpd services.

Install python3 using yum:

Go 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:

--

--