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:

Thank you!!




Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

5 Popular Free Python-Supportive IDEs & Their 10 Handpicked Features

Solving Complex Adaptive Problems with Rubber Ducks

Testing the integrated hyperconnected world

SonarQube Analysis with Community Edition in a Docker Container on Mac M1

Infrastructure As Code Explained

HTML and CSS Tooltips

Why I chose n8n over Zapier in 2020 😍

Web Scraping with Python and Object-Oriented Programming

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
Krithika Sharma

Krithika Sharma

More from Medium

How to Receive WhatsApp messages using python and webhook

Integrating hCaptcha with Django-allauth

GET requests with Python, ORDS, and the Oracle Autonomous Database

Objects in SQL Worksheet in Oracle Autonomous Database, Chris Hoina, Senior Product Manager, ORDS, Database Tools,

how to bypass captcha in python