Configuring Apache web-server and python on Docker Container

Samkit Shah
Mar 15, 2021

--

Make sure docker is installed on your baseOS in my case I’am using RHEL8.

Step:1 We run the below mentioned docker command to launch the container and I’m using centos to get an image from because it had yum already configured.

Step 2: We install python and httpd package.

yum install python3 httpd -y #to install python and apache webserver

Step 3: Writing a simple python code for testing

Step 4: Writing a simple html code for testing of a web-server and starting the apache web-service.

Step 5: Using docker inspect command to get the ip address of our container and curl command to the of the webserver is running.

Thanks for reading , I hope you find it informative.

Connect with me on LinkedIn

See the demonstration

--

--

Samkit Shah

Machine Learning | Deep Learning | DevOps | MLOps | Cloud Computing | BigData