Docker is an open source platform for system admins and developers to create, ship, and run apportioned applications. Docker permits you to execute applications inside containers, it provide OS (Operating System) level virtualization on Linux. Docker is developed to process your applications faster. It basically use system resource isolation features of the Linux kernel such as cgroups and kernel namespaces to permit self-directed (independent) “containers” to run within a individual Linux instance, debarring the overhead of starting virtual machines.
Docker helps you to execute your applications separately from your infrastructure AND treat your infrastructure such as managed application. Docker helps you execute,test and deploy faster.
Linux kernel’s namespaces generally completely isolate an application’s view of the operating environment, including network, mounted file system , process trees, and user IDs, while cgroups provide resource isolation facility, such as CPU, memory, block I/O and network. Docker admits the libcontainer library for containers implementation, and builds on top of libvirt, Linux containers and systemd-nspawn, which provide interfaces facilities.
Easy deployment and scaling
Docker’s container-based platform permits highly portable workloads. Docker containers can run on a admin’s and developer’s local system, on physical or virtual machines in a data center, as well as in the Cloud.
Docker’s portability and lightweight features make roundly managing workloads easygoing. You can use Docker to promptly scale up or tear down applications and services.
Much workloads and higher density
Docker is a lightweight and fast application platform which provides a feasible, cost-effective alternate choice of hypervisor based virtual machines. This is specially useful in high density situation (environments) for instance, implementing own Cloud or Platform-as-a-Service. As well as also useful for small and medium deployments where you require to get more resources.
Docker components of:
The Docker Engine – It provide the lightweight and powerful open source container virtualization technology for your applications.
Docker Hub – It provide SaaS service for sharing and managing your application stacks.
Docker installation on centos 7
Docker by default included in the Centos 7 EPEL repository. You can install it by using following steps.
Installaing on Centos 6
To install docker on Centos 6 you have to enable EPEL repository by default it not enable on centos 6 so install EPEL rpm package from EPEL repository and then run the following command to install docker on centos 6
Once installation gets completed then execute the below command to start docker daemon.
if you want start at boot, as below.
Now verify that Docker is working or not. Get the latest centos image first as given below.
Next make sure that image running or not:
The output should be as similar
Execute a simple bash shell to test the image:
If everything is working fine, you will get a simple command prompt. Type exit to continue.
Docker permits programmer to run applications inside containers. Execute the following command to run an application inside a container.
Hello My First Docker
The following command will show the container ID.
Docker ps command will shows the user information such as container id, name created data an time as well as status.
docker logs shows the what’s going on
MY First Docker Container
Run the following command to stop the container
Now verify the status of container
If output is blank that’s mean container has been stopped.
Run a Web Application in Docker
For instance we are going to run python web app inside docker container.
Now verify the status of docker container using by following command.
If you want to port mappings in Docker containers then use the following command.
The above command map port 5000 inside container to port 5000 on local host
Finally you can access your webapp through internet web browser using 5000 port as given below.
Ubuntu installation
Ubuntu-maintained Package Installation
To install the latest Ubuntu package (this is not the most recent Docker release):
[root@notihost6 ~]# sudo apt-get install docker.io
Then enable docker command in bash profile.
That’s it Cheers!
Hi,
documents is clear to install docker service in linux machine but you please let us know how can we use it for apache version to client.
Thanks