Configuring WebServer & Python Interpreter on Docker Container

--

Task 7.2

  1. Configuring Webserver (HTTPD) Server on Docker Container.
  2. Setting up Python Interpreter and running Python Code on Docker Container.

All setup is going under the docker container.

docker pull httpd
docker run -it — name python-os httpd

httpd is the webserver rpm provided by apache.

yum install httpd net-tools -y

net-tools rpm provides ifconfig and netstat commands.

By default, systemctl doesn't support inside a docker container.

systemctl behind call /usr/sbin/httpd or httpd

httpd 
or
/usr/sbin/httpd

To check is web server service is running or not.

netstat -tnlp
firefox 172.17.0.2

Run this command in the BaseOS.

Otherwise, you can run curl 172.17.0.2 inside docker or outside docker container to see the output.

By default, we have Python Interpreter.

python2

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

--

--

Neeraj Singh Negi
Neeraj Singh Negi

Written by Neeraj Singh Negi

AWS | Openstack | GCP | Ansible | Redhat 8 Linux | Docker | Jenkins | Kubernetes | Hadoop | Python | Machine Learning

No responses yet

Write a response