Configure Web Server and Launch Python Interpreter On The Top Of Docker Container
click here for video of this task:-
WHAT IS DOCKER :-
Docker is an open platform for developing, shipping, and running applications. Docker enables you to separate your applications from your infrastructure so you can deliver software quickly. With Docker, you can manage your infrastructure in the same ways you manage your applications.
WHAT IS DOCKER CONTAINER:-
Docker is a tool by which we manage the container , container is like a operating system you can launch these container with in a second ,docker work on the top of these container’s.
WHAT IS WEB SERVER :-
A web server is server software, or hardware dedicated to running this software, that can satisfy client requests on the World Wide Web. A web server can, in general, contain one or more websites. A web server processes incoming network requests over HTTP and several other related protocols.
For performing this task you have a red hat operating system in your system.
INSTALL AND START DOCKER :-
command for install docker:-
yum install docker
command for start docker:-
systemctl start docker
PULL DOCKER CONTAINER IMAGES :-
from docker hub we pull one UBUNTU:14.04 docker images for launch container
command for pull image:-
docker pull image name
LAUNCH CONTAINER WITH PATTING OF PORT NUMBER:-
now we launch one we2b container and at the time of launching ,we patting this container to the port no 80 ,here patting is require for go inside the web server of the container.
Command for launch container and patting port no:-
docker run -i -t -p 80:80 — name we2b ubuntu:14.04
LAUNCH APACHE2 WEBSERVER INSIDE UBUNTU O.S:-
Command for launch apache 2 webserver:-
apt-get install apache2
now i start this webserver with the help of below command:-
service apache2 start
after start the webserver i create one p.html file inside the folder of /var/www/html you can see source code of this html file.
INSTALL PYTHON INSIDE UBUNTU O.S:-
For install python inside ubuntu i use one command for this which is given below:-
apt-get install python
For checking this, that python has been successfully installed or not we run one command for this:-
python — — version
Now you can see the file of html has been successfully deployed on web server, for accessing this file through browser we have to use public ip of aws instance .
Public ip/html file name
Thanks for reading…………………………………….