Launching webserver and python using Docker Conatiner

Launching webserver and python using Docker Conatiner

Our task:

  • launching the HTTPD server over the docker container
  • setting up the python interpreter and running python code over it

LETS DO:

ABOUT 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. By taking advantage of Docker’s methodologies for shipping, testing, and deploying code quickly, you can significantly reduce the delay between writing code and running it in production.

first we install the docker on the linux machine

No alt text provided for this image

then now we start its services:

No alt text provided for this image

now we pull one image on which we will launch our container.

No alt text provided for this image

Launching a new Docker Container with Centos Image for our Web Server:

docker run -it   --name os1  -p 8081:80 centos:latest
No alt text provided for this image

now our container is launched and now we will configure the apache server and python.

No alt text provided for this image

now we will start the apache service

No alt text provided for this image
No alt text provided for this image

now our site is visible

No alt text provided for this image
No alt text provided for this image

now we will install the python on the docker

No alt text provided for this image

now running the python commands

No alt text provided for this image

thanks to vimal daga sir and the whole linuxworld team for providing such vital knowledge.
















































要查看或添加评论,请登录

社区洞察

其他会员也浏览了