User:Asayal1690/Docker
{{user draft |date =September 2015}}
{{merge to |Docker (software)|date =May 2022|discuss =Talk:Docker_(software)#Abandoned_user_draft}}
{{noindex}}
{{student sandbox}}
{{about|the virtualization software|the desktop icon docker|Dock (computing)|other uses|Docker (disambiguation)}}
{{Infobox software
| name = Docker
| title = Docker
| logo = 250px
| screenshot =
| caption =
| collapsible =
| author = Solomon Hykes
| developer = Docker, Inc.
| released = {{Start date|2013|03|13}}
| discontinued =
| latest release version = 1.8.1{{cite web|url=https://github.com/docker/docker/blob/master/CHANGELOG.md |title=Docker Changelog |work=docs.docker.com |publisher=Docker, Inc. |date=2015-08-14 |accessdate=2015-08-18}}
| latest release date = {{Start date and age|2015|08|12}}
| latest preview version =
| latest preview date =
| frequently updated =
| programming language = Go
| operating system = Linux
| platform = x86-64 with modern Linux kernel
| language =
| status =
| genre = Operating system-level virtualization
| license = Apache License 2.0
| website = {{URL|https://www.docker.com/}}
}}
Docker is an open-source project that automates the deployment of applications inside software containers, by providing an additional layer of abstraction and automation of operating-system-level virtualization on Linux, Mac OS and Windows.
{{cite web
| last = O'Gara
| first = Maureen
| date = 26 July 2013
| url = http://maureenogara.sys-con.com/node/2747331
| title = Ben Golub, Who Sold Gluster to Red Hat, Now Running dotCloud
| publisher = SYS-CON Media
| accessdate = 2013-08-09
}}
Docker is not itself a container technology; it is a container description format and orchestration API.{{cite web|title=Orchestrating docker with machine, swarm and compose.|url=https://blog.docker.com/2015/02/orchestrating-docker-with-machine-swarm-and-compose/|website=blogs.docker.com|accessdate=23 September 2015}}
According to industry analyst firm 451 Research, "Docker is a tool that can package an application and its dependencies in a virtual container that can run on any Linux server. This helps enable flexibility and portability on where the application can run, whether on premises, public cloud, private cloud, bare metal, etc."{{cite web
| last = Noyes
| first = Katherine
| date = 1 August 2013
| url = http://www.linux.com/news/enterprise/cloud-computing/731454-docker-a-shipping-container-for-linux-code
| title = Docker: A 'Shipping Container' for Linux Code
| publisher = Linux.com
| accessdate = 2013-08-09
}}
Overview
[[File:Docker-linux-interfaces.svg|thumb|right|upright=1.8|Docker can use different interfaces to access virtualization features of the Linux kernel.{{cite web
| url = http://blog.docker.com/2014/03/docker-0-9-introducing-execution-drivers-and-libcontainer/
| title = Docker 0.9: Introducing execution drivers and libcontainer
| date = 2014-03-10 | accessdate = 2015-01-20
| website = docker.com
}}]]
Docker implements a high-level API to provide lightweight containers that run processes in isolation.{{cite web
| last = Avram
| first = Abel
| date = 2013-03-27
| url = http://www.infoq.com/news/2013/03/Docker
| title = Docker: Automated and Consistent Software Deployments
| publisher = InfoQ
| accessdate = 2013-08-09
}}
It uses resource isolation features of the Linux kernel such as cgroups and kernel namespace to allow independent "containers" to run within a single Linux instance, avoiding the overhead of starting and maintaining virtual machines.{{cite web
| url = http://docker.readthedocs.org/en/v0.7.3/installation/kernel/
| archiveurl = http://web.archive.org/web/20140821065734/http://docker.readthedocs.org/en/v0.7.3/installation/kernel/
| title = Docker Documentation: Kernel Requirements
| date = 2014-01-04 | accessdate = 2014-08-20 | archivedate = 2014-08-21
| website = docker.readthedocs.org
}}
Building on top of facilities provided by the Linux kernel (primarily cgroups and namespace), a Docker container, unlike a virtual machine, does not require or include a separate operating system. Instead, it relies on the kernel's functionality and uses resource isolation (CPU, memory, block I/O, network, etc.) and separate namespaces to isolate the application's view of the operating system. Docker accesses the Linux kernel's virtualization features either directly using the {{Mono|libcontainer}} library, which is the default execution environment for Docker and is available since Docker 0.9, or indirectly via {{Mono|libvirt}}, LXC (Linux Containers) or {{Mono|systemd-nspawn}}.{{cite web
| last = Swan
| first = Chris
| date = 2014-03-13
| url = http://www.infoq.com/news/2014/03/docker_0_9
| title = Docker drops LXC as default execution environment
| publisher = InfoQ
| accessdate = 2015-01-20
}}
By using containers, resources can be isolated, services restricted, and processes provisioned to have an almost completely private view of the operating system with their own process ID space, file system structure, and network interfaces. Multiple containers share the same kernel, but each container can be constrained to only use a defined amount of resources such as CPU, memory and I/O.
Using Docker to create and manage containers may simplify the creation of highly distributed systems, by allowing multiple applications, worker tasks and other processes to run autonomously on a single physical machine or across multiple virtual machines. This allows the deployment of nodes to be performed as the resources become available or when more nodes are needed, allowing a platform as a service (PaaS)-style of deployment and scaling for systems like Apache Cassandra, MongoDB or Riak. Docker also simplifies the creation and operation of task or workload queues and other distributed systems.{{cite web
| last = Hall
| first = Adron
| date = 31 July 2013
| url = http://www.cloudave.com/30655/oscon-conversations-deployments-architecture-docker-and-the-future/
| title = OSCON : Conversations, Deployments, Architecture, Docker and the Future?
| publisher = CloudAve
| accessdate = 2013-08-09
| last = Reeder
| first = Travis
| date = 22 April 2014
| url = http://blog.iron.io/2014/04/how-docker-helped-us-achieve-near.html
| title = How Docker Helped Us Achieve the (Near) Impossible
| publisher = Iron.io
| accessdate = 2014-07-25
}}
History
Solomon Hykes started Docker as a Python based internal project within the platform as a service company, dotCloud.{{cite web|url=https://www.dotcloud.com/ |title=One home for all your apps |publisher=dotCloud |date= |accessdate=2014-05-08}} Other initial contributors included fellow dotCloud engineers including Andrea Luzzardi and Francois-Xavier Bourlet, with Jeff Lindsay also serving as an independent collaborator. Docker represents an evolution of dotCloud's proprietary container orchestration technology, which itself was built upon earlier open-source projects such as Cloudlets.
Docker was released as open source in March 2013. On March 13, 2014, with the release of version 0.9, Docker dropped LXC as the default execution environment and replaced it with its own {{Mono|libcontainer}} library written in the Go programming language.{{cite web
| url = http://www.zdnet.com/docker-libcontainer-unifies-linux-container-powers-7000030397/
| title = Docker libcontainer unifies Linux container powers
| date = 2014-06-11 | accessdate = 2014-07-30
| author = Steven J. Vaughan-Nichols | publisher = ZDNet
}} Since it’s release, Docker has grown to be a major contender in the market for container orchestration APIs. As of April 13, 2015, the Docker project had accumulated over 20,700 GitHub stars (making it the 20th most starred GitHub project), over 4,700 forks, and nearly 900 contributors.{{cite web
| url = https://github.com/dotcloud/docker
| title = dotcloud/docker
| publisher = GitHub
| accessdate = 2015-04-13
}}
A May 2015 analysis showed the following organizations as main contributors to Docker: the Docker team, Red Hat, IBM, Google, Cisco Systems and Amadeus IT Group.{{cite web|url=http://www.infoworld.com/article/2925484/application-virtualization/look-whos-helping-build-docker-besides-docker-itself.html |title=Look who's helping build Docker -- besides Docker itself |publisher=InfoWorld |date=2015-05-27}}
= Collaboration =
- On July 23, 2013, dotCloud, Inc., the commercial entity behind Docker, announced that former Gluster and Plaxo CEO Ben Golub had joined the company, citing Docker as the primary focus of the company going forward.{{cite web
| last = Darrow
| first = Barb
| date = 23 July 2013
| url = http://gigaom.com/2013/07/23/paas-pioneer-dotcloud-gets-new-ceo-in-industry-vet-ben-golub/
| title = PaaS pioneer dotCloud gets new CEO in industry vet Ben Golub
| publisher = GigaOM
| accessdate = 2013-08-09
}}
- On September 19, 2013, Red Hat and Docker announced a significant collaboration around Fedora, Red Hat Enterprise Linux, and OpenShift.{{cite web
| url= http://techcrunch.com/2013/09/19/dotcloud-pivots-and-wins-big-with-docker-the-cloud-service-now-part-of-red-hat-openshift/
| title= DotCloud Pivots And Wins Big With Docker, The Cloud Service Now Part Of Red Hat OpenShift
| publisher= TechCrunch
| date= 2013-09-19
| accessdate= 2014-01-20
}}
- On January 22, 2014, Docker announced that it had completed a $15 million Series B venture capital round, led by Greylock Partners.{{cite web
| date= January 21, 2014
| url= http://venturebeat.com/2014/01/21/dockers-open-source-bet-pays-off-with-15m-round/
| title= Docker's open-source bet pays off with $15M round
| author= Jordan Novet
| publisher= VentureBeat
| accessdate= 2014-01-22
}}
- On July 23, 2014, Docker acquired Orchard, makers of Fig.{{cite web
| date= July 23, 2014
| url= http://www.forbes.com/sites/benkepes/2014/07/23/docker-makes-its-move-acquires-orchard-in-a-sign-of-things-to-come/
| title= Docker Makes Its Move, Acquires Orchard In A Sign Of Things To Come
| author= Ben Kepes
| publisher= Forbes
| accessdate= 2014-07-23
}}
- On September 16, 2014, Docker announced that it had completed a $40 M Series C round, led by Sequoia Capital.{{cite web
| date= September 16, 2014
| url= http://www.businessweek.com/news/2014-09-16/docker-said-to-be-valued-at-400-million-in-funding-round
| title= Docker Said to Be Valued at $400 Million in Funding Round
| author= Jack Clark and Peter Burrows
| publisher= Bloomberg
| accessdate= 2014-09-16
}}
- On October 15, 2014, Microsoft announced integration of the Docker engine into the next (2016) Windows Server release, and native support for the Docker client role in Windows.{{cite web
| url = http://www.zdnet.com/docker-container-support-coming-to-microsofts-next-windows-server-release-7000034708/
| title = Docker container support coming to Microsoft's next Windows Server release
| date = 2014-10-15 | accessdate = 2014-10-16
| author = Mary Jo Foley | publisher = ZDNet
| date= October 15, 2014
| url= http://weblogs.asp.net/scottgu/docker-and-microsoft-integrating-docker-with-windows-server-and-microsoft-azure
| title= Docker and Microsoft: Integrating Docker with Windows Server and Microsoft Azure
| author= Scott Guthrie
| publisher= Microsoft
| accessdate= 2015-01-12
}}
- On December 4, 2014, IBM announced a strategic partnership with Docker that enables enterprises to more efficiently, quickly and cost-effectively build and run the next generation of applications on the IBM Cloud.{{cite web
| url = https://www-03.ibm.com/press/us/en/pressrelease/45597.wss
| title = IBM and Docker Announce Strategic Partnership to Deliver Enterprise Applications in the Cloud and On Prem
| date = 2014-12-04 | accessdate = 2015-04-20
| publisher = IBM
}}
- On June 22, 2015, it was announced that Docker and numerous other companies are working on a new vendor- and operating-system-independent standard for software containers.{{cite web
| url = http://techcrunch.com/2015/06/22/docker-coreos-google-microsoft-amazon-and-others-agree-to-develop-common-container-standard/#.pvelx1:NDMH
| title = Docker, CoreOS, Google, Microsoft, Amazon And Others Come Together To Develop Common Container Standard
| date = 2015-06-22 | accessdate = 2015-08-08
| author = Frederic Lardinois | publisher = TechCrunch
| url = http://www.cio-today.com/article/index.php?story_id=112003LU9CSG
| title = Docker, Tech Giants Team on Open Container Project
| date = 2015-06-22 | accessdate = 2015-08-08
| author = Shirley Siluk | website = cio-today.com
}}
Integration
Docker can be integrated into various infrastructure tools, including Amazon Web Services,{{cite web |url=https://docs.docker.com/installation/amazon/ |title=Amazon EC2 - Docker Documentation |website=docs.docker.com |date= |accessdate=2014-10-18}} Ansible,{{cite web|author=/ |url=https://github.com/ansible/ansible/blob/devel/library/cloud/docker |title=ansible/library/cloud/docker |publisher=GitHub |date= |accessdate=2014-01-20}} CFEngine,{{cite web|url=http://docs.docker.com/examples/cfengine_process_management/|title=CFEngine |publisher=CFEngine |date= |accessdate=2014-06-06}} Chef,{{cite web|url=https://github.com/thoward/docker-cookbook |title=thoward/docker-cookbook |publisher=GitHub |date= |accessdate=2014-01-20}} Google Cloud Platform,{{cite web|title=Containers on Google Cloud Platform|url=https://cloud.google.com/compute/docs/containers|publisher=Google Inc}} IBM Bluemix,{{cite web |url=https://developer.ibm.com/bluemix/2014/12/04/ibm-containers-beta-docker/ |title=Bluemix Launches IBM Containers Beta Based on Docker |publisher=IBM |date= 2014-12-04 |accessdate=2015-04-20}} Jelastic,{{cite web |url=http://www.prweb.com/releases/2014/12/prweb12361294.htm/ |title=Jelastic Announces Docker Integration to Provide the Most Advanced Orchestrated Application Delivery |publisher=PRWeb|date= |accessdate=2014-12-03}} Jenkins,{{cite web|url=https://github.com/georgebashi/jenkins-docker-plugin |title=georgebashi/jenkins-docker-plugin |publisher=GitHub |date= |accessdate=2014-01-20}} Microsoft Azure,{{cite web|url=https://azure.microsoft.com/en-us/documentation/articles/virtual-machines-docker-vm-extension/|title=The Docker Virtual Machine Extension for Linux on Azure|date=29 June 2015|publisher=Microsoft |accessdate=11 August 2015}} OpenStack Nova,{{cite web|author=Stefano Maffulli June 7th, 2013 |url=http://www.openstack.org/blog/2013/06/openstack-community-weekly-newsletter-may-31-june-7/ |title=OpenStack Community Weekly Newsletter (May 31 – June 7) » The OpenStack Blog |publisher=Openstack.org |date=2013-06-07 |accessdate=2014-01-20}} OpenSVC,{{cite web|url=http://docs.opensvc.com/virtualization.docker.html |title=OpenSVC Docker |publisher=OpenSVC |date= |accessdate=2014-05-29}} Puppet,{{cite web | author = Gareth Rushgrove | url = http://forge.puppetlabs.com/garethr/docker | title = garethr/docker | publisher = Puppet Forge | date = | accessdate = 2014-01-20 }} Salt,{{cite web|url=http://docs.saltstack.com/ref/modules/all/salt.modules.dockerio.html#module-salt.modules.dockerio |title=saltstack/dockerio |accessdate=2014-01-20}} and Vagrant.{{cite web|url=https://github.com/philspitler/vagrant-docker |title=philspitler/vagrant-docker |publisher=GitHub |date= |accessdate=2014-01-20}}
The Cloud Foundry Diego project integrates Docker into the Cloud Foundry PaaS.
{{cite web
| last1 = Whelan
| first1 = Phil
| title = Cloud Foundry: Diego Explained By Onsi Fakhouri
| url = http://www.activestate.com/blog/2014/09/cloud-foundry-diego-explained-onsi-fakhouri
| publisher = ActiveState
| publication-date = 2014-09-03
| accessdate = 2015-04-20
| quote = Functionality is being added to enable end-users to push Docker images directly into a Cloud Foundry cluster running Diego.
}}
The GearD project aims to integrate Docker into the Red Hat's OpenShift Origin PaaS.
{{cite news
| last1 = Jackson
| first1 = Joab
| title = Red Hat to update Docker container tech for enterprises: Open source vendor plans to incorporate advanced Linux tools such as systemd and SELinux into Docker
| url = http://www.computerworld.com/s/article/9247706/Red_Hat_to_update_Docker_container_tech_for_enterprises
| newspaper = Computerworld
| publisher = Computerworld, Inc.
| publication-date = 2014-04-16
| accessdate = 2014-05-29
| quote = Red Hat has also started a second community project, called GearD, to integrate Docker into its PaaS (platform-as-a-service) hosting software, OpenShift Origin.
}}
Usage and Implementation
There are two options for creating Docker images, Docker’s command line interface or GUI interfaces such as [https://www.docker.com/docker-kitematic Kitematic].
When using the Docker command line interface, images can be created via entering individual commands on the command line or by utilizing dockerfiles. Dockerfiles are similar to shell scripts, in that they contain the individual lines of commands that are to be executed to generate the final image{{Cite web|title = Dockerfile reference|url = https://docs.docker.com/reference/builder/|website = docs.docker.com|accessdate = 2015-09-15}}. As is also the case with entering the individual docker commands via the command line, each line in a dockerfile results in a newly committed image. The result of iterating over all the lines in the file is the incorporation of deltas into the final image. This is similar to how version control systems such as Git function. Each command is an individual commit, with the final image being the sum total of all the proceeding commits.
== Basic Docker CLI commands<ref>{{Cite web|title = Using the command line|url = https://docs.docker.com/reference/commandline/cli/|website = docs.docker.com|accessdate = 2015-09-15}}</ref> ==
- ENTRYPOINT
- Specifies which command will be triggered on the start of a container.
- ADD
- Copies files from a source to another destination and commits the results.
- RUN
- Executes a given command on the image and commits the results.
- FROM
- Specifies the base image to be used.
- MAINTAINER
- Specifies the name and email of the author of the given dockerfile.
- USER
- Specifies which user to use when running the image.
- ENV
- Used for setting environmental variables.
- VOLUME
- Creates a mountpoint for holding externally mounted containers.
- EXPOSE
- Specifies which ports will be exposed
Supporting Technologies
=Scheduling=
The concept of scheduling comes into the picture when there are multiple applications to be run across multiple hosts. A scheduler frees the user from the burden of figuring out on which host their application will run. The way scheduling works is that schedulers coordinate with the init system of the host to manage services and applications according to the available capacity and the availability of the various hosts which are a part of one cluster. Some of the popular schedulers available today include:
- Swarm: Docker Swarm{{cite web|title=Docker Swarm|url=https://docs.docker.com/swarm/|website=Docker Official Documentation}} is a native clustering tool for Docker which simplifies the deployment of multi container applications in a distributed environment. A cluster of Docker hosts is converted into a single virtual host. If a node in a cluster fails, all the containers running on the node will be scheduled on a different node belonging to the same cluster. There are three scheduling algorithms which help in deciding which containers will be run on which nodes; Random, Spread and BinPack.{{cite web|title=Scheduling Strategies|url=https://docs.docker.com/swarm/scheduler/strategy/|website=Docker Documentation|accessdate=15 September 2015}}
- Kubernetes: Kubernetes{{cite web|title=Kubernetes|url=http://kubernetes.io/v1.0/docs/whatisk8s.html|website=Kubernetes Official Documentation}} is a platform started by Google to manage container applications running on various nodes belonging to one cluster. It works in conjunction with Docker and takes charge of handling the orchestration of containers. It goes beyond the lifecycle management of containers and takes it to the next level of monitoring and managing the containers. Kubernetes is supported on Google Compute Engine, Rackspace, Microsoft Azure and vSphere environments.
- Docker Compose: Docker compose is Docker’s offering for running applications in a distributed environment spanning more than one container. Compose provides the user with commands to start or stop a service, view the status of a service and view the log output of running services. It is possible to accomplish all these tasks in the scope of a single host which makes Compose similar to Kubernetes. As Compose is produced by Docker itself, the commands are very similar to Docker's CLI commands with the difference that these commands apply to a cluster of containers rather than an individual container.{{cite web|title=Compose|url=https://docs.docker.com/compose/|website=Docker Official Documentation}}
=Cluster Management=
Cluster management, as the names suggests, is the process of monitoring how a collection of hosts behave when functioning in conjunction with one another. One of the most basic tasks carried out is the addition and removal of hosts from a cluster. Cluster management also involves starting and stopping of processes and gathering information about the current states of cluster containers and hosts. Some of the popular cluster management platforms include:
- Mesos: Apache Mesos is a cluster management platform which was developed by University of California, Berkley. Mesos is a distributed systems kernel that binds numerous different machines into one logical machine. It is possible to create one static computer cluster from a host of available physical resources. Mesos proves beneficial in the scenario when there are existing specialized workloads (Hadoop, Apache Kafka) because it provides an efficient framework to interleave these workloads. It provides scalability of a cluster to tens of thousands of nodes as well as providing support for Docker containers. {{cite web|title=Apache Mesos|url=http://mesos.apache.org/|website=Mesos.apache.org|accessdate=15 September 2015}}
- Bosh: Cloud Foundry Bosh is an open source packaging, lifecycle management and deployment tool. It supports quick cluster deployment mechanism with zero to minimal downtime. It is possible to install rolling updates on the nodes belonging to a cluster without affecting the data on each of those nodes.{{cite web|title=Cloud Foundry Bosh Documentation|url=https://bosh.cloudfoundry.org/docs/about.html|website=Bosh Official Documentation|accessdate=15 September 2015}}
Competition
Docker is no longer the only container virtualization solution in the market and there are a few alternatives that have launched in the domain which are as follows:
- Rocket: Rocket{{cite web|title=Rocket|url=https://coreos.com/blog/rocket/|website=coreos.com|accessdate=15 September 2015}} is a container virtualization technology developed by CoreOS. Rocket has been developed to enhance composability, security and speed in container technology.It is a container runtime tool in command line form consisting of two elements; Actool and Rkt. Actool takes care of the task of building containers while Rkt fetches and runs container images.
- LXC: LXC(Linux Containers) is a userspace interface for supporting lightweight virtualized operating system environments. It is a system container technology which can provide its users with a working environment which is similar to a virtual machine environment. LXC provides capabilities of managing containers, advanced networking and storage support{{cite web|title=Linux Containers|url=https://linuxcontainers.org/lxc/introduction/|website=linuscontainers.org|accessdate=15 September 2015}}
- LXD: The LXD project was founded and currently led by Canonical Ltd and Ubuntu. LXD was announced in early November 2014 and is still under development. It offers a command line tool to manage containers through REST API. It allows the users to create new containers and move around already running containers. It is an image based technology and does not support distribution templates.{{cite web|title=LXD|url=https://linuxcontainers.org/lxd/|website=Linux Containers|accessdate=15 September 2015}}
Vision and Scope
As the technology matures, Docker is expected to move toward having a stronger focus on orchestration, providing an integrated solution with both PaaS as well as SaaS capabilities. This growth in focus is highlighted by Docker's acquisition of four companies that offer services integral to Docker's ability to provide such a solution. In 2014, Docker purchased Orchard Laboratories{{cite web|title=Orchard Official Website|url=https://www.orchardup.com/|website=www.orchardup.com|accessdate=23 September 2015}} and Koality{{cite web|title=Koality Official Website|url=http://koalitycode.com/|website=koalitycode.com|accessdate=23 September 2015}}, quickly followed by the acquisition of Kitematic and SocketPlane{{cite web|title=Socketplane Official Website|url=http://socketplane.io/|website=socketplane.io|accessdate=23 September 2015}} in 2015. The addition of these four companies has provided docker with the technology and infrastructure needed to position itself as a leader in the market for an integrated solution offering container orchestration as well as platform services.
See also
References
{{Reflist|30em}}
External links
- {{Official website|https://www.docker.com}}
- [https://github.com/dotcloud/docker Source code repository]
- [http://www.slideshare.net/AaterSuleman/docker-at-flux7/ Multi-tenancy using Docker]
- [http://www.youtube.com/watch?v=VeiUjkiqo9E#t=60 Docker 101 Tutorial]
- [https://github.com/docker/libcontainer/ libcontainer git repo]
- [http://www.haifux.org/lectures/320/netLec8_final.pdf Linux Containers and the future cloud], by Rami Rosen
{{Virtualization|state=collapsed}}
:Category:Operating system technology
:Category:Operating system security