Configuring HTTPD Server , Setting up Python Interpreter and running Python Code on Docker Container

PREREQUISITES:

Vineet Negi
Nov 2, 2020

Install Docker

Command to Run docker

docker run -it --name <name of container> <image name:version>
Ex:- docker run -it --name myos1 centos
Note:-> Providing the name is not necessary.

Lets configure the apache webserver

  1. First install httpd :- yum install httpd -y
In my case I already installed the apache webserver already there.

2. To to directory(folder) -: cd /var/www/html and create file [ Configuring the webserver]

file_name is -> negi.html

3. Start the services of httpd but the problem we will face is due to the systemctl command is not working we to start the service we’ll use different command.

systemctl is not working

So i just need to find the directory where the httpd program is there we can directly run from there.

This is the second time i m typing the command that’s why its showing already running but in ur case it will start the service.

WEB-SERVER CONFIGURED

Now to run the program we need ip address for that we need to install package name called net-tools this us ifconfig from there we’ll see the ip address.

Now lets run the program

Setting up Python Interpreter and running Python Code on Docker Container

Download and install the Python Interpreter

yum install python3 -y

Let’s run python program inside docker

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

Vineet Negi
Vineet Negi

Written by Vineet Negi

★ Aspiring DevOps Engineer ★ Technical Volunteer @LinuxWorld ★ Technical Content Writer @Medium ★ ARTH Learner

No responses yet

Write a response