How to run a Web Server and Python Interpreter in the Docker Container

What is a Web Server?

What is Docker?

What is Python?

Now what I would do in this demo?

I would basically launch a new docker container on my Linux OS (which would act as my Base OS) and would install the Apache web server and the python interpreter to run any python code on my docker container. So lets get started….

systemctl status docker
systemctl start docker
docker images
docker run -it centos:latest
The highlighted text is the terminal of Centos OS
yum install httpd
yum list httpd
The command shows that httpd is already installed
cd /var/www/html
vi shivam.html
/usr/sbin/httpd
http://172.17.0.2/shivam.html
yum install python3
Python Interpreter is installing
print code written in REPL(live interpreter)

--

--

--

Learner, Tech Enthusiast

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

Recommended from Medium

Pair Programming — Two Brains are better than one, well maybe…

GUI Applications On Docker

How to install and uninstall Davinci Resolve using Terminal on Linux

BunnyPark Weekly Events: XDOGE BlindBox by BunnyPark SaaS Incubator + BP Locked CropPool Launched +…

BunnyPark Weekly Events: XDOGE BlindBox by BunnyPark SaaS Incubator + BP Locked CropPool Launched + 635,784 BP from Repurchase Program Burned + CAKE CropPool Output Reduction + 2nd Week BP Repurchase Completed

CS373 Spring 2022: Alex Chandler

MUGA Maintenance in East Mersea | Surface Maintenance #Multi #Use #Games #Area #Maintenance #East…

Even More CSS Tricks! (Pt. 1)

Dangling Element Selectors in CSS and Why You Should Avoid Them

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
Shivam Upadhyay

Shivam Upadhyay

Learner, Tech Enthusiast

More from Medium

Uploading python packages to be used by anyone with python

http://pypi.org

How To Enforce Conventional Commit Messages Using GIT Hooks

Memory ecosystem of python: Immutable and Mutabel Objects(a.k.a eveything is object)

Python 3 and C++11 Code Conciseness Comparison