github.com/ruphin/docker@v1.10.1/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 ![](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 either on your computer for building applications or 147 on servers for running them. To get started, [check out the installation 148 instructions in the 149 documentation](https://docs.docker.com/engine/installation/). 150 151 We also offer an [interactive tutorial](https://www.docker.com/tryit/) 152 for quickly learning the basics of using Docker. 153 154 Usage examples 155 ============== 156 157 Docker can be used to run short-lived commands, long-running daemons 158 (app servers, databases, etc.), interactive shell sessions, etc. 159 160 You can find a [list of real-world 161 examples](https://docs.docker.com/engine/examples/) in the 162 documentation. 163 164 Under the hood 165 -------------- 166 167 Under the hood, Docker is built on the following components: 168 169 * The 170 [cgroups](https://www.kernel.org/doc/Documentation/cgroup-v1/cgroups.txt) 171 and 172 [namespaces](http://man7.org/linux/man-pages/man7/namespaces.7.html) 173 capabilities of the Linux kernel 174 * The [Go](https://golang.org) programming language 175 * The [Docker Image Specification](https://github.com/docker/docker/blob/master/image/spec/v1.md) 176 * The [Libcontainer Specification](https://github.com/opencontainers/runc/blob/master/libcontainer/SPEC.md) 177 178 Contributing to Docker [![GoDoc](https://godoc.org/github.com/docker/docker?status.svg)](https://godoc.org/github.com/docker/docker) 179 ====================== 180 181 | **Master** (Linux) | **Experimental** (linux) | **Windows** | **FreeBSD** | 182 |------------------|----------------------|---------|---------| 183 | [![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)/) | 184 185 Want to hack on Docker? Awesome! We have [instructions to help you get 186 started contributing code or documentation](https://docs.docker.com/opensource/project/who-written-for/). 187 188 These instructions are probably not perfect, please let us know if anything 189 feels wrong or incomplete. Better yet, submit a PR and improve them yourself. 190 191 Getting the development builds 192 ============================== 193 194 Want to run Docker from a master build? You can download 195 master builds at [master.dockerproject.org](https://master.dockerproject.org). 196 They are updated with each commit merged into the master branch. 197 198 Don't know how to use that super cool new feature in the master build? Check 199 out the master docs at 200 [docs.master.dockerproject.org](http://docs.master.dockerproject.org). 201 202 How the project is run 203 ====================== 204 205 Docker is a very, very active project. If you want to learn more about how it is run, 206 or want to get more involved, the best place to start is [the project directory](https://github.com/docker/docker/tree/master/project). 207 208 We are always open to suggestions on process improvements, and are always looking for more maintainers. 209 210 ### Talking to other Docker users and contributors 211 212 <table class="tg"> 213 <col width="45%"> 214 <col width="65%"> 215 <tr> 216 <td>Internet Relay Chat (IRC)</td> 217 <td> 218 <p> 219 IRC a direct line to our most knowledgeable Docker users; we have 220 both the <code>#docker</code> and <code>#docker-dev</code> group on 221 <strong>irc.freenode.net</strong>. 222 IRC is a rich chat protocol but it can overwhelm new users. You can search 223 <a href="https://botbot.me/freenode/docker/#" target="_blank">our chat archives</a>. 224 </p> 225 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. 226 </td> 227 </tr> 228 <tr> 229 <td>Google Groups</td> 230 <td> 231 There are two groups. 232 <a href="https://groups.google.com/forum/#!forum/docker-user" target="_blank">Docker-user</a> 233 is for people using Docker containers. 234 The <a href="https://groups.google.com/forum/#!forum/docker-dev" target="_blank">docker-dev</a> 235 group is for contributors and other people contributing to the Docker 236 project. 237 </td> 238 </tr> 239 <tr> 240 <td>Twitter</td> 241 <td> 242 You can follow <a href="https://twitter.com/docker/" target="_blank">Docker's Twitter feed</a> 243 to get updates on our products. You can also tweet us questions or just 244 share blogs or stories. 245 </td> 246 </tr> 247 <tr> 248 <td>Stack Overflow</td> 249 <td> 250 Stack Overflow has over 7000 Docker questions listed. We regularly 251 monitor <a href="https://stackoverflow.com/search?tab=newest&q=docker" target="_blank">Docker questions</a> 252 and so do many other knowledgeable Docker users. 253 </td> 254 </tr> 255 </table> 256 257 ### Legal 258 259 *Brought to you courtesy of our legal counsel. For more context, 260 please see the [NOTICE](https://github.com/docker/docker/blob/master/NOTICE) document in this repo.* 261 262 Use and transfer of Docker may be subject to certain restrictions by the 263 United States and other governments. 264 265 It is your responsibility to ensure that your use and/or transfer does not 266 violate applicable laws. 267 268 For more information, please see https://www.bis.doc.gov 269 270 271 Licensing 272 ========= 273 Docker is licensed under the Apache License, Version 2.0. See 274 [LICENSE](https://github.com/docker/docker/blob/master/LICENSE) for the full 275 license text. 276 277 Other Docker Related Projects 278 ============================= 279 There are a number of projects under development that are based on Docker's 280 core technology. These projects expand the tooling built around the 281 Docker platform to broaden its application and utility. 282 283 * [Docker Registry](https://github.com/docker/distribution): Registry 284 server for Docker (hosting/delivery of repositories and images) 285 * [Docker Machine](https://github.com/docker/machine): Machine management 286 for a container-centric world 287 * [Docker Swarm](https://github.com/docker/swarm): A Docker-native clustering 288 system 289 * [Docker Compose](https://github.com/docker/compose) (formerly Fig): 290 Define and run multi-container apps 291 * [Kitematic](https://github.com/docker/kitematic): The easiest way to use 292 Docker on Mac and Windows 293 294 If you know of another project underway that should be listed here, please help 295 us keep this list up-to-date by submitting a PR. 296 297 Awesome-Docker 298 ============== 299 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.