Browse code

Rewrite of the Introduction documentation

1. Re-aligns the introduction with the new product positioning.
2. Cleanup of some issues with language and formatting.
3. Makes the introduction leaner and meaner.
4. Responds to feedback from product.

Docker-DCO-1.1-Signed-off-by: James Turnbull <james@lovedthanlost.net> (github: jamtur01)

James Turnbull authored on 2014/05/19 01:52:41
Showing 6 changed files
... ...
@@ -28,9 +28,7 @@ pages:
28 28
 - ['index.md', 'About', 'Docker']
29 29
 - ['introduction/index.md', '**HIDDEN**']
30 30
 - ['introduction/understanding-docker.md', 'About', 'Understanding Docker']
31
-- ['introduction/technology.md', 'About', 'The Technology']
32 31
 - ['introduction/working-with-docker.md', 'About', 'Working with Docker']
33
-- ['introduction/get-docker.md', 'About', 'Get Docker']
34 32
 
35 33
 # Installation:
36 34
 - ['installation/index.md', '**HIDDEN**']
... ...
@@ -1,82 +1,99 @@
1 1
 page_title: About Docker
2
-page_description: Docker introduction home page
2
+page_description: Introduction to Docker.
3 3
 page_keywords: docker, introduction, documentation, about, technology, understanding, Dockerfile
4 4
 
5 5
 # About Docker
6 6
 
7
-*Secure And Portable Containers Made Easy*
7
+**Develop, Ship and Run Any Application, Anywhere**
8 8
 
9 9
 ## Introduction
10 10
 
11
-[**Docker**](https://www.docker.io) is a container based virtualization
12
-framework. Unlike traditional virtualization Docker is fast, lightweight
13
-and easy to use. Docker allows you to create containers holding
14
-all the dependencies for an application. Each container is kept isolated
15
-from any other, and nothing gets shared.
16
-
17
-## Docker highlights
18
-
19
- - **Containers provide sand-boxing:**  
20
-   Applications run securely without outside access.
21
- - **Docker allows simple portability:**  
22
-   Containers are directories, they can be zipped and transported.
23
- - **It all works fast:**  
24
-   Starting a container is a very fast single process.
25
- - **Docker is easy on the system resources (unlike VMs):**  
26
-   No more than what each application needs.
27
- - **Agnostic in its _essence_:**  
28
-   Free of framework, language or platform dependencies.
29
-
30
-And most importantly:
31
-
32
- - **Docker reduces complexity:**  
33
-   Docker accepts commands *in plain English*, e.g. `docker run [..]`.
11
+[**Docker**](https://www.docker.io) is a platform for developers and
12
+sysadmins to develop, ship, and run applications.  Docker consists of:
13
+
14
+* The Docker Engine - our lightweight and powerful open source container
15
+  virtualization technology combined with a work flow to help you build
16
+  and containerize your applications.
17
+* [Docker.io](https://index.docker.io) - our SAAS service that helps you
18
+  share and manage your applications stacks.
19
+
20
+Docker enables applications to be quickly assembled from components and
21
+eliminates the friction when shipping code. We want to help you get code
22
+from your desktop, tested and deployed into production as fast as
23
+possible.
24
+
25
+## Why Docker?
26
+
27
+- **Faster delivery of your applications**  
28
+    * We want to help your environment work better. Docker containers,
29
+      and the work flow that comes with them, helps your developers,
30
+      sysadmins, QA folks, and release engineers all work together to get code
31
+      into production and doing something useful. We've created a standard
32
+      container format that allows developers to care about their applications
33
+      inside containers and sysadmins and operators to care about running the
34
+      container. This creates a separation of duties that makes managing and
35
+      deploying code much easier and much more streamlined.
36
+    * We make it easy to build new containers and expose how each rapid
37
+      iterations and updates as well as visibility of changes.
38
+      container is built. This helps everyone in your organization understand
39
+      how an application works and how it is built.
40
+    * Docker containers are lightweight and fast! Containers have
41
+      sub-second launch times! With containers you can reduce the cycle
42
+      time in development, testing and deployment.
43
+
44
+- **Deploy and scale more easily**  
45
+    * Docker containers run (almost!) everywhere. You can deploy your
46
+      containers on desktops, physical servers, virtual machines, into
47
+      data centers and to public and private cloud.
48
+    * As Docker runs on so many platforms it makes it easy to move your
49
+      appications around. You can easily move an application from a
50
+      testing environment into the cloud and back whenever you need.
51
+    * The lightweight containers Docker creates also making scaling and
52
+      down really fast and easy. If you need more containers you can
53
+      quickly launch them and then shut them down when you don't need them
54
+      anymore.
55
+
56
+- **Get higher density and run more workloads**  
57
+    * Docker containers don't need a hypervisor so you can pack more of
58
+      them onto your hosts. This means you get more value out of every
59
+      server and can potentially reduce the money you spend on equipment and
60
+      licenses!
61
+
62
+- **Faster deployment makes for easier management**  
63
+    * As Docker speeds up your work flow it makes it easier to make lots
64
+      of little changes instead of huge, big bang updates. Smaller
65
+      changes mean smaller risks and mean more uptime!
34 66
 
35 67
 ## About this guide
36 68
 
37
-In this introduction we will take you on a tour and show you what
38
-makes Docker tick.
39
-
40
-On the [**first page**](introduction/understanding-docker.md), which is
41
-**_informative_**:
42
-
43
- - You will find information on Docker;
44
- - And discover Docker's features.
45
- - We will also compare Docker to virtual machines;
46
- - And see some common use cases.
47
-
48
-> [Click here to go to Understanding Docker](introduction/understanding-docker.md).
49
-
50
-The [**second page**](introduction/technology.md) has **_technical_** information on:
69
+First we'll show you [what makes Docker tick in our Understanding Docker
70
+section](introduction/understanding-docker.md):
51 71
 
72
+ - You will find see how Docker works at a high level;
52 73
  - The architecture of Docker;
53
- - The underlying technology, and;
54
- - *How* Docker works.
55
-
56
-> [Click here to go to Understanding the Technology](introduction/technology.md).
57
-
58
-On the [**third page**](introduction/working-with-docker.md) we get **_practical_**.
59
-There you can:
74
+ - Discover Docker's features;
75
+ - See how Docker compares to virtual machines;
76
+ - And see some common use cases.
60 77
 
61
- - Learn about Docker's components (i.e. Containers, Images and the
62
-   Dockerfile);
63
- - And get started working with them straight away.
78
+> [Click here to go to the Understanding
79
+> Docker section](introduction/understanding-docker.md).
64 80
 
65
-> [Click here to go to Working with Docker](introduction/working-with-docker.md).
81
+Next we get [**practical** with the Working with Docker
82
+section](introduction/working-with-docker.md) and you can learn about:
66 83
 
67
-Finally, on the [**fourth**](introduction/get-docker.md) page, we go **_hands on_**
68
-and see:
84
+ - Docker on the command line;
85
+ - Get introduced to your first Docker commands;
86
+ - Get to know your way around the basics of Docker operation.
69 87
 
70
- - The installation instructions, and;
71
- - How Docker makes some hard problems much, much easier.
88
+> [Click here to go to the Working with
89
+> Docker section](introduction/working-with-docker.md).
72 90
 
73
-> [Click here to go to Get Docker](introduction/get-docker.md).
91
+If you want to see how to install Docker you can jump to the
92
+[installation](/installation/#installation) section.
74 93
 
75 94
 > **Note**:
76
-> We know how valuable your time is. Therefore, the documentation is prepared
77
-> in a way to allow anyone to start from any section need. Although we strongly
78
-> recommend that you visit [Understanding Docker](
79
-> introduction/understanding-docker.md) to see how Docker is different, if you
80
-> already have some knowledge and want to quickly get started with Docker,
81
-> don't hesitate to jump to [Working with Docker](
82
-> introduction/working-with-docker.md).
95
+> We know how valuable your time is so you if you want to get started
96
+> with Docker straight away don't hesitate to jump to [Working with
97
+> Docker](introduction/working-with-docker.md). For a fuller
98
+> understanding of Docker though we do recommend you read [Understanding
99
+> Docker]( introduction/understanding-docker.md).
83 100
deleted file mode 100644
... ...
@@ -1,77 +0,0 @@
1
-page_title: Getting Docker
2
-page_description: Getting Docker and installation tutorials
3
-page_keywords: docker, introduction, documentation, about, technology, understanding, Dockerfile
4
-
5
-# Getting Docker
6
-
7
-*How to install Docker?*
8
-
9
-## Introductions
10
-
11
-Once you are comfortable with your level of knowledge of Docker, and
12
-feel like actually trying the product, you can download and start using
13
-it by following the links listed below. There, you will find
14
-installation instructions, specifically tailored for your platform of choice.
15
-
16
-## Installation Instructions
17
-
18
-### Linux (Native)
19
-
20
- - **Arch Linux:**  
21
- [Installation on Arch Linux](../installation/archlinux.md)
22
- - **Fedora:**  
23
- [Installation on Fedora](../installation/fedora.md)
24
- - **FrugalWare:**  
25
- [Installation on FrugalWare](../installation/frugalware.md)
26
- - **Gentoo:**  
27
- [Installation on Gentoo](../installation/gentoolinux.md)
28
- - **Red Hat Enterprise Linux:**
29
- [Installation on Red Hat Enterprise Linux](../installation/rhel.md)
30
- - **Ubuntu:**  
31
- [Installation on Ubuntu](../installation/ubuntulinux.md)
32
- - **openSUSE:**  
33
- [Installation on openSUSE](../installation/openSUSE.md)
34
-
35
-### Mac OS X (Using Boot2Docker)
36
-
37
-In order to work, Docker makes use of some Linux Kernel features which
38
-are not supported by Mac OS X. To run Docker on OS X we install and run
39
-a lightweight virtual machine and run Docker on that.
40
-
41
- - **Mac OS X :**  
42
- [Installation on Mac OS X](../installation/mac.md)
43
-
44
-### Windows (Using Boot2Docker)
45
-
46
-Docker can also run on Windows using a virtual machine. You then run
47
-Linux and Docker inside that virtual machine.
48
-
49
- - **Windows:**  
50
- [Installation on Windows](../installation/windows.md)
51
-
52
-### Infrastructure-as-a-Service
53
-
54
- - **Amazon EC2:**  
55
- [Installation on Amazon EC2](../installation/amazon.md)
56
- - **Google Cloud Platform:**  
57
- [Installation on Google Cloud Platform](../installation/google.md)
58
- - **Rackspace Cloud:**  
59
- [Installation on Rackspace Cloud](../installation/rackspace.md)
60
-
61
-## Where to go from here
62
-
63
-### Understanding Docker
64
-
65
-Visit [Understanding Docker](understanding-docker.md) in our Getting Started manual.
66
-
67
-### Learn about parts of Docker and the underlying technology
68
-
69
-Visit [Understanding the Technology](technology.md) in our Getting Started manual.
70
-
71
-### Get practical and learn how to use Docker straight away
72
-
73
-Visit [Working with Docker](working-with-docker.md) in our Getting Started manual.
74
-
75
-### Get the whole story
76
-
77
-[https://www.docker.io/the_whole_story/](https://www.docker.io/the_whole_story/)
78 1
deleted file mode 100644
... ...
@@ -1,268 +0,0 @@
1
-page_title: Understanding the Technology
2
-page_description: Technology of Docker explained in depth
3
-page_keywords: docker, introduction, documentation, about, technology, understanding, Dockerfile
4
-
5
-# Understanding the Technology
6
-
7
-*What is the architecture of Docker? What is its underlying technology?*
8
-
9
-## Introduction
10
-
11
-When it comes to understanding Docker and its underlying technology
12
-there is no *magic* involved. Everything is based on tried and tested
13
-features of the *Linux kernel*. Docker either makes use of those
14
-features directly or builds upon them to provide new functionality.
15
-
16
-Aside from the technology, one of the major factors that make Docker
17
-great is the way it is built. The project's core is very lightweight and
18
-as much of Docker as possible is designed to be pluggable. Docker is
19
-also built with integration in mind and has a fully featured API that
20
-allows you to access all of the power of Docker from inside your own
21
-applications.
22
-
23
-## The Architecture of Docker
24
-
25
-Docker is designed for developers and sysadmins. It's built to help you
26
-build applications and services and then deploy them quickly and
27
-efficiently: from development to production.
28
-
29
-Let's take a look.
30
-
31
-
32
-![Docker Architecture Diagram](/article-img/architecture.svg)
33
-
34
-## The components of Docker
35
-
36
-Docker's main components are:
37
-
38
- - Docker *daemon*;
39
- - Docker *client*, and;
40
- - [Docker.io](https://index.docker.io) registry.
41
-
42
-### The Docker daemon
43
-
44
-As shown on the diagram above, the Docker daemon runs on a host machine.
45
-The user does not directly interact with the daemon, but instead through
46
-an intermediary: the Docker client.
47
-
48
-### Docker client
49
-
50
-The Docker client is the primary user interface to Docker. It is tasked
51
-with accepting commands from the user and communicating back and forth
52
-with a Docker daemon to manage the container lifecycle on any host.
53
-
54
-### Docker.io registry
55
-
56
-[Docker.io](https://index.docker.io) is the global archive (and
57
-directory) of user supplied Docker container images. It currently hosts
58
-a large – in fact, rapidly growing – number of projects where you
59
-can find almost any popular application or deployment stack readily
60
-available to download and run with a single command.
61
-
62
-As a social community project, Docker tries to provide all necessary
63
-tools for everyone to grow with other *Dockers*. By issuing a single
64
-command through the Docker client you can start sharing your own
65
-creations with the rest of the world.
66
-
67
-However, knowing that not everything can be shared the [Docker.io](
68
-https://index.docker.io) also offers private repositories. In order to see
69
-the available plans, you can click [here](https://index.docker.io/plans).
70
-
71
-Using [*docker-registry*](https://github.com/dotcloud/docker-registry), it is
72
-also possible to run your own private Docker image registry service on your own
73
-servers.
74
-
75
-> **Note:** To learn more about the [*Docker.io*](http://index.docker.io)
76
-> registry (for public *and* private repositories), check out the [Registry &
77
-> Index Spec](http://docs.docker.io/api/registry_index_spec/).
78
-
79
-### Summary
80
-
81
- - **When you install Docker, you get all the components:**  
82
- The daemon, the client and access to the [Docker.io](http://index.docker.io) registry.
83
- - **You can run these components together or distributed:**  
84
- Servers with the Docker daemon running, controlled by the Docker client.
85
- - **You can benefit form the public registry:**  
86
- Download and build upon images created by the community.
87
- - **You can start a private repository for proprietary use.**  
88
- Sign up for a [plan](https://index.docker.io/plans) or host your own [docker-registry](
89
-https://github.com/dotcloud/docker-registry).
90
-
91
-## Elements of Docker
92
-
93
-The basic elements of Docker are:
94
-
95
- - **Containers, which allow:**  
96
- The run portion of Docker. Your applications run inside of containers.
97
- - **Images, which provide:**  
98
- The build portion of Docker. Your containers are built from images.
99
- - **The Dockerfile, which automates:**  
100
- A file that contains simple instructions that build Docker images.
101
-
102
-To get practical and learn what they are, and **_how to work_** with
103
-them, continue to [Working with Docker](working-with-docker.md). If you would like to
104
-understand **_how they work_**, stay here and continue reading.
105
-
106
-## The underlying technology
107
-
108
-The power of Docker comes from the underlying technology it is built
109
-from. A series of operating system features are carefully glued together
110
-to provide Docker's features and provide an easy to use interface to
111
-those features. In this section, we will see the main operating system
112
-features that Docker uses to make easy containerization happen.
113
-
114
-### Namespaces
115
-
116
-Docker takes advantage of a technology called `namespaces` to provide
117
-an isolated workspace we call a *container*.  When you run a container,
118
-Docker creates a set of *namespaces* for that container.
119
-
120
-This provides a layer of isolation: each process runs in its own
121
-namespace and does not have access outside it.
122
-
123
-Some of the namespaces Docker uses are:
124
-
125
- - **The `pid` namespace:**  
126
- Used for process numbering (PID: Process ID)
127
- - **The `net` namespace:**  
128
- Used for managing network interfaces (NET: Networking)
129
- - **The `ipc` namespace:**  
130
- Used for managing access to IPC resources (IPC: InterProcess Communication)
131
- - **The `mnt` namespace:**  
132
- Used for managing mount-points (MNT: Mount)
133
- - **The `uts` namespace:**  
134
- Used for isolating kernel / version identifiers. (UTS: Unix Timesharing System)
135
-
136
-### Control groups
137
-
138
-Docker also makes use of another technology called `cgroups` or control
139
-groups. A key need to run applications in isolation is to have them
140
-contained, not just in terms of related filesystem and/or dependencies,
141
-but also, resources. Control groups allow Docker to fairly
142
-share available hardware resources to containers and if asked, set up to
143
-limits and constraints, for example limiting the memory to a maximum of 128
144
-MBs.
145
-
146
-### UnionFS
147
-
148
-UnionFS or union filesystems are filesystems that operate by creating
149
-layers, making them very lightweight and fast. Docker uses union
150
-filesystems to provide the building blocks for containers. We'll see
151
-more about this below.
152
-
153
-### Containers
154
-
155
-Docker combines these components to build a container format we call
156
-`libcontainer`. Docker also supports traditional Linux containers like
157
-[LXC](https://linuxcontainers.org/) which also make use of these
158
-components.
159
-
160
-## How does everything work
161
-
162
-A lot happens when Docker creates a container.
163
-
164
-Let's see how it works!
165
-
166
-### How does a container work?
167
-
168
-A container consists of an operating system, user added files and
169
-meta-data. Each container is built from an image. That image tells
170
-Docker what the container holds, what process to run when the container
171
-is launched and a variety of other configuration data. The Docker image
172
-is read-only. When Docker runs a container from an image it adds a
173
-read-write layer on top of the image (using the UnionFS technology we
174
-saw earlier) to run inside the container.
175
-
176
-### What happens when you run a container?
177
-
178
-The Docker client (or the API!) tells the Docker daemon to run a
179
-container. Let's take a look at a simple `Hello world` example.
180
-
181
-    $ docker run -i -t ubuntu /bin/bash
182
-
183
-Let's break down this command. The Docker client is launched using the
184
-`docker` binary. The bare minimum the Docker client needs to tell the
185
-Docker daemon is:
186
-
187
-* What Docker image to build the container from;
188
-* The command you want to run inside the container when it is launched.
189
-
190
-So what happens under the covers when we run this command?
191
-
192
-Docker begins with:
193
-
194
- - **Pulling the `ubuntu` image:**  
195
- Docker checks for the presence of the `ubuntu` image and if it doesn't
196
- exist locally on the host, then Docker downloads it from [Docker.io](https://index.docker.io)
197
- - **Creates a new container:**  
198
- Once Docker has the image it creates a container from it.
199
- - **Allocates a filesystem and mounts a read-write _layer_:**  
200
- The container is created in the filesystem and a read-write layer is added to the image.
201
- - **Allocates a network / bridge interface:**  
202
- Creates a network interface that allows the Docker container to talk to the local host.
203
- - **Sets up an IP address:**  
204
- Intelligently finds and attaches an available IP address from a pool.
205
- - **Executes _a_ process that you specify:**  
206
- Runs your application, and;
207
- - **Captures and provides application output:**  
208
- Connects and logs standard input, outputs and errors for you to see how your application is running.
209
-
210
-### How does a Docker Image work?
211
-
212
-We've already seen that Docker images are read-only templates that
213
-Docker containers are launched from. When you launch that container it
214
-creates a read-write layer on top of that image that your application is
215
-run in.
216
-
217
-Docker images are built using a simple descriptive set of steps we
218
-call *instructions*. Instructions are stored in a file called a
219
-`Dockerfile`. Each instruction writes a new layer to an image using the
220
-UnionFS technology we saw earlier.
221
-
222
-Every image starts from a base image, for example `ubuntu` a base Ubuntu
223
-image or `fedora` a base Fedora image. Docker builds and provides these
224
-base images via [Docker.io](http://index.docker.io).
225
-
226
-### How does a Docker registry work?
227
-
228
-The Docker registry is a store for your Docker images. Once you build a
229
-Docker image you can *push* it to a public or private repository on [Docker.io](
230
-http://index.docker.io) or to your own registry running behind your firewall.
231
-
232
-Using the Docker client, you can search for already published images and
233
-then pull them down to your Docker host to build containers from them
234
-(or even build on these images).
235
-
236
-[Docker.io](http://index.docker.io) provides both public and
237
-private storage for images. Public storage is searchable and can be
238
-downloaded by anyone. Private repositories are excluded from search
239
-results and only you and your users can pull them down and use them to
240
-build containers. You can [sign up for a plan here](https://index.docker.io/plans).
241
-
242
-To learn more, check out the [Working with Repositories](
243
-http://docs.docker.io/use/workingwithrepository) section from the
244
-[Docker documentation](http://docs.docker.io).
245
-
246
-## Where to go from here
247
-
248
-### Understanding Docker
249
-
250
-Visit [Understanding Docker](understanding-docker.md) in our Getting Started manual.
251
-
252
-### Get practical and learn how to use Docker straight away
253
-
254
-Visit [Working with Docker](working-with-docker.md) in our Getting Started manual.
255
-
256
-### Get the product and go hands-on
257
-
258
-Visit [Get Docker](get-docker.md) in our Getting Started manual.
259
-
260
-### Get the whole story
261
-
262
-[https://www.docker.io/the_whole_story/](https://www.docker.io/the_whole_story/)
... ...
@@ -1,272 +1,331 @@
1 1
 page_title: Understanding Docker
2 2
 page_description: Docker explained in depth
3
-page_keywords: docker, introduction, documentation, about, technology, understanding, Dockerfile
3
+page_keywords: docker, introduction, documentation, about, technology, understanding
4 4
 
5 5
 # Understanding Docker
6 6
 
7
-*What is Docker? What makes it great?*
7
+**What is Docker?**
8 8
 
9
-Building development lifecycles, pipelines and deployment tooling is
10
-hard. It's not easy to create portable applications and services.
11
-There's often high friction getting code from your development
12
-environment to production. It's also hard to ensure those applications
13
-and services are consistent, up-to-date and managed.
9
+Docker is a platform for developing, shipping, and running applications.
10
+Docker is designed to deliver your applications faster.  With Docker you
11
+can separate your applications from your infrastructure AND treat your
12
+infrastructure like a managed application. We want to help you ship code
13
+faster, test faster, deploy faster and shorten the cycle between writing
14
+code and running code.
14 15
 
15
-Docker is designed to solve these problem for both developers and
16
-sysadmins. It is a lightweight framework (with a powerful API) that
17
-provides a lifecycle for building and deploying applications into
18
-containers.
16
+Docker does this by combining a lightweight container virtualization
17
+platform with workflow and tooling that helps you manage and deploy your
18
+applications.
19 19
 
20
-Docker provides a way to run almost any application securely isolated
21
-into a container. The isolation and security allows you to run many
22
-containers simultaneously on your host. The lightweight nature of
20
+At its core Docker provides a way to run almost any application securely
21
+isolated into a container. The isolation and security allows you to run
22
+many containers simultaneously on your host. The lightweight nature of
23 23
 containers, which run without the extra overload of a hypervisor, means
24 24
 you can get more out of your hardware.
25 25
 
26
-**Note:** Docker itself is *shipped* with the Apache 2.0 license and it
27
-is completely open-source — *the pun? very much intended*.
26
+Surrounding the container virtualization, we provide tooling and a
27
+platform to help you get your applications (and its supporting
28
+components) into Docker containers, to distribute and ship those
29
+containers to your teams to develop and test on them and then to deploy
30
+those applications to your production environment whether it be in a
31
+local data center or the Cloud.
28 32
 
29
-### What are the Docker basics I need to know?
33
+## What can I use Docker for?
30 34
 
31
-Docker has three major components:
35
+* Faster delivery of your applications
32 36
 
33
-* Docker containers.
34
-* Docker images.
35
-* Docker registries.
36
-
37
-#### Docker containers
38
-
39
-Docker containers are like a directory. A Docker container holds
40
-everything that is needed for an application to run. Each container is
41
-created from a Docker image. Docker containers can be run, started,
42
-stopped, moved and deleted. Each container is an isolated and secure
43
-application platform. You can consider Docker containers the *run*
44
-portion of the Docker framework.
45
-
46
-#### Docker images
47
-
48
-The Docker image is a template, for example an Ubuntu
49
-operating system with Apache and your web application installed. Docker
50
-containers are launched from images. Docker provides a simple way to
51
-build new images or update existing images. You can consider Docker
52
-images to be the *build* portion of the Docker framework.
53
-
54
-#### Docker Registries
55
-
56
-Docker registries hold images. These are public (or private!) stores
57
-that you can upload or download images to and from. These images can be
58
-images you create yourself or you can make use of images that others
59
-have previously created. Docker registries allow you to build simple and
60
-powerful development and deployment work flows. You can consider Docker
61
-registries the *share* portion of the Docker framework.
62
-
63
-### How does Docker work?
64
-
65
-Docker is a client-server framework. The Docker *client* commands the Docker
66
-*daemon*, which in turn creates, builds and manages containers.
67
-
68
-The Docker daemon takes advantage of some neat Linux kernel and
69
-operating system features, like `namespaces` and `cgroups`, to build
70
-isolated container. Docker provides a simple abstraction layer to these
71
-technologies.
72
-
73
-> **Note:** If you would like to learn more about the underlying technology,
74
-> why not jump to [Understanding the Technology](technology.md) where we talk about them? You can
75
-> always come back here to continue learning about features of Docker and what
76
-> makes it different.
77
-
78
-## Features of Docker
79
-
80
-In order to get a good grasp of the capabilities of Docker you should
81
-read the [User's Manual](http://docs.docker.io). Let's look at a summary
82
-of Docker's features to give you an idea of how Docker might be useful
83
-to you.
84
-
85
-### User centric and simple to use
86
-
87
-*Docker is made for humans.*
88
-
89
-It's easy to get started and easy to build and deploy applications with
90
-Docker: or as we say "*dockerize*" them! As much of Docker as possible
91
-uses plain English for commands and tries to be as lightweight and
92
-transparent as possible. We want to get out of the way so you can build
93
-and deploy your applications.
94
-
95
-### Docker is Portable
96
-
97
-*Dockerize And Go!*
98
-
99
-Docker containers are highly portable. Docker provides a standard
100
-container format to hold your applications:
101
-
102
-* You take care of your applications inside the container, and;
103
-* Docker takes care of managing the container.
104
-
105
-Any machine, be it bare-metal or virtualized, can run any Docker
106
-container. The sole requirement is to have Docker installed.
107
-
108
-**This translates to:**
37
+Docker is perfect for helping you with the development lifecycle. Docker
38
+can allow your developers to develop on local containers that contain
39
+your applications and services. It can integrate into a continuous
40
+integration and deployment workflow.
109 41
 
110
- - Reliability;
111
- - Freeing your applications out of the dependency-hell;
112
- - A natural guarantee that things will work, anywhere.
42
+Your developers write code locally and share their development stack via
43
+Docker with their colleagues. When they are ready they can push their
44
+code and the stack they are developing on to a test environment and
45
+execute any required tests. From the testing environment you can then
46
+push your Docker images into production and deploy your code.
113 47
 
114
-### Lightweight
48
+* Deploy and scale more easily
115 49
 
116
-*No more resources waste.*
50
+Docker's container platform allows you to have highly portable
51
+workloads. Docker containers can run on a developer's local host, on
52
+physical or virtual machines in a data center or in the Cloud.
117 53
 
118
-Containers are lightweight, in fact, they are extremely lightweight.
119
-Unlike traditional virtual machines, which have the overhead of a
120
-hypervisor, Docker relies on operating system level features to provide
121
-isolation and security. A Docker container does not need anything more
122
-than what your application needs to run.
54
+Docker's portability and lightweight nature also makes managing
55
+workloads dynamically easy. You can use Docker to build and scale out
56
+applications and services. Docker's speed means that scaling can be near
57
+real time.
123 58
 
124
-This translates to:
59
+* Get higher density and run more workloads
125 60
 
126
- - Ability to deploy a large number of applications on a single system;
127
- - Lightning fast start up times and reduced overhead.
61
+Docker is lightweight and fast. It provides a viable (and
62
+cost-effective!) alternative to hypervisor-based virtual machines. This
63
+is especially useful in high density environments, for example building
64
+your own Cloud or Platform-as-a-Service. But it is also useful
65
+for small and medium deployments where you want to get more out of the
66
+resources you have.
128 67
 
129
-### Docker can run anything
68
+## What are the major Docker components?
130 69
 
131
-*An amazing host! (again, pun intended.)*
70
+Docker has two major components:
132 71
 
133
-Docker isn't prescriptive about what applications or services you can run
134
-inside containers. We provide use cases and examples for running web
135
-services, databases, applications - just about anything you can imagine
136
-can run in a Docker container.
72
+* Docker: the open source container virtualization platform.
73
+* [Docker.io](https://index.docker.io): our Software-as-a-Service
74
+  platform for sharing and managing Docker containers.
137 75
 
138
-**This translates to:**
76
+**Note:** Docker is licensed with the open source Apache 2.0 license.
139 77
 
140
- - Ability to run a wide range of applications;
141
- - Ability to deploy reliably without repeating yourself.
78
+## What is the architecture of Docker?
142 79
 
143
-### Plays well with others
80
+Docker has a client-server architecture. The Docker *client* talks to
81
+the Docker *daemon* which does the heavy lifting of building, running
82
+and distributing your Docker containers. Both the Docker client and the
83
+daemon *can* run on the same system, or you can connect a Docker client
84
+with a remote Docker daemon. The Docker client and service can
85
+communicate via sockets or through a RESTful API.
144 86
 
145
-*A wonderful guest.*
87
+![Docker Architecture Diagram](/article-img/architecture.svg)
146 88
 
147
-Today, it is possible to install and use Docker almost anywhere. Even on
148
-non-Linux systems such as Windows or Mac OS X thanks to a project called
149
-[Boot2Docker](http://boot2docker.io).
89
+### The Docker daemon
150 90
 
151
-**This translates to running Docker (and Docker containers!) _anywhere_:**
91
+As shown on the diagram above, the Docker daemon runs on a host machine.
92
+The user does not directly interact with the daemon, but instead through
93
+the Docker client.
152 94
 
153
- - **Linux:**  
154
- Ubuntu, CentOS / RHEL, Fedora, Gentoo, openSUSE and more.
155
- - **Infrastructure-as-a-Service:**  
156
- Amazon AWS, Google GCE, Rackspace Cloud and probably, your favorite IaaS.
157
- - **Microsoft Windows**  
158
- - **OS X**  
95
+### The Docker client
159 96
 
160
-### Docker is Responsible
97
+The Docker client, in the form of the `docker` binary, is the primary user
98
+interface to Docker. It is tasked with accepting commands from the user
99
+and communicating back and forth with a Docker daemon.
161 100
 
162
-*A tool that you can trust.*
101
+### Inside Docker
163 102
 
164
-Docker does not just bring you a set of tools to isolate and run
165
-applications. It also allows you to specify constraints and controls on
166
-those resources.
103
+Inside Docker there are three concepts we’ll need to understand:
167 104
 
168
-**This translates to:**
169
-
170
- - Fine tuning available resources for each application;
171
- - Allocating memory or CPU intelligently to make most of your environment;
172
-
173
-Without dealing with complicated commands or third party applications.
174
-
175
-### Docker is Social
176
-
177
-*Docker knows that No One Is an Island.*
178
-
179
-Docker allows you to share the images you've built with the world. And
180
-lots of people have already shared their own images.
181
-
182
-To facilitate this sharing Docker comes with a public registry called 
183
-[Docker.io](http://index.docker.io). If you don't want your images to be
184
-public you can also use private images on [Docker.io](https://index.docker.io)
185
-or even run your own registry behind your firewall.
186
-
187
-**This translates to:**
188
-
189
- - No more wasting time building everything from scratch;
190
- - Easily and quickly save your application stack;
191
- - Share and benefit from the depth of the Docker community.
192
-
193
-## Docker versus Virtual Machines
194
-
195
-> I suppose it is tempting, if the *only* tool you have is a hammer, to
196
-> treat *everything* as if it were a nail.
197
-> — **_Abraham Maslow_**
198
-
199
-**Docker containers are:**
200
-
201
- - Easy on the resources;
202
- - Extremely light to deal with;
203
- - Do not come with substantial overhead;
204
- - Very easy to work with;
205
- - Agnostic;
206
- - Can work *on* virtual machines;
207
- - Secure and isolated;
208
- - *Artful*, *social*, *fun*, and;
209
- - Powerful sand-boxes.
210
-
211
-**Docker containers are not:**
212
-
213
- - Hardware or OS emulators;
214
- - Resource heavy;
215
- - Platform, software or language dependent.
216
-
217
-## Docker Use Cases
218
-
219
-Docker is a framework. As a result it's flexible and powerful enough to
220
-be used in a lot of different use cases.
221
-
222
-### For developers
223
-
224
- - **Developed with developers in mind:**  
225
- Build, test and ship applications with nothing but Docker and lean
226
- containers.
227
- - **Re-usable building blocks to create more:**  
228
- Docker images are easily updated building blocks.
229
- - **Automatically build-able:**  
230
- It has never been this easy to build - *anything*.
231
- - **Easy to integrate:**  
232
- A powerful, fully featured API allows you to integrate Docker into your tooling.
233
-
234
-### For sysadmins
235
-
236
- - **Efficient (and DevOps friendly!) lifecycle:**  
237
- Operations and developments are consistent, repeatable and reliable.
238
- - **Balanced environments:**  
239
- Processes between development, testing and production are leveled.
240
- - **Improvements on speed and integration:**  
241
- Containers are almost nothing more than isolated, secure processes.
242
- - **Lowered costs of infrastructure:**  
243
- Containers are lightweight and heavy on resources compared to virtual machines.
244
- - **Portable configurations:**  
245
- Issues and overheads with dealing with configurations and systems are eliminated.
105
+* Docker images.
106
+* Docker registries.
107
+* Docker containers.
246 108
 
247
-### For everyone
109
+#### Docker images
248 110
 
249
- - **Increased security without performance loss:**  
250
- Replacing VMs with containers provide security without additional
251
- hardware (or software).
252
- - **Portable:**  
253
- You can easily move applications and workloads from different operating
254
- systems and platforms.
111
+The Docker image is a read-only template, for example an Ubuntu operating system
112
+with Apache and your web application installed. Docker containers are
113
+created from images. You can download Docker images that other people
114
+have created or Docker provides a simple way to build new images or
115
+update existing images. You can consider Docker images to be the **build**
116
+portion of Docker.
255 117
 
256
-## Where to go from here
118
+#### Docker Registries
257 119
 
258
-### Learn about Parts of Docker and the underlying technology
120
+Docker registries hold images. These are public (or private!) stores
121
+that you can upload or download images to and from. The public Docker
122
+registry is called [Docker.io](http://index.docker.io). It provides a
123
+huge collection of existing images that you can use. These images can be
124
+images you create yourself or you can make use of images that others
125
+have previously created. You can consider Docker registries the
126
+**distribution** portion of Docker.
259 127
 
260
-Visit [Understanding the Technology](technology.md) in our Getting Started manual.
128
+#### Docker containers
261 129
 
262
-### Get practical and learn how to use Docker straight away
130
+Docker containers are like a directory. A Docker container holds
131
+everything that is needed for an application to run. Each container is
132
+created from a Docker image. Docker containers can be run, started,
133
+stopped, moved and deleted. Each container is an isolated and secure
134
+application platform. You can consider Docker containers the **run**
135
+portion of Docker.
263 136
 
264
-Visit [Working with Docker](working-with-docker.md) in our Getting Started manual.
137
+## So how does Docker work?
265 138
 
266
-### Get the product and go hands-on
139
+We've learned so far that:
267 140
 
268
-Visit [Get Docker](get-docker.md) in our Getting Started manual.
141
+1. You can build Docker images that hold your applications.
142
+2. You can create Docker containers from those Docker images to run your
143
+   applications.
144
+3. You can share those Docker images via
145
+   [Docker.io](https://index.docker.io) or your own registry.
146
+
147
+Let's look at how these elements combine together to make Docker work.
148
+
149
+### How does a Docker Image work?
150
+
151
+We've already seen that Docker images are read-only templates that
152
+Docker containers are launched from. Each image consists of a series of
153
+layers. Docker makes use of [union file
154
+systems](http://en.wikipedia.org/wiki/UnionFS) to combine these layers
155
+into a single image. Union file systems allow files and directories of
156
+separate file systems, known as branches, to be transparently overlaid,
157
+forming a single coherent file system.
158
+
159
+One of the reasons Docker is so lightweight is because of these layers.
160
+When you change a Docker image, for example update an application to a
161
+new version, this builds a new layer. Hence, rather than replacing the whole
162
+image or entirely rebuilding, as you may do with a virtual machine, only
163
+that layer is added or updated. Now you don't need to distribute a whole new image,
164
+just the update, making distributing Docker images fast and simple.
165
+
166
+Every image starts from a base image, for example `ubuntu`, a base Ubuntu
167
+image, or `fedora`, a base Fedora image. You can also use images of your
168
+own as the basis for a new image, for example if you have a base Apache
169
+image you could use this as the base of all your web application images.
170
+
171
+> **Note:**  
172
+> Docker usually gets these base images from [Docker.io](https://index.docker.io).
173
+
174
+Docker images are then built from these base images using a simple
175
+descriptive set of steps we call *instructions*. Each instruction
176
+creates a new layer in our image. Instructions include steps like:
177
+
178
+* Run a command.
179
+* Add a file or directory.
180
+* Create an environment variable.
181
+* What process to run when launching a container from this image.
182
+
183
+These instructions are stored in a file called a `Dockerfile`. Docker
184
+reads this `Dockerfile` when you request an image be built, executes the
185
+instructions and returns a final image.
186
+
187
+### How does a Docker registry work?
188
+
189
+The Docker registry is the store for your Docker images. Once you build
190
+a Docker image you can *push* it to a public registry [Docker.io](
191
+https://index.docker.io) or to your own registry running behind your
192
+firewall.
193
+
194
+Using the Docker client, you can search for already published images and
195
+then pull them down to your Docker host to build containers from them.
196
+
197
+[Docker.io](https://index.docker.io) provides both public and
198
+private storage for images. Public storage is searchable and can be
199
+downloaded by anyone. Private storage is excluded from search
200
+results and only you and your users can pull them down and use them to
201
+build containers. You can [sign up for a plan
202
+here](https://index.docker.io/plans).
203
+
204
+### How does a container work?
205
+
206
+A container consists of an operating system, user added files and
207
+meta-data. As we've discovered each container is built from an image. That image tells
208
+Docker what the container holds, what process to run when the container
209
+is launched and a variety of other configuration data. The Docker image
210
+is read-only. When Docker runs a container from an image it adds a
211
+read-write layer on top of the image (using a union file system as we
212
+saw earlier) in which your application is then run.
213
+
214
+### What happens when you run a container?
215
+
216
+The Docker client using the `docker` binary, or via the API, tells the
217
+Docker daemon to run a container. Let's take a look at what happens
218
+next.
219
+
220
+    $ docker run -i -t ubuntu /bin/bash
221
+
222
+Let's break down this command. The Docker client is launched using the
223
+`docker` binary with the `run` option telling it to launch a new
224
+container. The bare minimum the Docker client needs to tell the
225
+Docker daemon to run the container is:
226
+
227
+* What Docker image to build the container from, here `ubuntu`, a base
228
+  Ubuntu image;
229
+* The command you want to run inside the container when it is launched,
230
+  here `bin/bash` to shell the Bash shell inside the new container.
231
+
232
+So what happens under the covers when we run this command?
233
+
234
+Docker begins with:
235
+
236
+- **Pulling the `ubuntu` image:**  
237
+  Docker checks for the presence of the `ubuntu` image and if it doesn't
238
+  exist locally on the host, then Docker downloads it from
239
+  [Docker.io](https://index.docker.io). If the image already exists then
240
+  Docker uses it for the new container.
241
+- **Creates a new container:**  
242
+  Once Docker has the image it creates a container from it:
243
+    * **Allocates a filesystem and mounts a read-write _layer_:**  
244
+      The container is created in the file system and a read-write layer is
245
+      added to the image.
246
+    * **Allocates a network / bridge interface:**  
247
+      Creates a network interface that allows the Docker container to talk to
248
+      the local host.
249
+    * **Sets up an IP address:**  
250
+      Finds and attaches an available IP address from a pool.
251
+- **Executes a process that you specify:**  
252
+  Runs your application, and;
253
+- **Captures and provides application output:**  
254
+  Connects and logs standard input, outputs and errors for you to see how
255
+  your application is running.
256
+
257
+Now you have a running container! From here you can manage your running
258
+container, interact with your application and then when finished stop
259
+and remove your container.
260
+
261
+## The underlying technology
262
+
263
+Docker is written in Go and makes use of several Linux kernel features to
264
+deliver the features we've seen.
265
+
266
+### Namespaces
267
+
268
+Docker takes advantage of a technology called `namespaces` to provide an
269
+isolated workspace we call a *container*.  When you run a container,
270
+Docker creates a set of *namespaces* for that container.
271
+
272
+This provides a layer of isolation: each aspect of a container runs in
273
+its own namespace and does not have access outside it.
274
+
275
+Some of the namespaces that Docker uses are:
276
+
277
+ - **The `pid` namespace:**
278
+ Used for process isolation (PID: Process ID).
279
+ - **The `net` namespace:**
280
+ Used for managing network interfaces (NET: Networking).
281
+ - **The `ipc` namespace:**
282
+ Used for managing access to IPC resources (IPC: InterProcess
283
+Communication).
284
+ - **The `mnt` namespace:**
285
+ Used for managing mount-points (MNT: Mount).
286
+ - **The `uts` namespace:**
287
+ Used for isolating kernel and version identifiers. (UTS: Unix Timesharing
288
+System).
289
+
290
+### Control groups
291
+
292
+Docker also makes use of another technology called `cgroups` or control
293
+groups. A key need to run applications in isolation is to have them only
294
+use the resources you want. This ensures containers are good
295
+multi-tenant citizens on a host. Control groups allow Docker to
296
+share available hardware resources to containers and if required, set up to
297
+limits and constraints, for example limiting the memory available to a
298
+specific container.
299
+
300
+### Union file systems
301
+
302
+Union file systems or UnionFS are file systems that operate by creating
303
+layers, making them very lightweight and fast. Docker uses union file
304
+systems to provide the building blocks for containers. We learned about
305
+union file systems earlier in this document. Docker can make use of
306
+several union file system variants including: AUFS, btrfs, vfs, and
307
+DeviceMapper.
308
+
309
+### Container format
310
+
311
+Docker combines these components into a wrapper we call a container
312
+format. The default container format is called `libcontainer`. Docker
313
+also supports traditional Linux containers using
314
+[LXC](https://linuxcontainers.org/). In future Docker may support other
315
+container formats, for example integration with BSD Jails or Solaris
316
+Zones.
317
+
318
+## Next steps
319
+
320
+### Learning how to use Docker
321
+
322
+Visit [Working with Docker](working-with-docker.md).
323
+
324
+### Installing Docker
325
+
326
+Visit the [installation](/installation/#installation) section.
269 327
 
270 328
 ### Get the whole story
271 329
 
272 330
 [https://www.docker.io/the_whole_story/](https://www.docker.io/the_whole_story/)
331
+
... ...
@@ -1,80 +1,63 @@
1
-page_title: Working with Docker and the Dockerfile
2
-page_description: Working with Docker and The Dockerfile explained in depth
1
+page_title: Introduction to working with Docker
2
+page_description: Introduction to working with Docker and Docker commands.
3 3
 page_keywords: docker, introduction, documentation, about, technology, understanding, Dockerfile
4 4
 
5
-# Working with Docker and the Dockerfile
5
+# An Introduction to working with Docker
6 6
 
7
-*How to use and work with Docker?*
7
+**Getting started with Docker**
8 8
 
9
-> **Warning! Don't let this long page bore you.**
10
-> If you prefer a summary and would like to see how a specific command
9
+> **Note:** 
10
+> If you would like to see how a specific command
11 11
 > works, check out the glossary of all available client
12
-> commands on our [User's Manual: Commands Reference](
13
-> http://docs.docker.io/reference/commandline/cli).
12
+> commands on our [Commands Reference](/reference/commandline/cli).
14 13
 
15 14
 ## Introduction
16 15
 
17
-On the last page, [Understanding the Technology](technology.md), we covered the
18
-components that make up Docker and learnt about the
19
-underlying technology and *how* everything works.
16
+In the [Understanding Docker](understanding-docker.md) section we
17
+covered the components that make up Docker, learned about the underlying
18
+technology and saw *how* everything works.
20 19
 
21
-Now, it is time to get practical and see *how to work with* the Docker client,
22
-Docker containers and images and the `Dockerfile`.
20
+Now, let's get an introduction to the basics of interacting with Docker.
23 21
 
24
-> **Note:** You are encouraged to take a good look at the container,
25
-> image and `Dockerfile` explanations here to have a better understanding
26
-> on what exactly they are and to get an overall idea on how to work with
27
-> them. On the next page (i.e., [Get Docker](get-docker.md)), you will be
28
-> able to find links for platform-centric installation instructions.
22
+> **Note:** 
23
+> This page assumes you have a host with a running Docker
24
+> daemon and access to a Docker client. To see how to install Docker on
25
+> a variety of platforms see the [installation
26
+> section](/installation/#installation).
29 27
 
30
-## Elements of Docker
31
-
32
-As we mentioned on the, [Understanding the Technology](technology.md) page, the main
33
-elements of Docker are:
34
-
35
- - Containers;
36
- - Images, and;
37
- - The `Dockerfile`.
38
-
39
-> **Note:** This page is more *practical* than *technical*. If you are
40
-> interested in understanding how these tools work behind the scenes
41
-> and do their job, you can always read more on
42
-> [Understanding the Technology](technology.md).
43
-
44
-## Working with the Docker client
45
-
46
-In order to work with the Docker client, you need to have a host with
47
-the Docker daemon installed and running.
48
-
49
-### How to use the client
28
+## How to use the client
50 29
 
51 30
 The client provides you a command-line interface to Docker. It is
52 31
 accessed by running the `docker` binary.
53 32
 
54
-> **Tip:** The below instructions can be considered a summary of our
55
-> *interactive tutorial*. If you prefer a more hands-on approach without
56
-> installing anything, why not give that a shot and check out the
57
-> [Docker Interactive Tutorial](https://www.docker.io/gettingstarted).
33
+> **Tip:** 
34
+> The below instructions can be considered a summary of our
35
+> [interactive tutorial](https://www.docker.io/gettingstarted). If you
36
+> prefer a more hands-on approach without installing anything, why not
37
+> give that a shot and check out the
38
+> [tutorial](https://www.docker.io/gettingstarted).
58 39
 
59
-The `docker` client usage consists of passing a chain of arguments:
40
+The `docker` client usage is pretty simple. Each action you can take
41
+with Docker is a command and each command can take a series of
42
+flags and arguments.
60 43
 
61
-    # Usage:  [sudo] docker [option] [command] [arguments] ..
44
+    # Usage:  [sudo] docker [flags] [command] [arguments] ..
62 45
     # Example:
63 46
     $ docker run -i -t ubuntu /bin/bash
64 47
 
65
-### Our first Docker command
48
+## Using the Docker client
66 49
 
67
-Let's get started with our first Docker command by checking the
68
-version of the currently installed Docker client using the `docker
69
-version` command.
50
+Let's get started with the Docker client by running our first Docker
51
+command. We're going to use the `docker version` command to return
52
+version information on the currently installed Docker client and daemon.
70 53
 
71 54
     # Usage: [sudo] docker version
72 55
     # Example:
73 56
     $ docker version
74 57
 
75
-This command will not only provide you the version of Docker client you
76
-are using, but also the version of Go (the programming language powering
77
-Docker).
58
+This command will not only provide you the version of Docker client and
59
+daemon you are using, but also the version of Go (the programming
60
+language powering Docker).
78 61
 
79 62
     Client version: 0.8.0
80 63
     Go version (client): go1.2
... ...
@@ -87,19 +70,16 @@ Docker).
87 87
 
88 88
     Last stable version: 0.8.0
89 89
 
90
-### Finding out all available commands
91
-
92
-The user-centric nature of Docker means providing you a constant stream
93
-of helpful instructions. This begins with the client itself.
90
+### Seeing what the Docker client can do
94 91
 
95
-In order to get a full list of available commands run the `docker`
96
-binary:
92
+We can see all of the commands available to us with the Docker client by
93
+running the `docker` binary without any options.
97 94
 
98 95
     # Usage: [sudo] docker
99 96
     # Example:
100 97
     $ docker
101 98
 
102
-You will get an output with all currently available commands.
99
+You will see a list of all currently available commands.
103 100
 
104 101
     Commands:
105 102
          attach    Attach to a running container
... ...
@@ -107,23 +87,23 @@ You will get an output with all currently available commands.
107 107
          commit    Create a new image from a container's changes
108 108
     . . .
109 109
 
110
-### Command usage instructions
110
+### Seeing Docker command usage
111 111
 
112
-The same way used to learn all available commands can be repeated to find
113
-out usage instructions for a specific command.
112
+You can also zoom in and review the usage for specific Docker commands.
114 113
 
115
-Try typing Docker followed with a `[command]` to see the instructions:
114
+Try typing Docker followed with a `[command]` to see the usage for that
115
+command:
116 116
 
117 117
     # Usage: [sudo] docker [command] [--help]
118 118
     # Example:
119 119
     $ docker attach
120
-    Help outputs . . .
120
+    Help output . . .
121 121
 
122
-Or you can pass the `--help` flag to the `docker` binary.
122
+Or you can also pass the `--help` flag to the `docker` binary.
123 123
 
124 124
     $ docker images --help
125 125
 
126
-You will get an output with all available options:
126
+This will display the help text and all available flags:
127 127
 
128 128
     Usage: docker attach [OPTIONS] CONTAINER
129 129
 
... ...
@@ -134,6 +114,9 @@ You will get an output with all available options:
134 134
 
135 135
 ## Working with images
136 136
 
137
+Let's get started with using Docker by working with Docker images, the
138
+building blocks of Docker containers.
139
+
137 140
 ### Docker Images
138 141
 
139 142
 As we've discovered a Docker image is a read-only template that we build
... ...
@@ -146,30 +129,32 @@ runs Apache and our own web application as a starting point to launch containers
146 146
 
147 147
 To search for Docker image we use the `docker search` command. The
148 148
 `docker search` command returns a list of all images that match your
149
-search criteria together with additional, useful information about that
150
-image. This includes information such as social metrics like how many
151
-other people like the image - we call these "likes" *stars*. We also
152
-tell you if an image is *trusted*. A *trusted* image is built from a
153
-known source and allows you to introspect in greater detail how the
154
-image is constructed.
149
+search criteria, together with some useful information about that image.
150
+
151
+This information includes social metrics like how many other people like
152
+the image: we call these "likes" *stars*. We also tell you if an image
153
+is *trusted*. A *trusted* image is built from a known source and allows
154
+you to introspect in greater detail how the image is constructed.
155 155
 
156 156
     # Usage: [sudo] docker search [image name]
157 157
     # Example:
158 158
     $ docker search nginx
159 159
 
160
-    NAME                                     DESCRIPTION                                     STARS     OFFICIAL   TRUSTED
161
-    $ dockerfile/nginx                         Trusted Nginx (http://nginx.org/) Build         6                    [OK]
162
-    paintedfox/nginx-php5                    A docker image for running Nginx with PHP5.     3                    [OK]
163
-    $ dockerfiles/django-uwsgi-nginx           dockerfile and configuration files to buil...   2                    [OK]
160
+    NAME                               DESCRIPTION                                     STARS  OFFICIAL   TRUSTED
161
+    dockerfile/nginx                   Trusted Nginx (http://nginx.org/) Build         6                 [OK]
162
+    paintedfox/nginx-php5              A docker image for running Nginx with PHP5.     3                 [OK]
163
+    dockerfiles/django-uwsgi-nginx     Dockerfile and configuration files to buil...   2                 [OK]
164 164
     . . .
165 165
 
166
-> **Note:** To learn more about trusted builds, check out [this](
167
-http://blog.docker.io/2013/11/introducing-trusted-builds) blog post.
166
+> **Note:** 
167
+> To learn more about trusted builds, check out
168
+> [this](http://blog.docker.io/2013/11/introducing-trusted-builds) blog
169
+> post.
168 170
 
169 171
 ### Downloading an image
170 172
 
171
-Downloading a Docker image is called *pulling*. To do this we hence use the
172
-`docker pull` command.
173
+Once we find an image we'd like to download we can pull it down from
174
+[Docker.io](https://index.docker.io) using the `docker pull` command.
173 175
 
174 176
     # Usage: [sudo] docker pull [image name]
175 177
     # Example:
... ...
@@ -182,13 +167,13 @@ Downloading a Docker image is called *pulling*. To do this we hence use the
182 182
     . . .
183 183
 
184 184
 As you can see, Docker will download, one by one, all the layers forming
185
-the final image. This demonstrates the *building block* philosophy of
186
-Docker.
185
+the image.
187 186
 
188 187
 ### Listing available images
189 188
 
190
-In order to get a full list of available images, you can use the
191
-`docker images` command.
189
+You may already have some images you've pulled down or built yourself
190
+and you can use the `docker images` command to see the images
191
+available to you locally.
192 192
 
193 193
     # Usage: [sudo] docker images
194 194
     # Example:
... ...
@@ -197,28 +182,41 @@ In order to get a full list of available images, you can use the
197 197
     REPOSITORY          TAG                 IMAGE ID            CREATED             VIRTUAL SIZE
198 198
     myUserName/nginx    latest              a0d6c70867d2        41 seconds ago      578.8 MB
199 199
     nginx               latest              173c2dd28ab2        3 minutes ago       578.8 MB
200
-    $ dockerfile/nginx    latest              0ade68db1d05        3 weeks ago         578.8 MB
200
+    dockerfile/nginx    latest              0ade68db1d05        3 weeks ago         578.8 MB
201
+
202
+### Building our own images
203
+
204
+You can build your own images using a `Dockerfile` and the `docker
205
+build` command. The `Dockerfile` is very flexible and provides a
206
+powerful set of instructions for building applications into Docker
207
+images. To learn more about the `Dockerfile` see the [`Dockerfile`
208
+Reference](/reference/builder/) and [tutorial](https://www.docker.io/learn/dockerfile/).
201 209
 
202 210
 ## Working with containers
203 211
 
204 212
 ### Docker Containers
205 213
 
206
-Docker containers are directories on your Docker host that are built
207
-from Docker images. In order to create or start a container, you need an
208
-image. This could be the base `ubuntu` image or an image built and
209
-shared with you or an image you've built yourself.
214
+Docker containers run your applications and are built from Docker
215
+images. In order to create or start a container, you need an image. This
216
+could be the base `ubuntu` image or an image built and shared with you
217
+or an image you've built yourself.
210 218
 
211 219
 ### Running a new container from an image
212 220
 
213
-The easiest way to create a new container is to *run* one from an image.
221
+The easiest way to create a new container is to *run* one from an image
222
+using the `docker run` command.
214 223
 
215 224
     # Usage: [sudo] docker run [arguments] ..
216 225
     # Example:
217 226
     $ docker run -d --name nginx_web nginx /usr/sbin/nginx
227
+    25137497b2749e226dd08f84a17e4b2be114ddf4ada04125f130ebfe0f1a03d3
218 228
 
219 229
 This will create a new container from an image called `nginx` which will
220 230
 launch the command `/usr/sbin/nginx` when the container is run. We've
221
-also given our container a name, `nginx_web`.
231
+also given our container a name, `nginx_web`. When the container is run
232
+Docker will return a container ID, a long string that uniquely
233
+identifies our container. We use can the container's name or its string
234
+to work with it.
222 235
 
223 236
 Containers can be run in two modes:
224 237
 
... ...
@@ -226,7 +224,8 @@ Containers can be run in two modes:
226 226
 * Daemonized;
227 227
 
228 228
 An interactive container runs in the foreground and you can connect to
229
-it and interact with it. A daemonized container runs in the background.
229
+it and interact with it, for example sign into a shell on that
230
+container. A daemonized container runs in the background.
230 231
 
231 232
 A container will run as long as the process you have launched inside it
232 233
 is running, for example if the `/usr/bin/nginx` process stops running
... ...
@@ -236,7 +235,7 @@ the container will also stop.
236 236
 
237 237
 We can see a list of all the containers on our host using the `docker
238 238
 ps` command. By default the `docker ps` command only shows running
239
-containers. But we can also add the `-a` flag to show *all* containers -
239
+containers. But we can also add the `-a` flag to show *all* containers:
240 240
 both running and stopped.
241 241
 
242 242
     # Usage: [sudo] docker ps [-a]
... ...
@@ -248,8 +247,8 @@ both running and stopped.
248 248
 
249 249
 ### Stopping a container
250 250
 
251
-You can use the `docker stop` command to stop an active container. This will gracefully
252
-end the active process.
251
+You can use the `docker stop` command to stop an active container. This
252
+will gracefully end the active process.
253 253
 
254 254
     # Usage: [sudo] docker stop [container ID]
255 255
     # Example:
... ...
@@ -259,6 +258,10 @@ end the active process.
259 259
 If the `docker stop` command succeeds it will return the name of
260 260
 the container it has stopped.
261 261
 
262
+> **Note:** 
263
+> If you want you to more aggressively stop a container you can use the
264
+> `docker kill` command.
265
+
262 266
 ### Starting a Container
263 267
 
264 268
 Stopped containers can be started again.
... ...
@@ -271,136 +274,18 @@ Stopped containers can be started again.
271 271
 If the `docker start` command succeeds it will return the name of the
272 272
 freshly started container.
273 273
 
274
-## Working with the Dockerfile
275
-
276
-The `Dockerfile` holds the set of instructions Docker uses to build a Docker image.
277
-
278
-> **Tip:** Below is a short summary of our full Dockerfile tutorial.  In
279
-> order to get a better-grasp of how to work with these automation
280
-> scripts, check out the [Dockerfile step-by-step
281
-> tutorial](https://www.docker.io/learn/dockerfile).
282
-
283
-A `Dockerfile` contains instructions written in the following format:
284
-
285
-    # Usage: Instruction [arguments / command] ..
286
-    # Example:
287
-    FROM ubuntu
288
-
289
-A `#` sign is used to provide a comment:
290
-
291
-    # Comments ..
292
-
293
-> **Tip:** The `Dockerfile` is very flexible and provides a powerful set
294
-> of instructions for building applications. To learn more about the
295
-> `Dockerfile` and its instructions see the [Dockerfile
296
-> Reference](http://docs.docker.io/reference/builder/).
297
-
298
-### First steps with the Dockerfile
299
-
300
-It's a good idea to add some comments to the start of your `Dockerfile`
301
-to provide explanation and exposition to any future consumers, for
302
-example:
303
-
304
-    #
305
-    # Dockerfile to install Nginx
306
-    # VERSION 2 - EDITION 1
307
-
308
-The first instruction in any `Dockerfile` must be the `FROM` instruction. The `FROM` instruction specifies the image name that this new image is built from, it is often a base image like `ubuntu`.
309
-
310
-    # Base image used is Ubuntu:
311
-    FROM ubuntu
274
+## Next steps
312 275
 
313
-Next, we recommend you use the `MAINTAINER` instruction to tell people who manages this image.
314
-
315
-    # Maintainer: O.S. Tezer <ostezer at gmail com> (@ostezer)
316
-    MAINTAINER O.S. Tezer, ostezer@gmail.com
317
-
318
-After this we can add additional instructions that represent the steps
319
-to build our actual image.
320
-
321
-### Our Dockerfile so far
322
-
323
-So far our `Dockerfile` will look like.
324
-
325
-    # Dockerfile to install Nginx
326
-    # VERSION 2 - EDITION 1
327
-    FROM ubuntu
328
-    MAINTAINER O.S. Tezer, ostezer@gmail.com
329
-
330
-Let's install a package and configure an application inside our image. To do this we use a new
331
-instruction: `RUN`. The `RUN` instruction executes commands inside our
332
-image, for example. The instruction is just like running a command on
333
-the command line inside a container.
334
-
335
-    RUN echo "deb http://archive.ubuntu.com/ubuntu/ raring main universe" >> /etc/apt/sources.list
336
-    RUN apt-get update
337
-    RUN apt-get install -y nginx
338
-    RUN echo "\ndaemon off;" >> /etc/nginx/nginx.conf
339
-
340
-We can see here that we've *run* four instructions. Each time we run an
341
-instruction a new layer is added to our image. Here's we've added an
342
-Ubuntu package repository, updated the packages, installed the `nginx`
343
-package and then echo'ed some configuration to the default
344
-`/etc/nginx/nginx.conf` configuration file.
345
-
346
-Let's specify another instruction, `CMD`, that tells Docker what command
347
-to run when a container is created from this image.
348
-
349
-    CMD /usr/sbin/nginx
350
-
351
-We can now save this file and use it build an image.
352
-
353
-### Using a Dockerfile
354
-
355
-Docker uses the `Dockerfile` to build images. The build process is initiated by the `docker build` command.
356
-
357
-    # Use the Dockerfile at the current location
358
-    # Usage: [sudo] docker build .
359
-    # Example:
360
-    $ docker build -t="my_nginx_image" .
361
-
362
-    Uploading context 25.09 kB
363
-    Uploading context
364
-    Step 0 : FROM ubuntu
365
-      ---> 9cd978db300e
366
-    Step 1 : MAINTAINER O.S. Tezer, ostezer@gmail.com
367
-      ---> Using cache
368
-      ---> 467542d0cdd3
369
-    Step 2 : RUN echo "deb http://archive.ubuntu.com/ubuntu/ raring main universe" >> /etc/apt/sources.list
370
-      ---> Using cache
371
-      ---> 0a688bd2a48c
372
-    Step 3 : RUN apt-get update
373
-     ---> Running in de2937e8915a
374
-    . . .
375
-    Step 10 : CMD /usr/sbin/nginx
376
-      ---> Running in b4908b9b9868
377
-      ---> 626e92c5fab1
378
-    Successfully built 626e92c5fab1
379
-
380
-Here we can see that Docker has executed each instruction in turn and
381
-each instruction has created a new layer in turn and each layer identified
382
-by a new ID. The `-t` flag allows us to specify a name for our new
383
-image, here `my_nginx_image`.
384
-
385
-We can see our new image using the `docker images` command.
386
-
387
-    $ docker images
388
-    REPOSITORY          TAG                 IMAGE ID            CREATED             VIRTUAL SIZE
389
-    my_nginx_img        latest              626e92c5fab1        57 seconds ago      337.6 MB
390
-
391
-## Where to go from here
276
+Here we've learned the basics of how to interact with Docker images and
277
+how to run and work with our first container.
392 278
 
393 279
 ### Understanding Docker
394 280
 
395
-Visit [Understanding Docker](understanding-docker.md) in our Getting Started manual.
396
-
397
-### Learn about parts of Docker and the underlying technology
398
-
399
-Visit [Understanding the Technology](technology.md) in our Getting Started manual.
281
+Visit [Understanding Docker](understanding-docker.md).
400 282
 
401
-### Get the product and go hands-on
283
+### Installing Docker
402 284
 
403
-Visit [Get Docker](get-docker.md) in our Getting Started manual.
285
+Visit the [installation](/installation/#installation) section.
404 286
 
405 287
 ### Get the whole story
406 288