7.2: Docker Task

7.2: Docker Task

What is Docker??

Docker is a set of platform as a service (PaaS) products that use OS-level virtualization to deliver software in packages called containers. Containers are isolated from one another and bundle their own software, libraries and configuration files; they can communicate with each other through well-defined channels. Because all of the containers share the services of a single operating system kernel, they use fewer resources than virtual machines.

Docker is an open platform for developing, shipping, and running applications. Docker enables us to separate our applications from our infrastructure so we can deliver software quickly. With Docker, we can manage our infrastructure in the same way we manage our applications.

In this article I have done following tasks using docker

  • Configure HTTPD Server on Docker Container
  • Set Up Python Interpreter and running Python Code on Docker Container

* First we have to setup docker

for that you need to install docker.

"yum install docker" this command we have to use to install docker.

to start docker - "systemctl start docker"

to check status of docker - "systemctl status docker"

No alt text provided for this image


No alt text provided for this image

Now to check which images we have to run the docker container for that;

"docker images" command is used.

No alt text provided for this image

Right now I don't have images to pull the image from web we have to tell docker

for this "docker pull <image name/OS name>" is used.

No alt text provided for this image

Now I have downloaded the centos image from web.

No alt text provided for this image

To run the container on docker

"docker run -i -t --name <OS name> <image name>" this command is used.

No alt text provided for this image

as you can see i have one container running.

** Configuring HTTPD Server on Docker Container

to install httpd server "yum install httpd" command is used.

No alt text provided for this image

Now we have to configure the /var/www/html/ file

No alt text provided for this image

I have written small code of html inside this file.

No alt text provided for this image

to start httpd server we can use ""systemctl start httpd" or "/usr/sbin/httpd"

No alt text provided for this image

Now by running "10.88.0.6" on browser I get the following output as the httpd server has been worked.

No alt text provided for this image

** Setting Up Python Interpreter and running Python Code on Docker Container

to install python3 - "yum install python3"

No alt text provided for this image

Now create one small python code

No alt text provided for this image

as you can see I get the output.


Thank You!!!!


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

Tejas Sanghai的更多文章

  • What is Jenkins??

    What is Jenkins??

    History of Jenkins Just like we have so many interesting stories about the development of so many technologies and…

  • Benefits of Openshift to Industries

    Benefits of Openshift to Industries

    First of all what is openshift???? OpenShift is a family of containerization software products developed by Red Hat…

  • Use cases of Azure Kubernetes Service

    Use cases of Azure Kubernetes Service

    An Introduction to Azure Kubernetes Service (AKS) Microsoft Azure is one of the foremost players in the cloud computing…

    1 条评论
  • Use Cases of Neural Network

    Use Cases of Neural Network

    What are Neural Networks? Neural networks are a set of algorithms, they are designed to mimic the human brain, that is…

    1 条评论
  • Integration of LVM with Hadoop

    Integration of LVM with Hadoop

    In this article we will: Integrate LVM with Hadoop and Provide Elasticity to DataNode Storage. Increase or Decrease the…

  • What is Kubernetes??

    What is Kubernetes??

    What does Kubernetes actually do and why use it? Kubernetes is a vendor-agnostic cluster and container management tool,…

    6 条评论
  • ??Ansible : A Case Study how industries are solving challenges using Ansible??

    ??Ansible : A Case Study how industries are solving challenges using Ansible??

    In this blog first we will start with what is ansible, its history, its architecture, why do we need it?, what are the…

  • Benefits which MNCs are getting from AI/ML

    Benefits which MNCs are getting from AI/ML

    A lot of people have probably heard of ML. We interact with them on a daily basis, but do not really know what exactly…

    3 条评论
  • Accessing AWS through CLI(Command Line Interface)

    Accessing AWS through CLI(Command Line Interface)

    For any account to log in into that account you need login ID and password same in case of AWS when you are accessing…

    1 条评论
  • AWS(Amazon Web Services)

    AWS(Amazon Web Services)

    You all are heard about what is Cloud Computing if not let me tell you..

社区洞察

其他会员也浏览了