github.com/damirazo/docker@v1.9.0/README.md (about) 1 Docker: the container engine [![Release](https://img.shields.io/github/release/docker/docker.svg)](https://github.com/docker/docker/releases/latest) 2 ============================ 3 4 Docker is an open source project to pack, ship and run any application 5 as a lightweight container. 6 7 Docker containers are both *hardware-agnostic* and *platform-agnostic*. 8 This means they can run anywhere, from your laptop to the largest 9 cloud compute instance and everything in between - and they don't require 10 you to use a particular language, framework or packaging system. That 11 makes them great building blocks for deploying and scaling web apps, 12 databases, and backend services without depending on a particular stack 13 or provider. 14 15 Docker began as an open-source implementation of the deployment engine which 16 powers [dotCloud](https://www.dotcloud.com), a popular Platform-as-a-Service. 17 It benefits directly from the experience accumulated over several years 18 of large-scale operation and support of hundreds of thousands of 19 applications and databases. 20 21 ![Docker L](docs/static_files/docker-logo-compressed.png "Docker") 22 23 ## Security Disclosure 24 25 Security is very important to us. If you have any issue regarding security, 26 please disclose the information responsibly by sending an email to 27 security@docker.com and not by creating a github issue. 28 29 ## Better than VMs 30 31 A common method for distributing applications and sandboxing their 32 execution is to use virtual machines, or VMs. Typical VM formats are 33 VMware's vmdk, Oracle VirtualBox's vdi, and Amazon EC2's ami. In theory 34 these formats should allow every developer to automatically package 35 their application into a "machine" for easy distribution and deployment. 36 In practice, that almost never happens, for a few reasons: 37 38 * *Size*: VMs are very large which makes them impractical to store 39 and transfer. 40 * *Performance*: running VMs consumes significant CPU and memory, 41 which makes them impractical in many scenarios, for example local 42 development of multi-tier applications, and large-scale deployment 43 of cpu and memory-intensive applications on large numbers of 44 machines. 45 * *Portability*: competing VM environments don't play well with each 46 other. Although conversion tools do exist, they are limited and 47 add even more overhead. 48 * *Hardware-centric*: VMs were designed with machine operators in 49 mind, not software developers. As a result, they offer very 50 limited tooling for what developers need most: building, testing 51 and running their software. For example, VMs offer no facilities 52 for application versioning, monitoring, configuration, logging or 53 service discovery. 54 55 By contrast, Docker relies on a different sandboxing method known as 56 *containerization*. Unlike traditional virtualization, containerization 57 takes place at the kernel level. Most modern operating system kernels 58 now support the primitives necessary for containerization, including 59 Linux with [openvz](https://openvz.org), 60 [vserver](http://linux-vserver.org) and more recently 61 [lxc](https://linuxcontainers.org/), Solaris with 62 [zones](https://docs.oracle.com/cd/E26502_01/html/E29024/preface-1.html#scrolltoc), 63 and FreeBSD with 64 [Jails](https://www.freebsd.org/doc/handbook/jails.html). 65 66 Docker builds on top of these low-level primitives to offer developers a 67 portable format and runtime environment that solves all four problems. 68 Docker containers are small (and their transfer can be optimized with 69 layers), they have basically zero memory and cpu overhead, they are 70 completely portable, and are designed from the ground up with an 71 application-centric design. 72 73 Perhaps best of all, because Docker operates at the OS level, it can still be 74 run inside a VM! 75 76 ## Plays well with others 77 78 Docker does not require you to buy into a particular programming 79 language, framework, packaging system, or configuration language. 80 81 Is your application a Unix process? Does it use files, tcp connections, 82 environment variables, standard Unix streams and command-line arguments 83 as inputs and outputs? Then Docker can run it. 84 85 Can your application's build be expressed as a sequence of such 86 commands? Then Docker can build it. 87 88 ## Escape dependency hell 89 90 A common problem for developers is the difficulty of managing all 91 their application's dependencies in a simple and automated way. 92 93 This is usually difficult for several reasons: 94 95 * *Cross-platform dependencies*. Modern applications often depend on 96 a combination of system libraries and binaries, language-specific 97 packages, framework-specific modules, internal components 98 developed for another project, etc. These dependencies live in 99 different "worlds" and require different tools - these tools 100 typically don't work well with each other, requiring awkward 101 custom integrations. 102 103 * *Conflicting dependencies*. Different applications may depend on 104 different versions of the same dependency. Packaging tools handle 105 these situations with various degrees of ease - but they all 106 handle them in different and incompatible ways, which again forces 107 the developer to do extra work. 108 109 * *Custom dependencies*. A developer may need to prepare a custom 110 version of their application's dependency. Some packaging systems 111 can handle custom versions of a dependency, others can't - and all 112 of them handle it differently. 113 114 115 Docker solves the problem of dependency hell by giving the developer a simple 116 way to express *all* their application's dependencies in one place, while 117 streamlining the process of assembling them. If this makes you think of 118 [XKCD 927](https://xkcd.com/927/), don't worry. Docker doesn't 119 *replace* your favorite packaging systems. It simply orchestrates 120 their use in a simple and repeatable way. How does it do that? With 121 layers. 122 123 Docker defines a build as running a sequence of Unix commands, one 124 after the other, in the same container. Build commands modify the 125 contents of the container (usually by installing new files on the 126 filesystem), the next command modifies it some more, etc. Since each 127 build command inherits the result of the previous commands, the 128 *order* in which the commands are executed expresses *dependencies*. 129 130 Here's a typical Docker build process: 131 132 ```bash 133 FROM ubuntu:12.04 134 RUN apt-get update && apt-get install -y python python-pip curl 135 RUN curl -sSL https://github.com/shykes/helloflask/archive/master.tar.gz | tar -xzv 136 RUN cd helloflask-master && pip install -r requirements.txt 137 ``` 138 139 Note that Docker doesn't care *how* dependencies are built - as long 140 as they can be built by running a Unix command in a container. 141 142 143 Getting started 144 =============== 145 146 Docker can be installed on your local machine as well as servers - both 147 bare metal and virtualized. It is available as a binary on most modern 148 Linux systems, or as a VM on Windows, Mac and other systems. 149 150 We also offer an [interactive tutorial](https://www.docker.com/tryit/) 151 for quickly learning the basics of using Docker. 152 153 For up-to-date install instructions, see the [Docs](https://docs.docker.com). 154 155 Usage examples 156 ============== 157 158 Docker can be used to run short-lived commands, long-running daemons 159 (app servers, databases, etc.), interactive shell sessions, etc. 160 161 You can find a [list of real-world 162 examples](https://docs.docker.com/examples/) in the 163 documentation. 164 165 Under the hood 166 -------------- 167 168 Under the hood, Docker is built on the following components: 169 170 * The 171 [cgroups](https://www.kernel.org/doc/Documentation/cgroups/cgroups.txt) 172 and 173 [namespaces](http://man7.org/linux/man-pages/man7/namespaces.7.html) 174 capabilities of the Linux kernel 175 * The [Go](https://golang.org) programming language 176 * The [Docker Image Specification](https://github.com/docker/docker/blob/master/image/spec/v1.md) 177 * The [Libcontainer Specification](https://github.com/opencontainers/runc/blob/master/libcontainer/SPEC.md) 178 179 Contributing to Docker [![GoDoc](https://godoc.org/github.com/docker/docker?status.svg)](https://godoc.org/github.com/docker/docker) 180 ====================== 181 182 | **Master** (Linux) | **Experimental** (linux) | **Windows** | **FreeBSD** | 183 |------------------|----------------------|---------|---------| 184 | [![Jenkins Build Status](https://jenkins.dockerproject.org/view/Docker/job/Docker%20Master/badge/icon)](https://jenkins.dockerproject.org/view/Docker/job/Docker%20Master/) | [![Jenkins Build Status](https://jenkins.dockerproject.org/view/Docker/job/Docker%20Master%20%28experimental%29/badge/icon)](https://jenkins.dockerproject.org/view/Docker/job/Docker%20Master%20%28experimental%29/) | [![Build Status](http://jenkins.dockerproject.org/job/Docker%20Master%20(windows)/badge/icon)](http://jenkins.dockerproject.org/job/Docker%20Master%20(windows)/) | [![Build Status](http://jenkins.dockerproject.org/job/Docker%20Master%20(freebsd)/badge/icon)](http://jenkins.dockerproject.org/job/Docker%20Master%20(freebsd)/) | 185 186 Want to hack on Docker? Awesome! We have [instructions to help you get 187 started contributing code or documentation](https://docs.docker.com/project/who-written-for/). 188 189 These instructions are probably not perfect, please let us know if anything 190 feels wrong or incomplete. Better yet, submit a PR and improve them yourself. 191 192 Getting the development builds 193 ============================== 194 195 Want to run Docker from a master build? You can download 196 master builds at [master.dockerproject.org](https://master.dockerproject.org). 197 They are updated with each commit merged into the master branch. 198 199 Don't know how to use that super cool new feature in the master build? Check 200 out the master docs at 201 [docs.master.dockerproject.org](http://docs.master.dockerproject.org). 202 203 How the project is run 204 ====================== 205 206 Docker is a very, very active project. If you want to learn more about how it is run, 207 or want to get more involved, the best place to start is [the project directory](https://github.com/docker/docker/tree/master/project). 208 209 We are always open to suggestions on process improvements, and are always looking for more maintainers. 210 211 ### Talking to other Docker users and contributors 212 213 <table class="tg"> 214 <col width="45%"> 215 <col width="65%"> 216 <tr> 217 <td>Internet Relay Chat (IRC)</td> 218 <td> 219 <p> 220 IRC a direct line to our most knowledgeable Docker users; we have 221 both the <code>#docker</code> and <code>#docker-dev</code> group on 222 <strong>irc.freenode.net</strong>. 223 IRC is a rich chat protocol but it can overwhelm new users. You can search 224 <a href="https://botbot.me/freenode/docker/#" target="_blank">our chat archives</a>. 225 </p> 226 Read our <a href="https://docs.docker.com/project/get-help/#irc-quickstart" target="_blank">IRC quickstart guide</a> for an easy way to get started. 227 </td> 228 </tr> 229 <tr> 230 <td>Google Groups</td> 231 <td> 232 There are two groups. 233 <a href="https://groups.google.com/forum/#!forum/docker-user" target="_blank">Docker-user</a> 234 is for people using Docker containers. 235 The <a href="https://groups.google.com/forum/#!forum/docker-dev" target="_blank">docker-dev</a> 236 group is for contributors and other people contributing to the Docker 237 project. 238 </td> 239 </tr> 240 <tr> 241 <td>Twitter</td> 242 <td> 243 You can follow <a href="https://twitter.com/docker/" target="_blank">Docker's Twitter feed</a> 244 to get updates on our products. You can also tweet us questions or just 245 share blogs or stories. 246 </td> 247 </tr> 248 <tr> 249 <td>Stack Overflow</td> 250 <td> 251 Stack Overflow has over 7000 Docker questions listed. We regularly 252 monitor <a href="https://stackoverflow.com/search?tab=newest&q=docker" target="_blank">Docker questions</a> 253 and so do many other knowledgeable Docker users. 254 </td> 255 </tr> 256 </table> 257 258 ### Legal 259 260 *Brought to you courtesy of our legal counsel. For more context, 261 please see the [NOTICE](https://github.com/docker/docker/blob/master/NOTICE) document in this repo.* 262 263 Use and transfer of Docker may be subject to certain restrictions by the 264 United States and other governments. 265 266 It is your responsibility to ensure that your use and/or transfer does not 267 violate applicable laws. 268 269 For more information, please see https://www.bis.doc.gov 270 271 272 Licensing 273 ========= 274 Docker is licensed under the Apache License, Version 2.0. See 275 [LICENSE](https://github.com/docker/docker/blob/master/LICENSE) for the full 276 license text. 277 278 Other Docker Related Projects 279 ============================= 280 There are a number of projects under development that are based on Docker's 281 core technology. These projects expand the tooling built around the 282 Docker platform to broaden its application and utility. 283 284 * [Docker Registry](https://github.com/docker/distribution): Registry 285 server for Docker (hosting/delivery of repositories and images) 286 * [Docker Machine](https://github.com/docker/machine): Machine management 287 for a container-centric world 288 * [Docker Swarm](https://github.com/docker/swarm): A Docker-native clustering 289 system 290 * [Docker Compose](https://github.com/docker/compose) (formerly Fig): 291 Define and run multi-container apps 292 * [Kitematic](https://github.com/kitematic/kitematic): The easiest way to use 293 Docker on Mac and Windows 294 295 If you know of another project underway that should be listed here, please help 296 us keep this list up-to-date by submitting a PR. 297 298 Awesome-Docker 299 ============== 300 You can find more projects, tools and articles related to Docker on the [awesome-docker list](https://github.com/veggiemonk/awesome-docker). Add your project there.