ARTH-TASK 7.2

VYSAKH M
3 min readMar 9, 2021

Task description

A.Configuring HTTPD Server on Docker Container

B.Setting up Python Interpreter and running Python Code on Docker Container

MAIN STEP FOR BOTH TASK

Task Description :- Configuring HTTPD Server on Docker Container

For doing this task first we have configure our host os with Docker

INSTALL CONTAINER ON DOCKER

Step 1

Open with the directory yum repo

cmd:- cd /etc/yum.repos.d

Create two repo files

cmd :- vim (filename).repo

one file = lw.repo

write it as follows :-

Another file = docker.repo

and write it as follows :-

yum configuration is done

next install docker cmd:- yum install docker -ce — nobest

To verify

cmd:- rpm -q docker-ce

Step 2

Now we want to enable the service and make it permanet

Start the service

cmd:- systemctl start docker

To make it permanet

cmd :- systemctl enable docker

To check docker config

cmd:- docker info

Now docker is installed in host os

Step 3

Now we want to launch a container in docker

for that we have pull the container

cmd :- docker pull osname :version

Step 4

Run the container

docker run -it os name : version

A.CONFIGURING HTTPD ON TOP OF CONTAINER

Here am using centos for launching the httpd

Step 1

install httpd

cmd:- yum install httpd

sometimes we have stop firewall in the host os

systemctl stop firewalld

To check

cmd :- rpm -q httpd

Step 2

Start the httpd sevice

systemctl start httpd

Step 3

Go to dir /var/www/html

cmd cd /var/www/html

create the webpage page

eg “CONFIGURING HTTPD ON TOP OF DOCKER CONTAINER”

Step 4

Enable the sevice

Step 5

To check <ip>/<filename>.html

B.Setting up Python Interpreter and running Python Code on Docker Container

Step 1

For running python code we need Python interperter on container for installing it

cmd:- yum install pyhton3

Step 2

cmd python3

#it will give live interperter for running the code

Thank you!!!

— — — — — — — — — — — — — — — — — — — — — — — — — — — — — — —

--

--