đź”…Configuring HTTPD Server on Docker Container | đź”…Setting up Python Interpreter and running Python Code on Docker Container
So today I’m again come with another technical knowledge based Article. Today I will explain you how to launch httpd web server on the top of container. Also I will explain you that how to set python interpreter on the container so that we can able run our python code.
So without wasting any time, let’s jump into the today’s technical journey.
Pre-requisite knowledge for this practical :-
knowledge of docker, basics of web server and python programming
Step 1 :- Launch the container ( I have used centos container image with latest version. So for launching container, run this command :-
“docker run -it <image>:<image_version/tag>”
In my case have used centos container image with latest version.
Step 2 :- Install the httpd, python software/package using comman “yum install httpd python3 -y”
Step 3 :- Now create the webpage for your webserver in this path/directory “/var/www/html/”
Step 4 :- Start the httpd service using command “/usr/sbin/httpd”
Hurray, your webserver successfully launched on container.
Step 5 :- Now create any python code and run that code using command “python3 <file_name>”.
So in this way just by following above 5 steps you will able to configure HTTPD Server on Docker Container and Setting up Python Interpreter and running Python Code on Docker Container.
Below is the video of entire practical :-
So that’s all for today, we will meet in next article. Have a nice day!!!
Connect with me on LinkedIN :- linkedin.com/in/bhavesh-sonewale-880a93194