From 0b882cc0140bc03dfe79462c5cdf77b972c94067 Mon Sep 17 00:00:00 2001 From: Lynda O'Leary Date: Sun, 28 Feb 2016 02:30:32 +0000 Subject: [PATCH] Changed Docker references to Docker Engine in docs Signed-off-by: Lynda O'Leary --- docs/installation/mac.md | 36 +++++------- docs/installation/windows.md | 14 ++--- docs/quickstart.md | 60 ++++++++++--------- docs/understanding-docker.md | 110 +++++++++++++++-------------------- 4 files changed, 102 insertions(+), 118 deletions(-) diff --git a/docs/installation/mac.md b/docs/installation/mac.md index 67b56b15ce..3d520b3781 100644 --- a/docs/installation/mac.md +++ b/docs/installation/mac.md @@ -11,10 +11,6 @@ weight="-90" # Mac OS X -> **Note**: This release of Docker deprecates the Boot2Docker command line in -> favor of Docker Machine. Use the Docker Toolbox to install Docker Machine as -> well as the other Docker tools. - You install Docker using Docker Toolbox. Docker Toolbox includes the following Docker tools: * Docker Machine for running the `docker-machine` binary @@ -67,7 +63,7 @@ installer. 1. Go to the [Docker Toolbox](https://www.docker.com/toolbox) page. -2. Click the installer link to download. +2. Click the Download link. 3. Install Docker Toolbox by double-clicking the package or by right-clicking and choosing "Open" from the pop-up menu. @@ -89,7 +85,7 @@ and choosing "Open" from the pop-up menu. * makes these binaries available to all users * installs VirtualBox; or updates any existing installation - Change these defaults by pressing "Customize" or "Change + To change these defaults, press "Customize" or "Change Install Location." 5. Press "Install" to perform the standard installation. @@ -107,16 +103,15 @@ and choosing "Open" from the pop-up menu. 7. Press "Close" to exit. - ## Running a Docker Container To run a Docker container, you: -* create a new (or start an existing) virtual machine that runs Docker. -* switch your environment to your new VM -* use the `docker` client to create, load, and manage containers +* Create a new (or start an existing) virtual machine +* Switch your environment to your new VM +* Use the `docker` client to create, load, and manage containers -Once you create a machine, you can reuse it as often as you like. Like any +You can reuse this virtual machine as often as you like. Like any VirtualBox VM, it maintains its configuration between uses. There are two ways to use the installed tools, from the Docker Quickstart Terminal or @@ -130,9 +125,9 @@ There are two ways to use the installed tools, from the Docker Quickstart Termin The application: - * opens a terminal window - * creates a `default` VM if it doesn't exists, and starts the VM after - * points the terminal environment to this VM + * Opens a terminal window + * Creates a `default` VM if it doesn't exists, and starts the VM after + * Points the terminal environment to this VM Once the launch completes, the Docker Quickstart Terminal reports: @@ -222,7 +217,6 @@ different shell such as C Shell but the commands are the same. $ docker run hello-world - ## Learn about your Toolbox installation Toolbox installs the Docker Engine binary, the Docker binary on your system. When you @@ -271,7 +265,7 @@ and what it does: | upgrade | upgrade | Upgrades a machine's Docker client to the latest stable release. | -## Example of Docker on Mac OS X +## Examples on Mac OS X Work through this section to try some practical container tasks on a VM. At this point, you should have a VM running and be connected to it through your shell. @@ -361,7 +355,7 @@ The next exercise demonstrates how to do this. $ docker run -d -P -v $HOME/site:/usr/share/nginx/html \ --name mysite nginx -6. Get the `mysite` container's port. +6. View the `mysite` container's port. $ docker port mysite 80/tcp -> 0.0.0.0:49166 @@ -371,7 +365,7 @@ The next exercise demonstrates how to do this. ![My site page](images/newsite_view.png) -8. Try adding a page to your `$HOME/site` in real time. +8. Add a page to your `$HOME/site` in real time. $ echo "This is cool" > cool.html @@ -391,7 +385,7 @@ The next exercise demonstrates how to do this. ## Upgrade Docker Toolbox -To upgrade Docker Toolbox, download and re-run [the Docker Toolbox +To upgrade Docker Toolbox, download and re-run the [Docker Toolbox installer](https://docker.com/toolbox/). @@ -427,9 +421,9 @@ To uninstall, do the following: ## Learning more Use `docker-machine help` to list the full command line reference for Docker Machine. For more -information about using SSH or SCP to access a VM, see [the Docker Machine +information about using SSH or SCP to access a VM, see the [Docker Machine documentation](https://docs.docker.com/machine/). -You can continue with the [Docker User Guide](../userguide/index.md). If you are +You can continue with the [Docker Engine User Guide](../userguide/index.md). If you are interested in using the Kitematic GUI, see the [Kitematic user guide](https://docs.docker.com/kitematic/userguide/). diff --git a/docs/installation/windows.md b/docs/installation/windows.md index 0ebb251568..696ee3394a 100644 --- a/docs/installation/windows.md +++ b/docs/installation/windows.md @@ -144,9 +144,9 @@ installer. To run a Docker container, you: -* create a new (or start an existing) Docker virtual machine -* switch your environment to your new VM -* use the `docker` client to create, load, and manage containers +* Create a new (or start an existing) Docker virtual machine +* Switch your environment to your new VM +* Use the `docker` client to create, load, and manage containers Once you create a machine, you can reuse it as often as you like. Like any VirtualBox VM, it maintains its configuration between uses. @@ -160,9 +160,9 @@ There are several ways to use the installed tools, from the Docker Quickstart Te The application: - * opens a terminal window - * creates a `default` VM if it doesn't exist, and starts the VM after - * points the terminal environment to this VM + * Opens a terminal window + * Creates a `default` VM if it doesn't exist, and starts the VM after + * Points the terminal environment to this VM Once the launch completes, you can run `docker` commands. @@ -374,6 +374,6 @@ delete that file yourself. ## Learn more -You can continue with the [Docker User Guide](../userguide/index.md). If you are +You can continue with the [Docker Engine User Guide](../userguide/index.md). If you are interested in using the Kitematic GUI, see the [Kitematic user guide](https://docs.docker.com/kitematic/userguide/). diff --git a/docs/quickstart.md b/docs/quickstart.md index d8a93227f2..4f282b75dc 100644 --- a/docs/quickstart.md +++ b/docs/quickstart.md @@ -1,7 +1,7 @@ -# Quickstart Docker Engine +# Docker Engine Quickstart -This quickstart assumes you have a working installation of Docker Engine. To verify Engine is installed, use the following command: +This quickstart assumes you have a working installation of Docker Engine. To verify Engine is installed and configured, use the following command: # Check that you have a working install $ docker info -If you get `docker: command not found` or something like +If you have a successful install, the system information appears. If you get `docker: command not found` or something like `/var/lib/docker/repositories: permission denied` you may have an incomplete Docker installation or insufficient privileges to access Engine on your machine. With the default installation of Engine `docker` @@ -25,9 +25,9 @@ commands need to be run by a user that is in the `docker` group or by the `root` user. Depending on your Engine system configuration, you may be required -to preface each `docker` command with `sudo`. One way to avoid having to use -`sudo` with the `docker` commands is to create a Unix group called `docker` and -add users that will be entering `docker` commands to the 'docker' group. +to preface each `docker` command with `sudo`. If you want to run without using +`sudo` with the `docker` commands, then create a Unix group called `docker` and +add the user to the 'docker' group. For more information about installing Docker Engine or `sudo` configuration, refer to the [installation](installation/index.md) instructions for your operating system. @@ -35,34 +35,40 @@ the [installation](installation/index.md) instructions for your operating system ## Download a pre-built image +To pull an `ubuntu` image, run: + # Download an ubuntu image $ docker pull ubuntu -This will find the `ubuntu` image by name on -[*Docker Hub*](userguide/containers/dockerrepos.md#searching-for-images) -and download it from [Docker Hub](https://hub.docker.com) to a local -image cache. +This downloads the `ubuntu` image by name from [Docker Hub](https://hub.docker.com) to a local +image cache. To search for an image, run `docker search`. For more information, go to: +[Searching images](userguide/containers/dockerrepos.md#searching-for-images) + > **Note**: > When the image is successfully downloaded, you see a 12 character > hash `539c0211cd76: Download complete` which is the -> short form of the image ID. These short image IDs are the first 12 -> characters of the full image ID - which can be found using +> short form of the Image ID. These short Image IDs are the first 12 +> characters of the full Image ID. To view this information, run > `docker inspect` or `docker images --no-trunc=true`. +To display a list of downloaded images, run `docker images`. + ## Running an interactive shell To run an interactive shell in the Ubuntu image: $ docker run -i -t ubuntu /bin/bash -The `-i` flag starts an interactive container. The `-t` flag creates a -pseudo-TTY that attaches `stdin` and `stdout`. +The `-i` flag starts an interactive container. +The `-t` flag creates a pseudo-TTY that attaches `stdin` and `stdout`. +The image is `ubuntu`. +The command `/bin/bash` starts a shell you can log in. To detach the `tty` without exiting the shell, use the escape sequence -`Ctrl-p` + `Ctrl-q`. The container will continue to exist in a stopped state -once exited. To list all containers, stopped and running, use the `docker ps -a` -command. +`Ctrl-p` + `Ctrl-q`. The container continues to exist in a stopped state +once exited. To list all running containers, run `docker ps`. To view stopped and running containers, +run `docker ps -a`. ## Bind Docker to another host/port or a Unix socket @@ -179,16 +185,14 @@ TCP and a Unix socket ## Committing (saving) a container state -Save your containers state to an image, so the state can be -re-used. +To save the current state of a container as an image: -When you commit your container, Docker only stores the diff (difference) between -the source image and the current state of the container's image. To list images -you already have, use the `docker images` command. - - # Commit your container to a new named image $ docker commit +When you commit your container, Docker Engine only stores the diff (difference) between +the source image and the current state of the container's image. To list images +you already have, run: + # List your images $ docker images @@ -196,6 +200,6 @@ You now have an image state from which you can create new instances. ## Where to go next -* Work your way through the [Docker User Guide](userguide/index.md) -* Read more about [*Share Images via Repositories*](userguide/containers/dockerrepos.md) -* Review [*Command Line*](reference/commandline/cli.md) +* Work your way through the [Docker Engine User Guide](userguide/index.md) +* Read more about [Store Images on Docker Hub](userguide/containers/dockerrepos.md) +* Review [Command Line](reference/commandline/cli.md) diff --git a/docs/understanding-docker.md b/docs/understanding-docker.md index 1278f3902c..1dba248e0b 100644 --- a/docs/understanding-docker.md +++ b/docs/understanding-docker.md @@ -11,7 +11,6 @@ weight = -82 # Understand the architecture -**What is Docker?** Docker is an open platform for developing, shipping, and running applications. Docker is designed to deliver your applications faster. With Docker you can @@ -32,11 +31,11 @@ your hardware. Surrounding the container is tooling and a platform which can help you in several ways: -* getting your applications (and supporting components) into Docker containers -* distributing and shipping those containers to your teams for further development +* Get your applications (and supporting components) into Docker containers +* Distribute and ship those containers to your teams for further development and testing -* deploying those applications to your production environment, - whether it is in a local data center or the Cloud. +* Deploy those applications to your production environment, + whether it is in a local data center or the Cloud ## What can I use Docker for? @@ -75,7 +74,7 @@ out of the resources you have. Docker has two major components: -* Docker: the open source containerization platform. +* Docker Engine: the open source containerization platform. * [Docker Hub](https://hub.docker.com): our Software-as-a-Service platform for sharing and managing Docker containers. @@ -103,11 +102,11 @@ interface to Docker. It accepts commands from the user and communicates back and forth with a Docker daemon. ### Inside Docker -To understand Docker's internals, you need to know about three components: +To understand Docker's internals, you need to know about three resources: -* Docker images. -* Docker registries. -* Docker containers. +* Docker images +* Docker registries +* Docker containers #### Docker images @@ -124,6 +123,8 @@ upload or download images. The public Docker registry is provided with the images for your use. These can be images you create yourself or you can use images that others have previously created. Docker registries are the **distribution** component of Docker. +For more information, go to [Docker Registry](https://docs.docker.com/registry/overview/) and +[Docker Trusted Registry](https://docs.docker.com/docker-trusted-registry/overview/). #### Docker containers Docker containers are similar to a directory. A Docker container holds everything that @@ -132,17 +133,6 @@ image. Docker containers can be run, started, stopped, moved, and deleted. Each container is an isolated and secure application platform. Docker containers are the **run** component of Docker. -## So how does Docker work? -So far, we've learned that: - -1. You can build Docker images that hold your applications. -2. You can create Docker containers from those Docker images to run your - applications. -3. You can share those Docker images via - [Docker Hub](https://hub.docker.com) or your own registry. - -Let's look at how these elements combine together to make Docker work. - ### How does a Docker image work? We've already seen that Docker images are read-only templates from which Docker containers are launched. Each image consists of a series of layers. Docker @@ -163,27 +153,27 @@ or `fedora`, a base Fedora image. You can also use images of your own as the basis for a new image, for example if you have a base Apache image you could use this as the base of all your web application images. -> **Note:** Docker usually gets these base images from -> [Docker Hub](https://hub.docker.com). +> **Note:** [Docker Hub](https://hub.docker.com) is a public registry and stores +images. Docker images are then built from these base images using a simple, descriptive set of steps we call *instructions*. Each instruction creates a new layer in our image. Instructions include actions like: -* Run a command. -* Add a file or directory. -* Create an environment variable. -* What process to run when launching a container from this image. +* Run a command +* Add a file or directory +* Create an environment variable +* What process to run when launching a container from this image -These instructions are stored in a file called a `Dockerfile`. Docker reads this -`Dockerfile` when you request a build of an image, executes the instructions, and -returns a final image. +These instructions are stored in a file called a `Dockerfile`. A `Dockerfile` is +a text based script that contains instructions and commands for building the image +from the base image. Docker reads this `Dockerfile` when you request a build of +an image, executes the instructions, and returns a final image. ### How does a Docker registry work? The Docker registry is the store for your Docker images. Once you build a Docker -image you can *push* it to a public registry such as the one provided by [Docker -Hub](https://hub.docker.com) or to your own registry running behind your -firewall. +image you can *push* it to a public registry such as [Docker Hub](https://hub.docker.com) +or to your own registry running behind your firewall. Using the Docker client, you can search for already published images and then pull them down to your Docker host to build containers from them. @@ -209,25 +199,24 @@ daemon to run a container. $ docker run -i -t ubuntu /bin/bash -Let's break down this command. The Docker client is launched using the `docker` -binary with the `run` option telling it to launch a new container. The bare -minimum the Docker client needs to tell the Docker daemon to run the container -is: +The Docker Engine client is launched using the `docker` binary with the `run` option +running a new container. The bare minimum the Docker client needs to tell the +Docker daemon to run the container is: -* What Docker image to build the container from, here `ubuntu`, a base Ubuntu -image; +* What Docker image to build the container from, for example, `ubuntu` * The command you want to run inside the container when it is launched, -here `/bin/bash`, to start the Bash shell inside the new container. +for example,`/bin/bash` So what happens under the hood when we run this command? -In order, Docker does the following: +In order, Docker Engine does the following: -- **Pulls the `ubuntu` image:** Docker checks for the presence of the `ubuntu` -image and, if it doesn't exist locally on the host, then Docker downloads it from -[Docker Hub](https://hub.docker.com). If the image already exists, then Docker +- **Pulls the `ubuntu` image:** Docker Engine checks for the presence of the `ubuntu` +image. If the image already exists, then Docker Engine uses it for the new container. +If it doesn't exist locally on the host, then Docker Engine pulls it from +[Docker Hub](https://hub.docker.com). If the image already exists, then Docker Engine uses it for the new container. -- **Creates a new container:** Once Docker has the image, it uses it to create a +- **Creates a new container:** Once Docker Engine has the image, it uses it to create a container. - **Allocates a filesystem and mounts a read-write _layer_:** The container is created in the file system and a read-write layer is added to the image. @@ -238,7 +227,7 @@ Docker container to talk to the local host. - **Captures and provides application output:** Connects and logs standard input, outputs and errors for you to see how your application is running. -You now have a running container! From here you can manage your container, interact with +You now have a running container! Now you can manage your container, interact with your application and then, when finished, stop and remove your container. ## The underlying technology @@ -253,40 +242,37 @@ creates a set of *namespaces* for that container. This provides a layer of isolation: each aspect of a container runs in its own namespace and does not have access outside it. -Some of the namespaces that Docker uses on Linux are: +Some of the namespaces that Docker Engine uses on Linux are: - - **The `pid` namespace:** Used for process isolation (PID: Process ID). - - **The `net` namespace:** Used for managing network interfaces (NET: + - **The `pid` namespace:** Process isolation (PID: Process ID). + - **The `net` namespace:** Managing network interfaces (NET: Networking). - - **The `ipc` namespace:** Used for managing access to IPC + - **The `ipc` namespace:** Managing access to IPC resources (IPC: InterProcess Communication). - - **The `mnt` namespace:** Used for managing mount-points (MNT: Mount). - - **The `uts` namespace:** Used for isolating kernel and version identifiers. (UTS: Unix + - **The `mnt` namespace:** Managing mount-points (MNT: Mount). + - **The `uts` namespace:** Isolating kernel and version identifiers. (UTS: Unix Timesharing System). ### Control groups -Docker on Linux also makes use of another technology called `cgroups` or control groups. +Docker Engine on Linux also makes use of another technology called `cgroups` or control groups. A key to running applications in isolation is to have them only use the resources you want. This ensures containers are good multi-tenant citizens on a -host. Control groups allow Docker to share available hardware resources to +host. Control groups allow Docker Engine to share available hardware resources to containers and, if required, set up limits and constraints. For example, limiting the memory available to a specific container. ### Union file systems Union file systems, or UnionFS, are file systems that operate by creating layers, -making them very lightweight and fast. Docker uses union file systems to provide -the building blocks for containers. Docker can make use of several union file system variants +making them very lightweight and fast. Docker Engine uses union file systems to provide +the building blocks for containers. Docker Engine can make use of several union file system variants including: AUFS, btrfs, vfs, and DeviceMapper. ### Container format -Docker combines these components into a wrapper we call a container format. The +Docker Engine combines these components into a wrapper we call a container format. The default container format is called `libcontainer`. In the future, Docker may support other container formats, for example, by integrating with BSD Jails or Solaris Zones. ## Next steps -### Installing Docker -Visit the [installation section](installation/index.md#installation). - -### The Docker user guide -[Learn Docker in depth](userguide/index.md). +Read about [Installing Docker Engine](installation/index.md#installation). +Learn about the [Docker Engine User Guide](userguide/index.md).