diff --git a/_config.yml b/_config.yml index d83ad42277..c98454c44b 100644 --- a/_config.yml +++ b/_config.yml @@ -18,10 +18,6 @@ gems: - jekyll-seo-tag - jekyll-relative-links -webrick: - headers: - Cache-Control: 600 - defaults: - scope: diff --git a/_data/advisories.yaml b/_data/advisories.yaml index 50af4ac8bd..66a1e0a50a 100644 --- a/_data/advisories.yaml +++ b/_data/advisories.yaml @@ -15,7 +15,7 @@ texts: toolbox: "**Legacy desktop solution.** Docker Toolbox is for older Mac and Windows systems that do not meet the requirements of [Docker for Mac](/docker-for-mac/) and [Docker for Windows](/docker-for-windows/). We recommend updating to the newer applications, if possible." kitematic: "**Legacy desktop solution.** Kitematic is a legacy solution, bundled with [Docker Toolbox](/toolbox/overview/). We recommend updating to [Docker for Mac](/docker-for-mac/) or [Docker for Windows](/docker-for-windows/) if your system meets the requirements for one of those applications." swarm: "See [Swarm mode overview](/engine/swarm/) for the orchestration features introduced in Docker Engine 1.12. Only refer to the Docker Swarm documents below for information on the standalone Swarm product." - swarm-standalone: "**You are viewing docs for legacy standalone Swarm.** These topics describe standalone Docker Swarm. In Docker 1.12 and higher, [Swarm mode](/engine/swarm/) is integrated with Docker Engine. Most users should use integrated Swarm mode — a good place to start is [Getting started with swarm mode](/engine/swarm/swarm-tutorial/), [Swarm mode CLI commands](/engine/swarm/index.md#swarm-mode-cli-commands), and the advanced [Learn Docker sample app](/engine/getstarted-voting-app/). Standalone Docker Swarm is not integrated into the Docker Engine API and CLI commands." + swarm-standalone: "**You are viewing docs for legacy standalone Swarm.** These topics describe standalone Docker Swarm. In Docker 1.12 and higher, [Swarm mode](/engine/swarm/) is integrated with Docker Engine. Most users should use integrated Swarm mode — a good place to start is [Getting started with swarm mode](/engine/swarm/swarm-tutorial/), [Swarm mode CLI commands](/engine/swarm/index.md#swarm-mode-cli-commands), and the [Get started with Docker walkthrough](/get-started/)). Standalone Docker Swarm is not integrated into the Docker Engine API and CLI commands." engine: "This site contains documentation for the v1.12 release candidate version of Docker Engine. For the Docker Engine v1.11 docs, see [https://docs.docker.com/v1.11/](https://docs.docker.com/v1.11/). Docker for Mac and Docker for Windows are currently in Beta." cloud-swarm: "**Beta Feature.** Swarm Mode for Docker Cloud is currently a public Beta." diff --git a/_data/redirects.csv b/_data/redirects.csv index 3894ab2f38..803f91e8c5 100644 --- a/_data/redirects.csv +++ b/_data/redirects.csv @@ -1,5 +1,5 @@ /source,destination -/engine/quickstart/,/engine/getstarted/ +/engine/quickstart/,/get-started/ /engine/containers/,/engine/tutorials/ /win/,/docker-for-windows/ /mac/,/docker-for-mac/ diff --git a/_data/toc.yaml b/_data/toc.yaml index 7e204262b7..5cbf113836 100644 --- a/_data/toc.yaml +++ b/_data/toc.yaml @@ -129,42 +129,20 @@ guides: title: Docker release notes - sectiontitle: Get Started section: - - path: /learn/ - title: Learn Docker - - sectiontitle: Docker basics + - sectiontitle: "Get started with Docker" section: - - path: /engine/getstarted/ - title: Get started with Docker - - path: /engine/getstarted/step_one/ - title: Install Docker and run hello-world - - path: /engine/getstarted/step_two/ - title: Understand images & containers - - path: /engine/getstarted/step_three/ - title: Find & run the whalesay image - - path: /engine/getstarted/step_four/ - title: Build your own image - - path: /engine/getstarted/step_five/ - title: Create a Docker Hub account & repository - - path: /engine/getstarted/step_six/ - title: Tag, push, & pull your image - - path: /engine/getstarted/last_page/ - title: Learning more - - sectiontitle: Define and deploy your app - section: - - path: /engine/getstarted-voting-app/ - title: Sample app overview - - path: /engine/getstarted-voting-app/node-setup/ - title: Set up Dockerized machines - - path: /engine/getstarted-voting-app/create-swarm/ - title: Create a swarm - - path: /engine/getstarted-voting-app/deploy-app/ - title: Deploy the app - - path: /engine/getstarted-voting-app/test-drive/ - title: Try out the voting app - - path: /engine/getstarted-voting-app/customize-app/ - title: Customize the app and redeploy - - path: /engine/getstarted-voting-app/cleanup/ - title: Graceful shutdown, reboot, and clean-up + - title: "Part 1: Orientation" + path: /get-started/ + - title: "Part 2: Containers" + path: /get-started/part2/ + - title: "Part 3: Services" + path: /get-started/part3/ + - title: "Part 4: Swarms" + path: /get-started/part4/ + - title: "Part 5: Stacks" + path: /get-started/part5/ + - title: "Part 6: Deploy your app" + path: /get-started/part6/ - sectiontitle: Learn by example section: - path: /engine/tutorials/networkingcontainers/ @@ -175,8 +153,8 @@ guides: title: Docker overview - sectiontitle: User Guide section: - - path: /engine/userguide/intro/ - title: Introduction + - path: /engine/userguide/ + title: Overview - sectiontitle: Work with images section: - path: /engine/userguide/eng-image/dockerfile_best-practices/ diff --git a/_includes/content/docker_elevator_pitch.md b/_includes/content/docker_elevator_pitch.md deleted file mode 100644 index dbcf9a01e3..0000000000 --- a/_includes/content/docker_elevator_pitch.md +++ /dev/null @@ -1,10 +0,0 @@ -Docker provides a way to run applications securely isolated in a container, packaged -with all its dependencies and libraries. Because your application can always be -run with the environment it expects right in the build image, testing -and deployment is simpler than ever, as your build will be fully portable and ready -to run as designed in any environment. And because containers are lightweight and run -without the extra load of a hypervisor, you can run many applications that all rely -on different libraries and environments on a single kernel, each one never interfering -with the other. This allows you to get more out of your hardware by shifting the "unit -of scale" for your application from a virtual or physical machine, to a container -instance. diff --git a/_includes/content/typical_docker_workflow.md b/_includes/content/typical_docker_workflow.md deleted file mode 100644 index d97012fd6d..0000000000 --- a/_includes/content/typical_docker_workflow.md +++ /dev/null @@ -1,23 +0,0 @@ -### Typical Docker workflow - -① Get your code and its dependencies into Docker [containers](engine/getstarted/step_two.md). - -- [Write a Dockerfile](engine/getstarted/step_four.md) that -defines the execution environment and pulls in your code. - -- If your app depends on external services (such as Redis or MySQL), [find them on a registry like Docker Hub](docker-hub/repos.md), and refer to them in [a Docker Compose file](compose/overview.md), along with a call to your app, so they'll run simultaneously. - -- Software providers also distribute paid software on the [Docker Store](https://store.docker.com). - -- Build, then run your containers on a virtual host with [Docker Machine](machine/overview.md) as you develop. -

-② Configure [networking](engine/tutorials/networkingcontainers.md) and [storage](engine/tutorials/dockervolumes.md) for your solution, if needed. - -③ Upload builds to a registry ([ours](/engine/getstarted/step_six.md) or [yours](/datacenter/dtr/2.0/index.md)) or your cloud providers to collaborate with your team. - -④ -To run your app as a set of services across multiple hosts, [set up a Swarm cluster](/engine/swarm/index.md) and -[scale it to meet demand](/engine/swarm/swarm-tutorial/scale-service.md). Use [Universal Control Plane](/datacenter/ucp/1.1/overview.md) to manage your swarm in a friendly UI! - -⑤ -Deploy to your preferred cloud providers with [Docker Cloud](/docker-cloud/index.md), or use [Docker Datacenter](https://www.docker.com/products/docker-datacenter) to deploy to your own on-premise hardware. diff --git a/_includes/global-header.html b/_includes/global-header.html index ae0aebe05e..147b2d272e 100644 --- a/_includes/global-header.html +++ b/_includes/global-header.html @@ -57,7 +57,7 @@

Docker provides a way to run applications securely isolated in a container, packaged with all its dependencies and libraries.

diff --git a/compose/bundles.md b/compose/bundles.md index 47f617e184..d60f8289d4 100644 --- a/compose/bundles.md +++ b/compose/bundles.md @@ -27,12 +27,11 @@ stack files now are fully supported. A stack file is a particular type of [version 3 Compose file](/compose/compose-file/index.md). If you are just getting started with Docker and want to learn the best way to -deploy multi-service applications, a good place to start is the [Sample app -tutorial](/engine/getstarted-voting-app/index.md). This shows you how to define -a service configuration in a `docker-stack.yml` file, deploy the app, and use +deploy multi-service applications, a good place to start is the [Get Started +walkthrough](/get-started/). This shows you how to define +a service configuration in a Compose file, deploy the app, and use the relevant tools and commands. - ## Producing a bundle The easiest way to produce a bundle is to generate it using `docker-compose` @@ -213,7 +212,7 @@ A service has the following fields: ## Related topics -* [Sample app tutorial](/engine/getstarted-voting-app/index.md) +* [Get started walkthrough](/get-started/) * [docker stack deploy](/engine/reference/commandline/stack_deploy/) command diff --git a/compose/compose-file/index.md b/compose/compose-file/index.md index ccecaeb9c0..1734d79375 100644 --- a/compose/compose-file/index.md +++ b/compose/compose-file/index.md @@ -1532,8 +1532,6 @@ stack. - [User guide](/compose/index.md) - [Installing Compose](/compose/install/) - [Compose file versions and upgrading](compose-versioning.md) -- [Sample app with swarm mode](/engine/getstarted-voting-app/) -- [Get started with Django](/compose/django/) -- [Get started with Rails](/compose/rails/) -- [Get started with WordPress](/compose/wordpress/) +- [Get started with Docker](/get-started/) +- [Samples](/samples/) - [Command line reference](/compose/reference/) diff --git a/docker-for-mac/index.md b/docker-for-mac/index.md index 5ed31ecf1c..b9b376c337 100644 --- a/docker-for-mac/index.md +++ b/docker-for-mac/index.md @@ -93,7 +93,7 @@ docker-machine version 0.10.0, build 76ed2a6 want to keep some images around so that you don't have to pull them again from Docker Hub. To remove an image you no longer need, use `docker rmi` followed by an image ID or image name. For example, `docker rmi nginx`. -**Want more example applications?** [Learn Docker](/learn.md) is a great place to start. +**Want more example applications?** [Get Started](/get-started/) and [Samples](/samples/) are great places to start. ## Preferences @@ -382,13 +382,7 @@ Check out these [Docker Cloud topics](/docker-cloud/index.md) to learn more: ## Where to go next -* Try out the tutorials and sample app walkthroughs at [Learn Docker](/learn.md), including: - - * Learn Docker basics in [Getting Started with Docker](/engine/getstarted/index.md) - - * Learn how to [define and deploy a Docker stack to a swarm](/engine/getstarted-voting-app/index.md) - (deploy multiple containers as services and use new - Compose Version 3 features) +* Try out the walkthrough at [Get Started](/get-started/). * Dig in deeper with [Docker Labs](https://github.com/docker/labs/) example walkthroughs and source code. diff --git a/docker-for-mac/install.md b/docker-for-mac/install.md index 4e43e51757..893e35b90b 100644 --- a/docker-for-mac/install.md +++ b/docker-for-mac/install.md @@ -124,7 +124,7 @@ explanation and list of prerequisites. > instead of HyperKit. * **What the install includes**: The installation provides - [Docker Engine](/engine/userguide/intro/), Docker CLI client, + [Docker Engine](/engine/userguide/), Docker CLI client, [Docker Compose](/compose/overview/), and [Docker Machine](/machine/overview/). ## Install and Run Docker for Mac @@ -173,4 +173,4 @@ workarounds, how to run and submit diagnostics, and submit issues. * [Release Notes](release-notes.md) lists component updates, new features, and improvements associated with Stable and Edge releases. -* [Learn Docker](/learn.md) provides general Docker tutorials. +* [Get Started with Docker](/get-started/) provides a general Docker tutorial. diff --git a/docker-for-windows/index.md b/docker-for-windows/index.md index 9e06e9ea11..0dcc8903fe 100644 --- a/docker-for-windows/index.md +++ b/docker-for-windows/index.md @@ -227,7 +227,7 @@ The next few steps take you through some examples. These are just suggestions fo want to keep some images around so that you don't have to pull them again from Docker Hub. To remove an image you no longer need, use `docker rmi` followed by an image ID or image name. For example, `docker rmi nginx`. -**Want more example applications?** [Learn Docker](/learn.md) is a great place to start. +**Want more example applications?** [Get Started](/get-started/) and [Samples](/samples) are great places to start. ## Set up tab completion in PowerShell @@ -700,13 +700,7 @@ If you want to go back to using Docker Toolbox, you have to disable the Hyper-V ## Where to go next -* Try out the tutorials and sample app walkthroughs at [Learn Docker](/learn.md), including: - - * Learn Docker basics in [Getting Started with Docker](/engine/getstarted/index.md) - - * Learn how to [define and deploy a Docker stack to a swarm](/engine/getstarted-voting-app/index.md) - (deploy multiple containers as services and use new - Compose Version 3 features) +* Try out the walkthrough at [Get Started](/get-started/). * Dig in deeper with [Docker Labs](https://github.com/docker/labs/) example walkthroughs and source code. diff --git a/docker-for-windows/install.md b/docker-for-windows/install.md index 1947220406..191291eacb 100644 --- a/docker-for-windows/install.md +++ b/docker-for-windows/install.md @@ -114,7 +114,7 @@ on a VMWare or Parallels instance, might work, but come with no guarantees (i.e., not officially supported). For more information, see [Running Docker for Windows in nested virtualization scenarios](troubleshoot.md#running-docker-for-windows-in-nested-virtualization-scenarios)

-* **What the Docker for Windows install includes**: The installation provides [Docker Engine](/engine/userguide/intro.md), Docker CLI client, [Docker Compose](/compose/overview.md), and [Docker Machine](/machine/overview.md). +* **What the Docker for Windows install includes**: The installation provides [Docker Engine](/engine/userguide/), Docker CLI client, [Docker Compose](/compose/overview.md), and [Docker Machine](/machine/overview.md). ### About Windows containers and Windows Server 2016 @@ -165,11 +165,12 @@ Congratulations! You are up and running with Docker for Windows. basic Docker command examples, how to get help or give feedback, and links to all topics in the Docker for Windows guide. +* [Get started with Docker](/get-started/) teaches you how to define and deploy +applications with Docker. + * [Troubleshooting](troubleshoot.md) describes common problems, workarounds, how to run and submit diagnostics, and submit issues. * [FAQs](faqs.md) provides answers to frequently asked questions. * [Release Notes](release-notes.md) lists component updates, new features, and improvements associated with Stable and Edge releases. - -* [Learn Docker](/learn.md) provides general Docker tutorials. diff --git a/docker-hub/index.md b/docker-hub/index.md index 545d5f4091..d8f56615d6 100644 --- a/docker-hub/index.md +++ b/docker-hub/index.md @@ -65,9 +65,6 @@ Private repositories do not appear in the repository search results. To see all the repositories you can access and their status, view your "Dashboard" page on [Docker Hub](https://hub.docker.com). -You can find more information on working with Docker images in the -[Docker userguide](/engine/getstarted/step_four.md). - ### Use Official Repositories Docker Hub contains a number of [Official diff --git a/docker-hub/repos.md b/docker-hub/repos.md index 02dbb045ab..4e806e0b16 100644 --- a/docker-hub/repos.md +++ b/docker-hub/repos.md @@ -95,7 +95,6 @@ You can name your local images either when you build it, using by re-tagging an existing local image `docker tag /[:]`, or by using `docker commit /[:]` to commit changes. -See [Working with Docker images](/engine/getstarted/step_four.md) for a detailed description. Now you can push this repository to the registry designated by its name or tag. diff --git a/engine/examples/index.md b/engine/examples/index.md index 9c0818e59d..1725cdcca3 100644 --- a/engine/examples/index.md +++ b/engine/examples/index.md @@ -13,4 +13,4 @@ This section contains the following: * [Dockerizing a CouchDB service](couchdb_data_volumes.md) * [Dockerizing a Redis service](running_redis_service.md) * [Dockerizing an apt-cacher-ng service](apt-cacher-ng.md) -* [Dockerizing applications: A 'Hello world'](/engine/getstarted/step_one.md) +* [Get Started](/get-started/) diff --git a/engine/getstarted-voting-app/cleanup.md b/engine/getstarted-voting-app/cleanup.md deleted file mode 100644 index e78bfe97b5..0000000000 --- a/engine/getstarted-voting-app/cleanup.md +++ /dev/null @@ -1,175 +0,0 @@ ---- -description: Graceful shutdown, reboot, clean-up -keywords: voting app, docker-machine -title: Graceful shutdown, reboot, and clean-up ---- - -The voting app will continue to run on the swarm while the `manager` and -`worker` machines are running, unless you explicitly stop it. The following -topics explain how to stop and start the app, remove the app but keep the swarm, -or remove the machines entirely. - -## Stopping the voting app - -To shut down the voting app, simply stop the machines on which it is running. If -you are using local hosts, follow the steps below. If you are using cloud hosts, -stop them per your cloud setup. - -1. Open a terminal window and run `docker-machine ls` to list the current machines. - - ```none - $ docker-machine ls - NAME ACTIVE DRIVER STATE URL SWARM DOCKER ERRORS - manager - virtualbox Running tcp://192.168.99.100:2376 v1.13.1 - worker - virtualbox Running tcp://192.168.99.101:2376 v1.13.1 - ``` -2. Use `docker-machine stop` to shut down each machine, beginning with the worker. - - ```none - $ docker-machine stop worker - Stopping "worker"... - Machine "worker" was stopped. - - $ docker-machine stop manager - Stopping "manager"... - Machine "manager" was stopped. - ``` - -## Restarting the voting app - -If you want to come back to your `manager` and `worker` machines later, you can -keep them around. One advantage of this is that you can simply restart the -machines to launch the sample voting app again. - -To restart local machines, follow the steps below. To restart cloud instances, -start them per your cloud setup. - -1. Open a terminal window and list the machines. - - ```none - $ docker-machine ls - NAME ACTIVE DRIVER STATE URL SWARM DOCKER ERRORS - manager - virtualbox Stopped Unknown - worker - virtualbox Stopped Unknown - ``` - -3. Run `docker-machine start` to start each machine, beginning with the manager. - - ```none - $ docker-machine start manager - Starting "manager"... - (manager) Check network to re-create if needed... - (manager) Waiting for an IP... - Machine "manager" was started. - Waiting for SSH to be available... - Detecting the provisioner... - Started machines may have new IP addresses. You may need to re-run the `docker-machine env` command. - - $ docker-machine start worker - Starting "worker"... - (worker) Check network to re-create if needed... - (worker) Waiting for an IP... - Machine "worker" was started. - Waiting for SSH to be available... - Detecting the provisioner... - Started machines may have new IP addresses. You may need to re-run the `docker-machine env` command. - ``` - -3. Run the following commands to log into the manager and see if the swarm is up. - - ```none - docker-machine ssh manager - - docker@manager:~$ docker stack services vote - ID NAME MODE REPLICAS IMAGE - 74csdxb99tg9 vote_visualizer replicated 1/1 dockersamples/visualizer:stable - jm0g1vahcid9 vote_redis replicated 2/2 redis:alpine - mkk6lee494t4 vote_db replicated 1/1 postgres:9.4 - o3sl1wr35yd6 vote_worker replicated 1/1 dockersamples/examplevotingapp_worker:latest - qcc8dw2zafc1 vote_vote replicated 2/2 dockersamples/examplevotingapp_vote:after - x5wcvknlnnh7 vote_result replicated 1/1 dockersamples/examplevotingapp_result:after - ``` - -At this point, the app is back up. The web pages you looked at in the [test drive](test-drive.md) should be available, and you could experiment, modify the app, and [redeploy](customize-app.md). - -## Removing the voting app - -To remove the application, but keep the swarm running, do the following: - -1. Log into the manager with `docker-machine ssh manager`. - -2. Run `docker stack rm [APP-NAME]`, e.g., `docker stack rm vote`: - - ```none - docker@manager:~$ docker stack rm vote - Removing service vote_db - Removing service vote_redis - Removing service vote_worker - Removing service vote_vote - Removing service vote_result - Removing service vote_visualizer - Removing network vote_backend - Removing network vote_frontend - Removing network vote_default - docker@manager:~$ docker stack services vote - Nothing found in stack: vote - docker@manager:~$ docker node ls - ID HOSTNAME STATUS AVAILABILITY MANAGER STATUS - 1q0nmgrvbfk9kwj3r9lo85l94 * manager Ready Active Leader - a4zgsyk5upjfc4g6dv89seq69 worker Ready Active - ``` - - This removes the voting application and all its services from both manager and worker nodes. - -3. Run `docker stack services vote` to verify that the application was removed. - - ```none - docker@manager:~$ docker stack services vote - Nothing found in stack: vote - ``` - -4. Run `docker node ls` to verify that the swarm is still active on both nodes. - - ```none - docker@manager:~$ docker node ls - ID HOSTNAME STATUS AVAILABILITY MANAGER STATUS - 1q0nmgrvbfk9kwj3r9lo85l94 * manager Ready Active Leader - a4zgsyk5upjfc4g6dv89seq69 worker Ready Active - ``` - - You can re-use the [swarm](/engine/swarm/how-swarm-mode-works/nodes.md) in a -number of ways, such as redeploy this or another application, try a simple use -case to [deploy a single service to a swarm](/engine/swarm/services.md), or -[explore or reconfigure the swarm](/engine/swarm/manage-nodes.md). - -## Removing the machines - -If you don't need this swarm anymore and prefer to remove your local machines -altogether, use `docker-machine rm` to do so. (Or, `docker-machine rm -f` will -force-remove running machines.) - -```none -$ docker-machine rm worker -About to remove worker -WARNING: This action will delete both local reference and remote instance. -Are you sure? (y/n): y -Successfully removed worker - -$ docker-machine rm manager -About to remove manager -WARNING: This action will delete both local reference and remote instance. -Are you sure? (y/n): y -Successfully removed manager -``` - -The Docker images you pulled were all running on the virtual machines you -created (either local or cloud), so no other cleanup of images or processes is -needed once you stop and/or remove the virtual machines. - -## What's next? - -See the [Docker Machine topics](/machine/overview/) for more on working -with `docker-machine`. - -Check out the [list of resources](customize-app.md#resources) for more on Docker -labs, sample apps, and swarm mode. diff --git a/engine/getstarted-voting-app/create-swarm.md b/engine/getstarted-voting-app/create-swarm.md deleted file mode 100644 index 2a4a0c2d6b..0000000000 --- a/engine/getstarted-voting-app/create-swarm.md +++ /dev/null @@ -1,111 +0,0 @@ ---- -description: Setup for voting app example -keywords: multi-container, services, swarm mode, cluster, voting app -title: Create a swarm ---- - -Now, we'll add our Docker machines to a [swarm](/engine/swarm/index.md). - -## Initialize the swarm - -1. Log into the manager. - - ```none - $ docker-machine ssh manager - ## . - ## ## ## == - ## ## ## ## ## === - /"""""""""""""""""\___/ === - ~~~ {~~ ~~~~ ~~~ ~~~~ ~~~ ~ / ===- ~~~ - \______ o __/ - \ \ __/ - \____\_______/ - _ _ ____ _ _ - | |__ ___ ___ | |_|___ \ __| | ___ ___| | _____ _ __ - | '_ \ / _ \ / _ \| __| __) / _` |/ _ \ / __| |/ / _ \ '__| - | |_) | (_) | (_) | |_ / __/ (_| | (_) | (__| < __/ | - |_.__/ \___/ \___/ \__|_____\__,_|\___/ \___|_|\_\___|_| - - WARNING: this is a build from test.docker.com, not a stable release. - - Boot2Docker version 1.13.0-rc7, build HEAD : b2cde29 - Sat Jan 14 00:29:39 UTC 2017 - Docker version 1.13.0-rc7, build 48a9e53 - ``` - -2. Initialize a swarm. - - The command to initialize a swarm is: - - ```none - docker swarm init --advertise-addr - ``` - - >**Tip**: To get the IP address of the manager, use a terminal window - that is not `ssh`'ed into a virtual machine (or exit out of a current one), and type either `docker-machine ip manager` or `docker-machine ls`. Look back at [Verify machines are running and get IP addresses](node-setup.md#verify-machines-are-running-and-get-ip-addresses)) for examples. - - ```none - docker@manager:~$ docker swarm init --advertise-addr 192.168.99.100 - Swarm initialized: current node (2tjrasfqfu945b7n4753374sw) is now a manager. - - To add a worker to this swarm, run the following command: - - docker swarm join \ - --token SWMTKN-1-144pfsupfo25h43zzr6b6bghjson8uedxjsndo5vuehqlyarsk-9k4q84axm008whv9zl4a8m8ct \ - 192.168.99.100:2377 - - To add a manager to this swarm, run 'docker swarm join-token manager' and follow the instructions. - ``` - - >**Tip**: The next step is to log into the worker machine. You can either open a new shell, or exit out of the manager in the current shell by typing `exit`. - -### Add a worker node to the swarm - -1. Log into the worker machine. - - ```none - $ docker-machine ssh worker - ## . - ## ## ## == - ## ## ## ## ## === - /"""""""""""""""""\___/ === - ~~~ {~~ ~~~~ ~~~ ~~~~ ~~~ ~ / ===- ~~~ - \______ o __/ - \ \ __/ - \____\_______/ - _ _ ____ _ _ - | |__ ___ ___ | |_|___ \ __| | ___ ___| | _____ _ __ - | '_ \ / _ \ / _ \| __| __) / _` |/ _ \ / __| |/ / _ \ '__| - | |_) | (_) | (_) | |_ / __/ (_| | (_) | (__| < __/ | - |_.__/ \___/ \___/ \__|_____\__,_|\___/ \___|_|\_\___|_| - - WARNING: this is a build from test.docker.com, not a stable release. - - Boot2Docker version 1.13.0-rc7, build HEAD : b2cde29 - Sat Jan 14 00:29:39 UTC 2017 - Docker version 1.13.0-rc7, build 48a9e53 - ``` - -2. On the worker, run the `join` command given as the output of the `swarm init` command you ran on the manager. - - ```none - docker@worker:~$ docker swarm join \ - > --token SWMTKN-1-144pfsupfo25h43zzr6b6bghjson8uedxjsndo5vuehqlyarsk-9k4q84axm008whv9zl4a8m8ct \ - > 192.168.99.100:2377 - This node joined a swarm as a worker. - ``` - - If you don't have the command, run `docker swarm join-token worker` on a manager node to retrieve the `join` command for a worker for this swarm. - -### List the nodes in the swarm - -Log into the manager (e.g., `docker-machine ssh manager`) and run `docker node ls`. - -```none - docker@manager:~$ docker node ls -ID HOSTNAME STATUS AVAILABILITY MANAGER STATUS -2tjrasfqfu945b7n4753374sw * manager Ready Active Leader -syc46yimgtyz9ljcsfqiurvp0 worker Ready Active -``` - -## What's next? - -In the next step, we'll [deploy the voting app](deploy-app.md). diff --git a/engine/getstarted-voting-app/customize-app.md b/engine/getstarted-voting-app/customize-app.md deleted file mode 100644 index 1deb9c77eb..0000000000 --- a/engine/getstarted-voting-app/customize-app.md +++ /dev/null @@ -1,103 +0,0 @@ ---- -description: Customize the voting app -keywords: multi-container, services, swarm mode, cluster, voting app, docker-stack.yml, docker stack deploy -title: Customize the app and redeploy ---- - -In this step, we'll make a simple change to the application and redeploy it. -We'll change the focus of the poll from Cats or Dogs to .NET or Java. - -In the real world, you might do this by making code changes and rebuilding to -create new images, or new versions of the same images. - -For our example, we've done this for you. We already have a different version of -the application available as built images. So, all you need to do is reconfigure -`docker-stack.yml` to point to the new images, then redeploy. - -## Update docker-stack.yml to reference new images - -Go back to `docker-stack.yml` and replace the `before` tags on both the `vote` and `result` images to reference `after` tags. These new image tags will call different versions of the images. - -![before tags for vote and result in yml](images/customize-before.png) - -![after tags for vote and result in yml](images/customize-after.png) - -## Redeploy - -Run the same deploy command again to run the app with the new configuration. - -```none -docker stack deploy --compose-file docker-stack.yml vote -``` - -The output will look similar to this: - -```none -docker@manager:~$ docker stack deploy --compose-file docker-stack.yml vote -Updating service vote_redis (id: md73fohylg8q85aryz07852o0) -Updating service vote_db (id: gny9ieqxancnufrg1oeazz9gq) -Updating service vote_vote (id: 0ig0s4gb10q8auek9tris5i8z) -Updating service vote_result (id: lqwxjmmdhmegs2aw0a6ehipsp) -Updating service vote_worker (id: 8u4cfu60dtliz77x1o74kiwpr) -Updating service vote_visualizer (id: ya2vt9z2b4to248tccjjeqitw) -``` - -## Try it out - -Take the app for another test drive. - -You'll see the new voting choices for Java and .NET at `:5000`. - -![New voting page](images/vote-2.png) - -And the related results at `:5001`. - -![New results page](images/vote-results-2.png) - -The visualizer at `:8080` will show some differences, such as -updates to the containers, and some services might have moved between the -manager and the worker. - -However, the PostgreSQL container (`vote_db`) and the -visualizer (`vote_visualizer`) will still be running on the manager because of -the `[node.role == manager]` constraints on those services, which we -did not change. - -![New visualizer web page](images/visualizer-2.png) - -## Resources - -* [Introducing Docker 1.13.0](https://blog.docker.com/2017/01/whats-new-in-docker-1-13/) blog post -from [Docker Core Engineering](https://blog.docker.com/author/core_eng/) - -* A deeper dive voting app walkthrough is available on -[Docker Labs](https://github.com/docker/labs/) as [Deploying an app to a Swarm](https://github.com/docker/labs/blob/master/beginner/chapters/votingapp.md). -The lab walkthrough provides more technical detail on deployment configuration, -Compose file keys, the application, stack and services concepts, and -networking. - -* [Source code for the Voting App](https://github.com/docker/example-voting-app) (to go along with the lab walkthrough) is also available on Docker Labs. - -* The images you used are available on [Docker Hub](https://hub.docker.com/). When you ran `docker-stack.yml` you pulled those images from Docker Hub. - -* To learn how to build your own images, see -[Build your own image](/engine/getstarted/step_four.md) in Get Started with -Docker and topics on images in [Learn by example](/engine/tutorials/index.md). - -* For more about the `docker-stack.yml` and the `docker stack deploy` commands, -see [deploy](/compose/compose-file.md#deploy) in the Compose file reference and -[`docker stack deploy`](/engine/reference/commandline/stack_deploy.md) -in the Docker Engine command line reference. - -* To learn about all new features in Compose, see -[Compose file version 3 reference](/compose/compose-file/index.md) and -[Compose file versions and upgrading](/compose/compose-file/compose-versioning.md). - -* For more about swarm mode, start with the -[Swarm mode overview](/engine/swarm/index.md). - -* For information about Docker CE and Docker EE, see [Docker Community Edition](https://www.docker.com/community-edition) and [Docker Enterprise Edition](https://www.docker.com/enterprise-edition). - -## What's next? - -* To learn about shutting down the sample app and cleaning up, see [Graceful shutdown, reboot, and clean-up](cleanup.md). diff --git a/engine/getstarted-voting-app/deploy-app.md b/engine/getstarted-voting-app/deploy-app.md deleted file mode 100644 index 4c4b955678..0000000000 --- a/engine/getstarted-voting-app/deploy-app.md +++ /dev/null @@ -1,88 +0,0 @@ ---- -description: Setup for voting app example -keywords: multi-container, services, swarm mode, cluster, voting app, docker-stack.yml, docker stack deploy -title: Deploy the application ---- - -In these steps, you'll use the `docker-stack.yml` file to -deploy the voting application to the swarm you just created. - -## Copy docker-stack.yml to the manager - -The `docker-stack.yml` file must be located on a manager for the swarm where you want to deploy the application stack. - -1. [**Get the `docker-stack.yml`file**](https://github.com/docker/example-voting-app/blob/master/docker-stack.yml) from the source code in the lab. - - Copy-and-paste the contents of that file into a file of the same name on your host. - - >**Tip**: To avoid text encoding errors from a direct file download, especially on Windows, create the file directly in a Linux environment on your local machine and copy-paste the raw text from the original `docker-stack.yml`. A file downloaded on a Windows system might include `^M` line endings, which will prevent the app from running in the Docker Linux based environment. - -2. Copy `docker-stack.yml` from your host machine onto the manager. - - ``` - $ docker-machine scp ~/sandbox/voting-app/docker-stack.yml manager:/home/docker/ - docker-stack.yml 100% 1558 1.5KB/s 00:00 - ``` - -3. Log into the manager node. - - ``` - $ docker-machine ssh manager - ``` - - The `ssh` login should put you in `/home/docker/` by default. - -4. Check to make sure that the `.yml` file is there, using `ls`. - - ```none - docker@manager:~$ ls /home/docker/ - docker-stack.yml - ``` - -## Deploy the app - -We'll deploy the application from the manager. - -1. Deploy the application stack based on the `.yml` using the command -[`docker stack deploy`](/engine/reference/commandline/stack_deploy.md) as follows. - - ```none - docker stack deploy --compose-file docker-stack.yml vote - ``` - - * The `--compose-file` option specifies the path to our stack file. In this case, we assume it's in the current directory so we simply name the stack file: `docker-stack.yml`. - - * For the example, we name this app `vote`, but we could name it anything we want. - - Here is an example of the command and the output. - - ```none - docker@manager:~$ docker stack deploy --compose-file docker-stack.yml vote - Creating network vote_default - Creating network vote_backend - Creating network vote_frontend - Creating service vote_result - Creating service vote_worker - Creating service vote_visualizer - Creating service vote_redis - Creating service vote_db - Creating service vote_vote - ``` - -2. Verify that the stack deployed as expected with `docker stack services `. - - ```none - docker@manager:~$ docker stack services vote - ID NAME MODE REPLICAS IMAGE - 1zkatkq7sf8n vote_result replicated 1/1 dockersamples/examplevotingapp_result:after - hphnxyt93h42 vote_redis replicated 2/2 redis:alpine - jd0wafumrcil vote_vote replicated 2/2 dockersamples/examplevotingapp_vote:after - msief4cqme29 vote_visualizer replicated 1/1 dockersamples/visualizer:stable - qa6y8sfmtjoz vote_db replicated 1/1 postgres:9.4 - w04bh1vumnep vote_worker replicated 1/1 dockersamples/examplevotingapp_worker:latest - ``` - -## What's next? - -In the next steps, we'll view components of the running app -on web pages, and [take the app for a test drive](test-drive.md). diff --git a/engine/getstarted-voting-app/images/architecture.png b/engine/getstarted-voting-app/images/architecture.png deleted file mode 100644 index 6bbd6ca119..0000000000 Binary files a/engine/getstarted-voting-app/images/architecture.png and /dev/null differ diff --git a/engine/getstarted-voting-app/images/customize-after.png b/engine/getstarted-voting-app/images/customize-after.png deleted file mode 100644 index 5c1b4af1f0..0000000000 Binary files a/engine/getstarted-voting-app/images/customize-after.png and /dev/null differ diff --git a/engine/getstarted-voting-app/images/customize-before.png b/engine/getstarted-voting-app/images/customize-before.png deleted file mode 100644 index f9ea63bc3d..0000000000 Binary files a/engine/getstarted-voting-app/images/customize-before.png and /dev/null differ diff --git a/engine/getstarted-voting-app/images/customize-before.snagproj b/engine/getstarted-voting-app/images/customize-before.snagproj deleted file mode 100644 index 9253a0dd93..0000000000 Binary files a/engine/getstarted-voting-app/images/customize-before.snagproj and /dev/null differ diff --git a/engine/getstarted-voting-app/images/db-manager-constraint.png b/engine/getstarted-voting-app/images/db-manager-constraint.png deleted file mode 100644 index 3fc8c928f5..0000000000 Binary files a/engine/getstarted-voting-app/images/db-manager-constraint.png and /dev/null differ diff --git a/engine/getstarted-voting-app/images/diagram.svg b/engine/getstarted-voting-app/images/diagram.svg deleted file mode 100644 index 2f25fb5a96..0000000000 --- a/engine/getstarted-voting-app/images/diagram.svg +++ /dev/null @@ -1,13 +0,0 @@ -
swarm
voting app stack
manager node
worker node
vote service
results service
redis service
worker service
db service
visualizer service
worker
container
redis
container
results
container
results
container
vote
container
vote
container
visualizer
container
postgresql
container
\ No newline at end of file diff --git a/engine/getstarted-voting-app/images/replicas-constraint.png b/engine/getstarted-voting-app/images/replicas-constraint.png deleted file mode 100644 index b7f306bb44..0000000000 Binary files a/engine/getstarted-voting-app/images/replicas-constraint.png and /dev/null differ diff --git a/engine/getstarted-voting-app/images/visualizer-2.png b/engine/getstarted-voting-app/images/visualizer-2.png deleted file mode 100644 index 29ea9ca59e..0000000000 Binary files a/engine/getstarted-voting-app/images/visualizer-2.png and /dev/null differ diff --git a/engine/getstarted-voting-app/images/visualizer-manager-constraint.png b/engine/getstarted-voting-app/images/visualizer-manager-constraint.png deleted file mode 100644 index 76d604f050..0000000000 Binary files a/engine/getstarted-voting-app/images/visualizer-manager-constraint.png and /dev/null differ diff --git a/engine/getstarted-voting-app/images/visualizer.png b/engine/getstarted-voting-app/images/visualizer.png deleted file mode 100644 index 86bed62323..0000000000 Binary files a/engine/getstarted-voting-app/images/visualizer.png and /dev/null differ diff --git a/engine/getstarted-voting-app/images/vote-2.png b/engine/getstarted-voting-app/images/vote-2.png deleted file mode 100644 index bfff19f2df..0000000000 Binary files a/engine/getstarted-voting-app/images/vote-2.png and /dev/null differ diff --git a/engine/getstarted-voting-app/images/vote-app-diagram.png b/engine/getstarted-voting-app/images/vote-app-diagram.png deleted file mode 100644 index 9ffce3d7d9..0000000000 Binary files a/engine/getstarted-voting-app/images/vote-app-diagram.png and /dev/null differ diff --git a/engine/getstarted-voting-app/images/vote-app.sketch b/engine/getstarted-voting-app/images/vote-app.sketch deleted file mode 100644 index 174c9099f5..0000000000 Binary files a/engine/getstarted-voting-app/images/vote-app.sketch and /dev/null differ diff --git a/engine/getstarted-voting-app/images/vote-results-2.png b/engine/getstarted-voting-app/images/vote-results-2.png deleted file mode 100644 index 99ede76e91..0000000000 Binary files a/engine/getstarted-voting-app/images/vote-results-2.png and /dev/null differ diff --git a/engine/getstarted-voting-app/images/vote-results.png b/engine/getstarted-voting-app/images/vote-results.png deleted file mode 100644 index cfb7dae499..0000000000 Binary files a/engine/getstarted-voting-app/images/vote-results.png and /dev/null differ diff --git a/engine/getstarted-voting-app/images/vote.png b/engine/getstarted-voting-app/images/vote.png deleted file mode 100644 index 0cf3b7f3c4..0000000000 Binary files a/engine/getstarted-voting-app/images/vote.png and /dev/null differ diff --git a/engine/getstarted-voting-app/index.md b/engine/getstarted-voting-app/index.md deleted file mode 100644 index e5c236c52d..0000000000 --- a/engine/getstarted-voting-app/index.md +++ /dev/null @@ -1,158 +0,0 @@ ---- -description: overview of voting app example -keywords: docker-stack.yml, stack deploy, compose, multi-container, services, swarm mode, cluster, voting app, -title: Sample app overview ---- - -This example is built around a web-based voting application -that collects, tallies, and returns the results of votes -(for cats and dogs, or other choices you specify). The voting -app includes several services, each one running in its -own container. We'll deploy the app as a _stack_ to introduce -some new concepts surfaced in -[Compose Version 3](/compose/compose-file.md#version-3), and -also use [swarm mode](/engine/swarm/index.md), which is -cluster management and orchestration capability built into -Docker Engine. - -## Got Docker? - -If you haven't yet downloaded Docker or installed it, go to [Get -Docker](/engine/getstarted/step_one.md#step-1-get-docker) and grab Docker for -your platform. You can follow along and run this example using [Docker for Mac](/docker-for-mac/install.md), -[Docker for Windows](/docker-for-windows/install.md), [Docker Toolbox](/toolbox/overview.md), or [Docker for Linux](/engine/installation/linux/). - -If you are totally new to Docker, you might want to work through the [Get -Started with Docker tutorial](/engine/getstarted/index.md) first, then come -back here. - -## What you'll learn and do - -In this tutorial, you'll learn how to: - -* Use `docker machine` to create multiple virtual local hosts or -dockerized cloud servers -* Use `docker` commands to set up and run a swarm with manager and worker nodes -* Deploy the `vote` app services across the two nodes by feeding our example `docker-stack.yml` file to -the `docker stack deploy` command -* Test the app by voting for cats and dogs, and view the results -* Use the `visualizer` to explore and understand the runtime app and services -* Update the `docker-stack.yml` and redeploy the app using a different -`vote` image to implement a poll on different choices -* Use features new in Compose Version 3, highlighted in the sample app - -## Preview of voting app stack and how it works - -These next few topics provide a quick tour of the services, deployment configuration, files, and commands we will use. - -This diagram represents the application stack at runtime. It shows -dependencies among the services, and a potential division of services between -the manager and worker nodes in a swarm. As you'll discover in the tutorial, -some services are constrained to always run on a manager node, while others can -run on either a manager or workers, at the discretion of swarm load balancing. - -![voting app diagram](images/vote-app-diagram.png) - -### Services and images overview - -A [service](/engine/reference/glossary.md#service) is a bit of executable code -designed to accomplish a specific task. A service can run in one or more -containers. Defining a service configuration for your app (above and beyond -`docker run` commands in a Dockerfile) enables you to deploy the app to a swarm -and manage it as a distributed, multi-container application. - -The voting app you are about to deploy is made up of several services, each -based on an [image](/engine/reference/glossary.md#image) that the app will pull -from [Docker Hub](/engine/reference/glossary.md#docker-hub) at runtime: - -| Service | Description | Base Image on Docker Hub | -| ------------- |--------------| -----| -| `vote` | Displays the web page where you cast your vote at `:5000` | Based on a Python image, [dockersamples/examplevotingapp_vote](https://hub.docker.com/r/dockersamples/examplevotingapp_vote/) | -| `result` | Shows the voting results in a web browser at `:5001` | Based on a Node.js image, [dockersamples/examplevotingapp_result](https://hub.docker.com/r/dockersamples/examplevotingapp_result/) | -| `visualizer` | Shows a realtime map of services deployed across the available nodes, viewable at `:8080` | Based on a Node.js image, [dockersamples/visualizer](https://hub.docker.com/r/dockersamples/visualizer/) | -| `redis` | Collects raw voting data and stores it in a key/value queue | Based on the Alpine version of the official `redis` image, [redis:alpine](https://hub.docker.com/_/redis/) | -| `db` | A PostgreSQL service which provides permanent storage on a host volume | Based on the official `postgres` image, [postgres:9.4](https://hub.docker.com/_/postgres/) | -| `worker` | A background service that transfers votes from the queue to permanent storage | Based on a .NET image, [dockersamples/examplevotingapp_worker](https://hub.docker.com/r/dockersamples/examplevotingapp_worker/) | - -Each service will run in its own [container](/engine/reference/glossary.md#container). Using swarm mode, -we can also scale the application to deploy replicas -of containerized services distributed across multiple nodes. - -### docker-stack.yml deployment configuration file - -In the Getting Started with Docker tutorial, you wrote a -[Dockerfile for the whalesay app](/engine/getstarted/step_four.md) then used -it to build a single image and run it as a single container. - -For this tutorial, the images are pre-built, and we use a _stack file_ instead -of a Dockerfile to specify the images. When we deploy, each image will run as a -service in a container (or in multiple containers, for those that have replicas -defined to scale the app). - -To follow along, you need only have Docker running and a copy of the -`docker-stack.yml` -file that we provide. - -This file defines all the services we want to use along with details about how -and where those services will run; their base images, configuration -details such as ports, networks, volumes, application dependencies, and the -swarm configuration. - -This **example snip-it** taken from our `docker-stack.yml` shows one of the -services fully defined. (The full file is -[**here**](https://github.com/docker/example-voting-app/blob/master/docker-stack.yml).) - -``` -vote: - image: dockersamples/examplevotingapp_vote:before - ports: - - 5000:80 - networks: - - frontend - depends_on: - - redis - deploy: - replicas: 2 - update_config: - parallelism: 2 - restart_policy: - condition: on-failure -``` - -* The **image** key defines which image the service will use. The `vote` service -uses `dockersamples/examplevotingapp_vote:before`. This specifies the path to -the image on Docker Hub (as shown in the table above), and an [image -tag](/engine/reference/commandline/tag.md), `before` to indicate the version of -the image we want to start with. In the second part of the tutorial, we will -edit this file to call a different version of this image with an `after` tag. - -* The **depends_on** key allows you to specify that a service is only -deployed after another service. In our example, `vote` only deploys -after `redis`. - -* The **deploy** key specifies aspects of a swarm deployment. For example, -in this configuration we create _replicas_ of the `vote` service (2 containers -for `vote` will be deployed to the swarm). The `result` service, not shown in -the file snip-it above, will also have 2 replicas. Additionally, we will use the -`deploy` key to constrain some other services (`db` and `visualizer`) to run -only on a manager node. - - -### docker stack deploy command - -To deploy the voting app, we will run the [`docker stack -deploy`](/engine/reference/commandline/stack_deploy.md) command with appropriate -options, using the configuration in our `docker-stack.yml` file to pull the -referenced images and launch the services in a swarm. - -### Where to learn more - -If you are interested in reading more about Compose version 3.x, stack files, -Docker Engine 1.13.x, swarm mode integration, Docker CE, or Docker EE, jump -to the [list of resources](customize-app.md#resources) at the end of this -tutorial. - -## What's next? - -Ready to get started? In the next step, we'll [set up two Dockerized -hosts](node-setup.md). diff --git a/engine/getstarted-voting-app/node-setup.md b/engine/getstarted-voting-app/node-setup.md deleted file mode 100644 index 38b0506bee..0000000000 --- a/engine/getstarted-voting-app/node-setup.md +++ /dev/null @@ -1,247 +0,0 @@ ---- -description: Setup for voting app example -keywords: docker-machine, multi-container, services, swarm mode, cluster, voting app -title: Set up Dockerized machines ---- - -The first step in getting the voting app deployed is to set up Docker machines -for the swarm nodes. You could create these Docker hosts on different physical -machines, virtual machines, or cloud providers. - -For this example, we use [Docker Machine](/machine/get-started.md) to create two -virtual machines on a single system. We'll also verify the setup, and -run some basic commands to interact with the machines. - -## Prerequisites - -* **Docker Machine** - These steps rely on use of -[Docker Machine](/machine/get-started.md) (`docker-machine`), which -comes auto-installed with both Docker for Mac and Docker for Windows. It is also -available with [Docker Toolbox](/toolbox/overview.md), a good solution especially for earlier Windows operating systems, as described below. - -

- -* **VirtualBox driver on Docker for Mac** - On [Docker for Mac](docker-for-mac/index.md), you'll -use `docker-machine` with the `virtualbox` driver to create machines. If you had -a legacy installation of Docker Toolbox, you already have Oracle VirtualBox -installed as part of that. If you started fresh with Docker for Mac, then you -need to install VirtualBox independently. We recommend doing this rather than -using the Toolbox installer because it can -[conflict](/docker-for-mac/docker-toolbox.md) with Docker for Mac. You can -[download VirtualBox for `OS X hosts` -here](https://www.virtualbox.org/wiki/Downloads), and follow install -instructions. You do not need to start VirtualBox. The `docker-machine create` -command will call it via the driver. - -

- -* **Hyper-V driver on Docker for Windows** - On [Docker for Windows](docker-for-windows/index.md), you -will use `docker-machine` with the [`Hyper-V`](/machine/drivers/hyper-v/) driver -to create machines. You will need to follow the instructions in the [Hyper-V -example](/machine/drivers/hyper-v#example) reference topic to set up a new -external network switch (a one-time task), reboot, and then -[create the machines (nodes)](/machine/drivers/hyper-v.md#create-the-nodes-with-docker-machine-and-the-microsoft-hyper-v-driver) -in an elevated PowerShell per those instructions. - -

- -* **Docker Toolbox and VirtualBox driver on Windows 7 or 8** - Docker for Windows requires Windows 10 Pro (see system requirements [What to know before -you install](/docker-for-windows/install.md#what-to-know-before-you-install)). -If your system is running an earlier version of Windows, you can run Docker by -installing [Docker Toolbox](/toolbox/toolbox_install_windows.md), which includes -`docker-machine` and Oracle VirtualBox. You'll use the `virtualbox` driver to -create machines. - -### Commands to create machines - -The Docker Machine commands to create local virtual machines on Mac and Windows -are as follows. - -#### Mac - -```none -docker-machine create --driver virtualbox MACHINE-NAME -``` - -#### Windows (Running Docker for Windows) - -This must be done in an elevated PowerShell, using a custom-created external -network switch. See [Hyper-V example](/machine/drivers/hyper-v#example). - -```none -docker-machine create -d hyperv --hyperv-virtual-switch "NETWORK-SWITCH" -MACHINE-NAME -``` - -#### Windows 7 or 8 (Running Docker Toolbox) - -```none -docker-machine create --driver virtualbox MACHINE-NAME -``` - -## Create manager and worker machines - -Create two machines and name them to anticipate what their roles will be in the -swarm: - -* manager - -* worker - -Here is an example of creating the `manager` on Docker for Mac. Create this one, -then do the same for `worker`. - -```none -$ docker-machine create --driver virtualbox manager -Running pre-create checks... -Creating machine... -(manager) Copying /Users/victoria/.docker/machine/cache/boot2docker.iso to /Users/victoria/.docker/machine/machines/manager/boot2docker.iso... -(manager) Creating VirtualBox VM... -(manager) Creating SSH key... -(manager) Starting the VM... -(manager) Check network to re-create if needed... -(manager) Waiting for an IP... -Waiting for machine to be running, this may take a few minutes... -Detecting operating system of created instance... -Waiting for SSH to be available... -Detecting the provisioner... -Provisioning with boot2docker... -Copying certs to the local machine directory... -Copying certs to the remote machine... -Setting Docker configuration on the remote daemon... -Checking connection to Docker... -Docker is up and running! -To see how to connect your Docker Client to the Docker Engine running on this virtual machine, run: docker-machine env manager -``` - -## Verify machines are running and get IP addresses - -Use `docker-machine ls` to verify that the machines are -running and to get their IP addresses. - -```none -$ docker-machine ls -NAME ACTIVE DRIVER STATE URL SWARM DOCKER ERRORS -manager * virtualbox Running tcp://192.168.99.100:2376 v17.03.0-ce -worker - virtualbox Running tcp://192.168.99.101:2376 v17.03.0-ce -``` - -You now have two "Dockerized" machines, each running -Docker Engine, accessible through the -[Docker CLI](/engine/reference/commandline/docker.md), and available -to become swarm nodes. - -You can also get the IP address of a particular machine: - -```none -$ docker-machine ip manager -192.168.99.100 -``` - -You will need the IP address of the manager for a later step. - -## Interacting with the machines - -There are a few ways to interact with these machines directly on the command -line or programatically. We'll cover two methods for managing the machines -directly from the command line. We will use the second of these two methods for the tutorial (`docker ssh`), but it is worth learning both if you have time. - -* [Manage the machines from a pre-configured shell](#manage-the-machines-from-a-pre-configured-shell) - -* [`docker ssh` into a machine](#ssh-into-a-machine) - -#### Manage the machines from a pre-configured shell - -You can use `docker-machine` to set up environment variables in a shell that -connect to the Docker client on a virtual machine. With this setup, the Docker -commands you type in your local shell will run on the given machine. As an -example, we'll set up a shell to talk to our manager machine. - -1. Run `docker-machine env manager` to get environment variables for the manager. - - ```none - $ docker-machine env manager - export DOCKER_TLS_VERIFY="1" - export DOCKER_HOST="tcp://192.168.99.100:2376" - export DOCKER_CERT_PATH="/Users/victoriabialas/.docker/machine/machines/manager" - export DOCKER_MACHINE_NAME="manager" - export DOCKER_API_VERSION="1.25" - # Run this command to configure your shell: - # eval $(docker-machine env manager) - ``` - -2. Connect your shell to the manager. - - On Mac: - - ```none - $ eval $(docker-machine env manager) - ``` - - On Windows PowerShell: - - ```none - & docker-machine.exe env manager | Invoke-Expression - ``` - - This sets [environment variables](/machine/reference/env.md) for the current -shell. The rest of the `docker-machine` commands we cover are the same on both -Mac and Windows. - -3. Run `docker-machine ls` again. - - ```none - $ docker-machine ls - NAME ACTIVE DRIVER STATE URL SWARM DOCKER ERRORS - manager * virtualbox Running tcp://192.168.99.100:2376 v1.13.0-rc6 - worker - virtualbox Running tcp://192.168.99.101:2376 v1.13.0-rc6 - ``` - - The asterisk next `manager` indicates that the current shell is connected to -that machine. Docker commands run in this shell will execute on the `manager.` -(Note that you could change this by re-running the above commands to connect to -the `worker`, or open multiple terminals to talk to multiple machines.) - -If you use this method, you'll need to re-configure the environment setup each -time you want to switch between the manager and the worker, or keep two shells -open. - -#### ssh into a machine - -Alternatively, you can use the command `docker-machine ssh ` to -log into a machine. - -```none -$ docker-machine ssh manager - ## . - ## ## ## == - ## ## ## ## ## === - /"""""""""""""""""\___/ === - ~~~ {~~ ~~~~ ~~~ ~~~~ ~~~ ~ / ===- ~~~ - \______ o __/ - \ \ __/ - \____\_______/ - _ _ ____ _ _ -| |__ ___ ___ | |_|___ \ __| | ___ ___| | _____ _ __ -| '_ \ / _ \ / _ \| __| __) / _` |/ _ \ / __| |/ / _ \ '__| -| |_) | (_) | (_) | |_ / __/ (_| | (_) | (__| < __/ | -|_.__/ \___/ \___/ \__|_____\__,_|\___/ \___|_|\_\___|_| - - WARNING: this is a build from test.docker.com, not a stable release. - -Boot2Docker version 1.13.0-rc6, build HEAD : 5ab2289 - Wed Jan 11 23:37:52 UTC 2017 -Docker version 1.13.0-rc6, build 2f2d055 -``` - -You _do not_ have to set up `docker-machine` environment variables, as in the -previous section, for `docker ssh` to work. You can run this command in that -same shell you configured to talk to the manager, or in a new one, and it will -work either way. - -This tutorial will employ the `docker ssh` method to run commands on the -machines, but which approach you use is really a matter of personal preference. - -## What's next? - -In the next step, we'll [create a swarm](create-swarm.md) across these two -Docker machines. diff --git a/engine/getstarted-voting-app/test-drive.md b/engine/getstarted-voting-app/test-drive.md deleted file mode 100644 index a62b1fd5f1..0000000000 --- a/engine/getstarted-voting-app/test-drive.md +++ /dev/null @@ -1,70 +0,0 @@ ---- -description: Setup for voting app example -keywords: multi-container, services, swarm mode, cluster, voting app, docker-stack.yml, docker stack deploy -title: Try it out and vote ---- - -Now that the app is up and running, let's try it out. - -We will vote for cats and dogs, view the -results, and monitor the manager and -worker nodes, containers and services on a visualizer. - -## Vote for cats and dogs - -Go to `:5000` in a web browser to view the voting page from a user perspective. - -![Voting web page](images/vote.png) - -Click on either cats or dogs to vote. - -## View the results tally - -Now, go to `:5001` in a web browser to view the voting results -tally, as one might do in the role of poll coordinator. The tally is shown by -percentage in the current configuration of the app. (The voting app sample -accepts only one vote per client, so you won't be able to see your multiple -votes.) - -![Results web page](images/vote-results.png) - ->**Tip**: To get the IP address of the manager, open a terminal window that -is not `ssh`'ed into a virtual machine (or exit out of a current one), and -type either `docker-machine ip manager` or `docker-machine ls`. Look back at -[Verify machines are running and get IP addresses](node-setup.md#verify-machines-are-running-and-get-ip-addresses)) for -examples. - -## Use the visualizer to monitor the app - -Go to `:8080` to get a visual map of how the application is -deployed. - -![Visualizer web page](images/visualizer.png) - -This surfaces some configuration and characteristics from -[docker-stack.yml](index.md#docker-stackyml), and you can see those strategies in -action here. For example: - -* We have two nodes running: a `manager` and a `worker`. - -* The manager node is running the PostgreSQL container, as configured by setting `[node.role == manager]` as a constraint in the deploy key for the `db` service. This service must be constrained to run on the manager in order to work properly. - - ![node role manager](images/db-manager-constraint.png) - -* The manager node is also running the visualizer itself, as configured by setting `[node.role == manager]` as a constraint in the deploy key for the `visualizer` service. This service must be constrained to run on the manager in order to work properly. If you remove the constraint, and it ends up on a worker, the web page display will be blank. - - ![visualizer role manager](images/visualizer-manager-constraint.png) - -* Two of the services are replicated: - - * `vote` (represented in the visualizer by `vote_vote`) - * `redis` (represented in the visualizer by `vote_redis`) - - Both of these services are configured as `replicas: 2` under - the `deploy` key. In the current state of this app (shown in the visualizer), one of each of these containers is running on a manager and on a worker. However, since neither are explicitly constrained to either node in `docker-stack.yml`, all or some of these services could be running on either node, depending on workload and re-balancing choices we've left to the swarm orchestration. - - ![replicas](images/replicas-constraint.png) - -## What's next? - -In the next steps, we'll [customize the app](customize-app.md) and redeploy it. diff --git a/engine/getstarted/index.md b/engine/getstarted/index.md deleted file mode 100644 index cf9a76399c..0000000000 --- a/engine/getstarted/index.md +++ /dev/null @@ -1,56 +0,0 @@ ---- -description: Getting started with Docker -keywords: beginner, getting started, Docker -redirect_from: -- /mac/started/ -- /windows/started/ -- /linux/started/ -- /getting-started/ -title: Get started with Docker ---- - -This is a tutorial for non-technical users who are interested in learning more about Docker. By following these steps, you'll learn fundamental Docker features while working through some simple tasks. - -Depending on how you got here, you may or may not have already downloaded Docker for your platform and installed it. - -## Got Docker? - -If you haven't yet downloaded Docker for your platform or installed it, go to [Get Docker](step_one.md#step-1-get-docker). - -## Ready to start working with Docker? - -If you have already downloaded and installed Docker, you are ready to run Docker commands! Go to [Verify your installation](step_one.md#step-3-verify-your-installation). - - -### What you'll learn and do - -You'll learn how to: - -* install Docker software for your platform -* run a software image in a container -* browse for an image on Docker Hub -* create your own image and run it in a container -* create a Docker Hub account and an image repository -* create an image of your own -* push your image to Docker Hub for others to use - -The getting started was user tested to reduce the chance of users having problems. For the best chance of success, follow the steps as written the first time before exploring on your own. It takes approximately 45 minutes to complete. - -## Flavors of Docker - -This tutorial is designed as a getting started with Docker, and works the same whether you are using Docker for Mac, Docker for Windows, Docker on Linux, or Docker Toolbox (for older Mac and Windows systems). - -If you are using Docker Toolbox, you can use the Docker Quickstart Terminal to run Docker commands in a pre-configured environment instead of opening a command line terminal. - -If you are using Docker for Mac, Docker for Windows, or Docker on Linux, you will have Docker running in the background, and your standard command line terminal is already set up to run Docker commands. - -## How much command line savvy do I need? - -The getting started tour uses Docker Engine CLI commands entered on the command line of a terminal window. You don't need to be a wizard at the command line, but you should be familiar with how to open your favorite shell or terminal, and run basic commands in that environment. It helps (but isn't required) to know how to navigate a directory tree, manipulate files (move, copy, edit, save, read), list running processes, and so forth. - -## Where to go next - -Go to [the next page to install](step_one.md). - - -  diff --git a/engine/getstarted/last_page.md b/engine/getstarted/last_page.md deleted file mode 100644 index 9e9207bbbe..0000000000 --- a/engine/getstarted/last_page.md +++ /dev/null @@ -1,43 +0,0 @@ ---- -description: Getting started with Docker -keywords: beginner, getting started, Docker -redirect_from: -- /mac/last_page/ -- /windows/last_page/ -- /linux/last_page/ -title: Learn more -notoc: true ---- - -This tutorial provided very basic essentials for using Docker. If you want to -learn more about end-to-end development, start with the full install -instructions and feature overviews in the platform-specific guides, then follow -up with more advanced tutorials and user guides. - -Depending on your interest, the Docker documentation contains a wealth of -information. Here are some places to start: - -* **[Docker Overview](/engine/docker-overview.md)**: More about Docker images, - containers, and internals - -* **[Define and deploy apps in swarm mode](/engine/getstarted-voting-app.md)**: - Get started with [swarm mode](/engine/reference/glossary.md#swarm), Docker's - orchestration model. - -* **[Samples and labs](/samples/)**: A palette of sample applications and - training labs from Docker and community contributors. - -* **[Learn by example](/engine/tutorials/)**: A more in-depth exploration of - concepts introduced in the basic getting started: running containers, building - your own images, networking containers, managing data for containers, and - storing images on Docker Hub. - -* **Platform-specific Getting-Started guides**: Installation, release notes, - basic command-line examplees, and more for your specific platform: - - - [Get started with Docker for Mac](/docker-for-mac/) - - [Get started with Docker for Windows](/docker-for-windows/) - - [Get started with Docker Toolbox](/toolbox/overview/) (legacy for older platforms) - - [Get started with Docker for Linux](/engine/installation/linux/) -* **[Information about Docker products](http://www.docker.com/products)**: - Information about the full line of Docker products and services. diff --git a/engine/getstarted/linux_install_help.md b/engine/getstarted/linux_install_help.md deleted file mode 100644 index c06604f0b4..0000000000 --- a/engine/getstarted/linux_install_help.md +++ /dev/null @@ -1,74 +0,0 @@ ---- -description: Getting started with Docker -keywords: beginner, getting started, Docker, install -redirect_from: -- /mac/started/ -title: Install Docker using a shell script ---- - -This installation procedure for users who don't want to use a package manager to -install Docker. The script works on a "best effort" basis to determine your -operating system and environment, and attempts to provide reasonable defaults. -The script may allow you to install Docker in environments that are not actually -supported configurations. - -If you can use a package manager, you should use the -[recommended installation procedure for your operating system](/engine/installation/) -instead. Using a package manager ensures that you get upgrades when they are -available, and allows you to install a specific version of Docker, rather than -the very latest version. - -## Prerequisites - -- You need `sudo` access on Linux, or administrator access on Windows. -- You need `curl` or `wget` installed. These instructions use `curl`, but you - can adapt them to use `wget`. - -## Install Docker using the `install.sh` script - -> **Warning**: Always examine shell scripts you download from the internet before -> running them. - -1. Open [https://get.docker.com](https://get.docker.com/) in your web browser - so that you can examine the script before running it. This is important - because the script will run with elevated privileges. - -2. Run the script, using `curl` to download it and piping it through `sh`: - - ```bash - $ curl -fsSL https://get.docker.com/ | sh - ``` - - You are prompted for your `sudo` password. The script determines your - operating system, downloads and installs Docker and its dependencies, starts - Docker, and attempts to configure your operating system to start Docker - automatically. - - > **Note**: Ubuntu or Debian users whose host is behind a filtering proxy - > may experience failure of the `apt-key` step during Docker installation. - > To work around this, use the following command to manually add the Docker - > key: - > - > $ curl -fsSL https://get.docker.com/gpg | sudo apt-key add - - - 3. On Ubuntu or Debian systems, the script attempts to start Docker and to - configure the system to start Docker automatically. On RPM-based platforms, - use the following command to start Docker: - - ```bash - $ sudo systemctl start docker - ``` - - If you have an older system that does not have `systemctl`, use the - `service` command instead: - - ```bash - $ sudo service docker start - ``` - - To configure Docker to start automatically on RPM-based systems, see - [Configure Docker to start on boot](/engine/installation/linux/linux-postinstall.md#configure-docker-to-start-on-boot). - - 4. If you installed using this mechanism, Docker will not be upgraded - automatically when new versions are available. Instead, repeat this - procedure to upgrade Docker. diff --git a/engine/getstarted/step_five.md b/engine/getstarted/step_five.md deleted file mode 100644 index b44a6549ff..0000000000 --- a/engine/getstarted/step_five.md +++ /dev/null @@ -1,58 +0,0 @@ ---- -description: Getting started with Docker -keywords: beginner, getting started, Docker -redirect_from: -- /mac/step_five/ -- /windows/step_five/ -- /linux/step_five/ -title: Create a Docker Hub account and repository ---- - -You've built something really cool, you should share it. In this next section, -you'll do just that. First, you'll create a Docker ID account. Then, you'll push -your image to a repository on Docker Hub so other people with Docker Engine can -run it. - - -## Step 1: Sign up for an account - -1. In your web browser, go to the Docker Hub signup page. - - Your browser displays the page. - - ![Docker Hub signup](tutimg/hub_signup.png) - -2. Enter a new Docker ID (username), and email address, and a password. - -3. Click **Sign Up**. - - The browser displays a "Welcome to Docker Hub" page. - -## Step 2: Verify your email and add a repository - -Before you can share anything on Docker Hub, you need to verify your email address. - -1. Go to your email, and look for the email titled `Please confirm email for your Docker ID`. - - If you don't see the email, check your Spam folder or wait a moment for the email to arrive. - -2. Open the email and click **Confirm Your Email**. - - The browser opens Docker Hub to your profile page. - -4. From that page, choose **Create Repository**. - -5. Enter a Repository Name and Short Description. - -6. Make sure the repo **Visibility** is set to **Public**. - - When you are done, your form should look similar to the following: - - ![Add repo](tutimg/add_repository.png) - -6. Press **Create** to save your entries and create the new repository. - -## Where to go next - -On this page, you created a Docker ID, navigated to your Docker Hub account and created a new repository. -In the next section, you populate the repository [by tagging and pushing the image you created earlier](step_six.md). diff --git a/engine/getstarted/step_four.md b/engine/getstarted/step_four.md deleted file mode 100644 index 2b62c4d24b..0000000000 --- a/engine/getstarted/step_four.md +++ /dev/null @@ -1,327 +0,0 @@ ---- -redirect_from: -- /mac/step_four/ -- /windows/step_four/ -- /linux/step_four/ -- /engine/tutorials/dockerimages/ -- /userguide/dockerimages/ -- /engine/userguide/dockerimages/ -description: Getting started with Docker -keywords: beginner, getting started, Docker -title: Build your own image ---- - -The `whalesay` image could be improved. It would be nice if you didn't have to -think of something to say and you didn't need to type as much to get `whalesay` -to talk. - -```bash -docker run docker/whalesay cowsay boo-boo -``` - -In this next section, you will improve the `whalesay` image by building a new -version that "talks on its own" and requires fewer words to run. - -## Step 1: Write a Dockerfile - -In this step, you use a text editor to write a short -[Dockerfile](/engine/reference/builder.md). A Dockerfile -is a recipe which describes the files, environment, and commands that make up an -image. Your recipe is going to be very short. - -You run these steps in a terminal window on Linux or macOS, or a command prompt -on Windows. Remember that if you are using macOS or Windows, you are still -creating an image which runs on Linux. - -1. Make a new directory. If you're on Windows, use `md` instead of `mkdir`. - - ```bash - $ mkdir mydockerbuild - ``` - - This directory will contain all the things you need to build your image. - Right now, it's empty. - -2. Change to your new directory. Whether you're on Linux, macOS, or Windows, - the `cd` command is the same. - - ```bash - $ cd mydockerbuild - ``` - -3. Edit a new text file named `Dockerfile` in the current directory, using a - text editor such as `nano` or `vi` on Linux or Mac, or `notepad` on Windows. - - **Linux or Mac**: - - ```bash - $ nano Dockerfile - ``` - - **Windows**: The `.` tells `notepad` not to add a `.txt` extension. - - ```none - C:\> notepad Dockerfile. - ``` - -4. Add a `FROM` statement by copying the following line into the file: - - ```Dockerfile - FROM docker/whalesay:latest - ``` - - The `FROM` keyword tells Docker which image your image is based on. - Whalesay is cute and has the `cowsay` program already, so we'll start - there. - -5. Add a `RUN` statement which will install the `fortunes` program into the - image. - - ```Dockerfile - RUN apt-get -y update && apt-get install -y fortunes - ``` - - The `whalesay` image is based on Ubuntu, which uses `apt-get` to install - packages. These two commands refresh the list of packages available to the - image and install the `fortunes` program into it. The `fortunes` program - prints out wise sayings for our whale to say. - -6. Add a `CMD` statement, which tells the image the final command to run after - its environment is set up. This command runs `fortune -a` and sends its - output to the `cowsay` command. - - ```Dockerfile - CMD /usr/games/fortune -a | cowsay - ``` - -7. Check your work. Your file should look just like this: - - ```Dockerfile - FROM docker/whalesay:latest - RUN apt-get -y update && apt-get install -y fortunes - CMD /usr/games/fortune -a | cowsay - ``` - -8. Save the file and close the text editor. At this point, your software recipe - is described in the `Dockerfile` file. You are ready to build a new image. - -## Step 2: Build an image from your Dockerfile - -While you are in the `mydockerbuild` directory, build the image using the -`docker build` command. The `-t` parameter gives your image a tag, so you can -run it more easily later. Don't forget the `.` command, which tells the -`docker build` command to look in the current directory for a file called -`Dockerfile`. This command works the same in Linux, macOS, or Windows. - -```bash -$ docker build -t docker-whale . - -Sending build context to Docker daemon 2.048 kB -...snip... -Removing intermediate container cb53c9d09f3b -Successfully built c2c3152907b5 -``` - -The command takes several seconds to run and reports its outcome. Keep reading -to learn a little more about what the output means and what happens when you -build an image. - -## Step 3: Learn about the build process - -The `docker build -t docker-whale .` command reads the `Dockerfile` in the -current directory and processes its instructions one by one to build an image -called `docker-whale` on your local machine. The command takes about a minute -and its output looks really long and complex. In this section, you learn what -each message means. - -1. Docker checks to make sure it has everything it needs to build. This - generates this message: - - ```none - Sending build context to Docker daemon 2.048 kB - ``` - -2. Docker checks to see whether it already has the `whalesay` image locally and - pulls it from Docker hub if not. In this case, the image already exists - locally because you pulled it in a previous task. This corresponds to `FROM` - statement in the Dockerfile, and generates this message: - - ```none - Step 1 : FROM docker/whalesay:latest - ---> 6b362a9f73eb - ``` - - At the end of each step, an ID is printed. This is the ID of the layer that - was created by this step. Each line in a Dockerfile corresponds to a layer - in the image. Your ID will be different. - -3. Docker starts up a temporary container running the `whalesay` image (the - `Running in` line below). In the temporary container, Docker runs the next - command in the Dockerfile, which is the `RUN` command, which installs the - `fortune` command. This generates a lot of lines of output, just like you - would see if you were manually running the `apt-get` commands on an Ubuntu - host. - - ```none - Step 2 : RUN apt-get -y update && apt-get install -y fortunes - ---> Running in 05d4eda04526 - Ign http://archive.ubuntu.com trusty InRelease - Get:1 http://archive.ubuntu.com trusty-updates InRelease [65.9 kB] - Get:2 http://archive.ubuntu.com trusty-security InRelease [65.9 kB] - Hit http://archive.ubuntu.com trusty Release.gpg - Hit http://archive.ubuntu.com trusty Release - Get:3 http://archive.ubuntu.com trusty-updates/main Sources [480 kB] - Get:4 http://archive.ubuntu.com trusty-updates/restricted Sources [5921 B] - Get:5 http://archive.ubuntu.com trusty-updates/universe Sources [214 kB] - Get:6 http://archive.ubuntu.com trusty-updates/main amd64 Packages [1160 kB] - Get:7 http://archive.ubuntu.com trusty-updates/restricted amd64 Packages [20.4 kB] - Get:8 http://archive.ubuntu.com trusty-updates/universe amd64 Packages [505 kB] - Get:9 http://archive.ubuntu.com trusty-security/main Sources [157 kB] - Get:10 http://archive.ubuntu.com trusty-security/restricted Sources [4621 B] - Get:11 http://archive.ubuntu.com trusty-security/universe Sources [54.5 kB] - Get:12 http://archive.ubuntu.com trusty-security/main amd64 Packages [700 kB] - Get:13 http://archive.ubuntu.com trusty-security/restricted amd64 Packages [17.0 kB] - Get:14 http://archive.ubuntu.com trusty-security/universe amd64 Packages [191 kB] - Hit http://archive.ubuntu.com trusty/main Sources - Hit http://archive.ubuntu.com trusty/restricted Sources - Hit http://archive.ubuntu.com trusty/universe Sources - Hit http://archive.ubuntu.com trusty/main amd64 Packages - Hit http://archive.ubuntu.com trusty/restricted amd64 Packages - Hit http://archive.ubuntu.com trusty/universe amd64 Packages - Fetched 3640 kB in 11s (329 kB/s) - Reading package lists... - Reading package lists... - Building dependency tree... - Reading state information... - The following extra packages will be installed: - fortune-mod fortunes-min librecode0 - Suggested packages: - x11-utils bsdmainutils - The following NEW packages will be installed: - fortune-mod fortunes fortunes-min librecode0 - 0 upgraded, 4 newly installed, 0 to remove and 92 not upgraded. - Need to get 1961 kB of archives. - After this operation, 4817 kB of additional disk space will be used. - Get:1 http://archive.ubuntu.com/ubuntu/ trusty/main librecode0 amd64 3.6-21 [771 kB] - Get:2 http://archive.ubuntu.com/ubuntu/ trusty/universe fortune-mod amd64 1:1.99.1-7 [39.5 kB] - Get:3 http://archive.ubuntu.com/ubuntu/ trusty/universe fortunes-min all 1:1.99.1-7 [61.8 kB] - Get:4 http://archive.ubuntu.com/ubuntu/ trusty/universe fortunes all 1:1.99.1-7 [1089 kB] - debconf: unable to initialize frontend: Dialog - debconf: (TERM is not set, so the dialog frontend is not usable.) - debconf: falling back to frontend: Readline - debconf: unable to initialize frontend: Readline - debconf: (This frontend requires a controlling tty.) - debconf: falling back to frontend: Teletype - dpkg-preconfigure: unable to re-open stdin: - Fetched 1961 kB in 19s (101 kB/s) - Selecting previously unselected package librecode0:amd64. - (Reading database ... 13116 files and directories currently installed.) - Preparing to unpack .../librecode0_3.6-21_amd64.deb ... - Unpacking librecode0:amd64 (3.6-21) ... - Selecting previously unselected package fortune-mod. - Preparing to unpack .../fortune-mod_1%3a1.99.1-7_amd64.deb ... - Unpacking fortune-mod (1:1.99.1-7) ... - Selecting previously unselected package fortunes-min. - Preparing to unpack .../fortunes-min_1%3a1.99.1-7_all.deb ... - Unpacking fortunes-min (1:1.99.1-7) ... - Selecting previously unselected package fortunes. - Preparing to unpack .../fortunes_1%3a1.99.1-7_all.deb ... - Unpacking fortunes (1:1.99.1-7) ... - Setting up librecode0:amd64 (3.6-21) ... - Setting up fortune-mod (1:1.99.1-7) ... - Setting up fortunes-min (1:1.99.1-7) ... - Setting up fortunes (1:1.99.1-7) ... - Processing triggers for libc-bin (2.19-0ubuntu6.6) ... - ---> dfaf993d4a2e - Removing intermediate container 05d4eda04526 - ``` - - When the `RUN` command finishes, a new layer is created and the intermediate - container is removed. - -4. A new intermediate container is created, and Docker adds a layer for the - `CMD` line in the Dockerfile, and removes the intermediate container. - - ```none - Step 3 : CMD /usr/games/fortune -a | cowsay - ---> Running in a8e6faa88df3 - ---> 7d9495d03763 - Removing intermediate container a8e6faa88df3 - Successfully built 7d9495d03763 - ``` - -You have now built an image called `docker-whale`. - - -## Step 4: Run your new docker-whale - -Now you can verify that the new image is on your computer and you can run it. - -1. In a terminal window or command prompt, type `docker images`, which lists - the images you have locally. - - ```bash - $ docker images - - REPOSITORY TAG IMAGE ID CREATED SIZE - docker-whale latest c2c3152907b5 4 minutes ago 275.1 MB - docker/whalesay latest fb434121fc77 4 hours ago 247 MB - hello-world latest 91c95931e552 5 weeks ago 910 B - ``` - -2. Run your new image by typing `docker run docker-whale`. - - ```bash - - $ docker run docker-whale - - ______________________________________ - < You will be successful in your work. > - -------------------------------------- - \ - \ - \ - ## . - ## ## ## == - ## ## ## ## === - /""""""""""""""""___/ === - ~~~ {~~ ~~~~ ~~~ ~~~~ ~~ ~ / ===- ~~~ - \______ o __/ - \ \ __/ - \____\______/ - ``` - - The whale is now a lot smarter. It comes up with its own thoughts and it takes - less typing to run. You may also notice that Docker didn't have to download - anything, because you built the image locally. - -3. Just for fun, run it again. - - ```bash - _______________________________________ - / If everything seems to be going well, \ - | you have obviously overlooked | - \ something. / - --------------------------------------- - \ - \ - \ - ## . - ## ## ## == - ## ## ## ## === - /""""""""""""""""___/ === - ~~~ {~~ ~~~~ ~~~ ~~~~ ~~ ~ / ===- ~~~ - \______ o __/ - \ \ __/ - \____\______/ - - ``` - -Your whale now has a mind of its own, but if you don't like what it says, -just run it again! - - -## Where to go next - -Now that you have learned to build an image and run it, you can learn to share -the image by [creating a Docker Hub account](step_five.md). diff --git a/engine/getstarted/step_one.md b/engine/getstarted/step_one.md deleted file mode 100644 index 941aa3e9c6..0000000000 --- a/engine/getstarted/step_one.md +++ /dev/null @@ -1,145 +0,0 @@ ---- -description: Getting started with Docker -keywords: beginner, getting started, Docker, install -redirect_from: -- /mac/step_one/ -- /windows/step_one/ -- /linux/step_one/ -- /engine/tutorials/dockerizing/ -title: Install Docker and run hello-world ---- - -- [Step 1: Get Docker](#step-1-get-docker) -- [Step 2: Install Docker](#step-2-install-docker) -- [Step 3: Verify your installation](#step-3-verify-your-installation) - -## Step 1: Get Docker - -* [Docker for Mac](#docker-for-mac) - -* [Docker for Windows](#docker-for-windows) - -* [Docker for Linux](#docker-for-linux) - -### Docker for Mac - -Docker for Mac is our newest offering for the Mac. It runs as a native Mac application and uses -[xhyve](https://github.com/mist64/xhyve/){: target="_blank" class="_" } to virtualize -the Docker Engine environment and Linux kernel-specific features for the Docker daemon. - -Get Docker for Mac - -#### Requirements - -- Mac must be a 2010 or newer model, with Intel's hardware support for memory management unit (MMU) virtualization; i.e., Extended Page Tables (EPT) - -- macOS 10.10.3 Yosemite or newer - -- At least 4GB of RAM - -- VirtualBox prior to version 4.3.30 must NOT be installed (it is incompatible with Docker for Mac). Docker for Mac will error out on install in this case. Uninstall the older version of VirtualBox and re-try the install. - -#### Docker Toolbox for the Mac - -If you have an earlier Mac that doesn't meet the Docker for Mac prerequisites, -[get Docker Toolbox](https://www.docker.com/products/docker-toolbox){: target="_blank" class="_" } -for the Mac. - -See [Docker Toolbox Overview](/toolbox/overview.md) for help on installing Docker with Toolbox. - -### Docker for Windows - -Docker for Windows is our newest offering for PCs. It runs as a native Windows application and uses Hyper-V to virtualize the Docker Engine environment and Linux kernel-specific features for the Docker daemon. - -Get Docker for Windows - -#### Requirements - -* 64bit Windows 10 Pro, Enterprise and Education (1511 November update, Build 10586 or later). In the future we will support more versions of Windows 10. - -* The Hyper-V package must be enabled. The Docker for Windows installer will enable it for you, if needed. (This requires a reboot). - -#### Docker Toolbox for Windows - -If you have an earlier Windows system that doesn't meet the Docker for Windows prerequisites, -[get Docker Toolbox](https://www.docker.com/products/docker-toolbox){: target="_blank" class="_" }. - -See [Docker Toolbox Overview](/toolbox/overview.md) for help on installing Docker with Toolbox. - -### Docker for Linux -Docker Engine runs natively on Linux distributions. - -For full instructions on getting Docker for various Linux distributions, see [Install Docker Engine](/engine/installation/index.md). - -## Step 2: Install Docker - -- **Docker for Mac** - See [Install Docker for Mac](/docker-for-mac/install/). - -- **Docker for Windows** - See [Install Docker for Windows](/docker-for-windows/install/). - -- **Docker Toolbox** - Install instructions are at [Docker Toolbox Overview](/toolbox/overview.md). - -- **Docker on Linux** - For a simple example of installing Docker on Ubuntu Linux so that you can work through this tutorial, see [Installing Docker on Ubuntu Linux (Example)](linux_install_help.md). Full install instructions for all flavors of Linux we support are at [Install Docker Engine](/engine/installation/index.md). - -## Step 3: Verify your installation - -1. Open a command-line terminal, and run some Docker commands to verify that Docker is working as expected. - - Some good commands to try are `docker version` to check that you have the latest release installed and `docker ps` to see if you have any running containers. (Probably not, since you just started.) - -2. Type the `docker run hello-world` command and press RETURN. - - The command does some work for you, if everything runs well, the command's - output looks like this: - - $ docker run hello-world - Unable to find image 'hello-world:latest' locally - latest: Pulling from library/hello-world - 535020c3e8ad: Pull complete - af340544ed62: Pull complete - Digest: sha256:a68868bfe696c00866942e8f5ca39e3e31b79c1e50feaee4ce5e28df2f051d5c - Status: Downloaded newer image for hello-world:latest - - Hello from Docker. - This message shows that your installation appears to be working correctly. - - To generate this message, Docker took the following steps: - 1. The Docker Engine CLI client contacted the Docker Engine daemon. - 2. The Docker Engine daemon pulled the "hello-world" image from the Docker Hub. - 3. The Docker Engine daemon created a new container from that image which runs the - executable that produces the output you are currently reading. - 4. The Docker Engine daemon streamed that output to the Docker Engine CLI client, which sent it - to your terminal. - - To try something more ambitious, you can run an Ubuntu container with: - $ docker run -it ubuntu bash - - Share images, automate workflows, and more with a free Docker Hub account: - https://hub.docker.com - - For more examples and ideas, visit: - https://docs.docker.com/userguide/ - -3. Run `docker ps -a` to show all containers on the system. - - $ docker ps -a - - CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES - 592376ff3eb8 hello-world "/hello" 25 seconds ago Exited (0) 24 seconds ago prickly_wozniak - - You should see your `hello-world` container listed in the output for the `docker ps -a` command. - - The command `docker ps` shows only currently running containers. Since `hello-world` already ran and exited, it wouldn't show up with a `docker ps`. - -## Looking for troubleshooting help? - -Typically, the above steps work out-of-the-box, but some scenarios can cause problems. If your `docker run hello-world` didn't work and resulted in errors, check out [Troubleshooting](/toolbox/faqs/troubleshoot.md) for quick fixes to common problems. - -## Where to go next - -At this point, you have successfully installed the Docker software. Leave the -Docker Quickstart Terminal window open. Now, go to the next page to [read a very -short introduction Docker images and containers](step_two.md). - - -  diff --git a/engine/getstarted/step_six.md b/engine/getstarted/step_six.md deleted file mode 100644 index 733477d7c4..0000000000 --- a/engine/getstarted/step_six.md +++ /dev/null @@ -1,205 +0,0 @@ ---- -description: Getting started with Docker -keywords: beginner, getting started, Docker -redirect_from: -- /mac/step_six/ -- /windows/step_six/ -- /linux/step_six/ -- /engine/tutorials/dockerrepos/ -- /userguide/dockerrepos/ -- /engine/userguide/dockerimages/ -- /engine/userguide/containers/dockerimages/ -title: Tag, push, and pull your image ---- - -In this section, you tag and push your `docker-whale` image to your new -repository, then test the repository by pulling your -new image. - -## Step 1: Tag and push the image - -1. If you don't already have a terminal open, open one now. - -2. Run `docker images` to list the images stored locally: - - ```bash - $ docker images - - REPOSITORY TAG IMAGE ID CREATED SIZE - docker-whale latest 7d9495d03763 38 minutes ago 273.7 MB - 5dac217f722c 45 minutes ago 273.7 MB - docker/whalesay latest fb434121fc77 4 hours ago 247 MB - hello-world latest 91c95931e552 5 weeks ago 910 B - ``` - -5. Find the image ID for the `docker-whale` image, in the third column. In this example, - the id is `7d9495d03763`, but yours will be different. - - > **Note**: Currently, the repository shows the repo name `docker-whale` - > with no namespace. You need to include the `namespace` for Docker Hub to - > associate it with your account. The `namespace` is the same as your Docker - > Hub account name. The next step adds the namespace to the image name, like - >`YOUR_DOCKERHUB_NAME/docker-whale`. - -6. Tag the `docker-whale` image using the `docker tag` command and the image ID. - - The command you type looks like this: - - ![Docker tag command](tutimg/tagger.png) - - Make sure to use your own Docker Hub account name. - - ```bash - $ docker tag 7d9495d03763 maryatdocker/docker-whale:latest - ``` - -7. Run `docker images` again to verify that the `docker-whale` image has been tagged. - - ```bash - $ docker images - - REPOSITORY TAG IMAGE ID CREATED SIZE - maryatdocker/docker-whale latest 7d9495d03763 5 minutes ago 273.7 MB - docker-whale latest 7d9495d03763 2 hours ago 273.7 MB - 5dac217f722c 5 hours ago 273.7 MB - docker/whalesay latest fb434121fc77 5 hours ago 247 MB - hello-world latest 91c95931e552 5 weeks ago 910 B - ``` - - The same image ID actually now exists in two different repositories. - -8. Before you can push the image to Docker Hub, you need to log in, using - the `docker login` command. The command doesn't take any parameters, - but prompts you for the username and password, as below: - - ```bash - $ docker login - - Username: ***** - Password: ***** - Login Succeeded - ``` - -9. Push your tagged image to Docker Hub, using the `docker push` command. A - lot of output is generated, as each layer is pushed separately. That - output is truncated in the example below. - - ```bash - $ docker push maryatdocker/docker-whale - - The push refers to a repository [maryatdocker/docker-whale] (len: 1) - 7d9495d03763: Image already exists - ... - e9e06b06e14c: Image successfully pushed - Digest: sha256:ad89e88beb7dc73bf55d456e2c600e0a39dd6c9500d7cd8d1025626c4b985011 - ``` - -10. Go back to the Docker Hub website to see the newly-pushed image. - - ![Docker tag command](tutimg/new_image.png) - - -## Step 2: Pull your new image - -The goal of pushing the image to Docker Hub is so that you can access -it from any Docker host using `docker pull`. First, though, you need to -remove the local copy. Otherwise, `docker pull` will not have any work to do, -because it will see that you already have the latest version of the image -locally. - -1. If you don't already have a terminal open, open one now. - -2. Use `docker images` to list the images you have locally. - - ```bash - $ docker images - - REPOSITORY TAG IMAGE ID CREATED SIZE - maryatdocker/docker-whale latest 7d9495d03763 5 minutes ago 273.7 MB - docker-whale latest 7d9495d03763 2 hours ago 273.7 MB - 5dac217f722c 5 hours ago 273.7 MB - docker/whalesay latest fb434121fc77 5 hours ago 247 MB - hello-world latest 91c95931e552 5 weeks ago 910 B - ``` - - In the next step, you will remove both versions of the `docker-whale` image - from your local system. They share the same ID. Make a note of it. - -3. Use the `docker rmi` command to remove the images. You can refer - to an image by its ID or its name. Since they share an ID, if you wanted to - keep one of them, you'd need to refer to the other one by name. For this - example, use the ID to remove both of them. Your ID will be different from - the one below. - - ```bash - $ docker rmi -f 7d9495d03763 - ``` - - >**Tip**: You can also remove an image with `docker image rm -f` followed by image ID or name in a similar fashion. - -4. When you use `docker run` it automatically downloads (pulls) images that - don't yet exist locally, creates a container, and starts it. Use the - following command to pull and run the `docker-whale` image, substituting - your Docker Hub username. - - ```bash - $ docker run yourusername/docker-whale - ``` - - Since the image is no longer available on your local system, Docker - downloads it. The output below is truncated. - - ```bash - $ docker run maryatdocker/docker-whale - - Unable to find image 'maryatdocker/docker-whale:latest' locally - latest: Pulling from maryatdocker/docker-whale - eb06e47a01d2: Pull complete - c81071adeeb5: Pull complete - ... - fb434121fc77: Already exists - Digest: sha256:ad89e88beb7dc73bf55d456e2c600e0a39dd6c9500d7cd8d1025626c4b985011 - Status: Downloaded newer image for maryatdocker/docker-whale:latest - ________________________________________ - / Having wandered helplessly into a \ - | blinding snowstorm Sam was greatly | - | relieved to see a sturdy Saint Bernard | - | dog bounding toward him with the | - | traditional keg of brandy strapped to | - | his collar. | - | | - | "At last," cried Sam, "man's best | - \ friend -- and a great big dog, too!" / - ---------------------------------------- - \ - \ - \ - ## . - ## ## ## == - ## ## ## ## === - /""""""""""""""""___/ === - ~~~ {~~ ~~~~ ~~~ ~~~~ ~~ ~ / ===- ~~~ - \______ o __/ - \ \ __/ - \____\______/ - ``` - -## Next steps - -After finishing this tutorial, you've done all of the following fundamental -Docker tasks. - -* You installed Docker. -* You ran a software image in a container. -* You located an interesting image on Docker Hub and ran it on your own machine. -* You modified an image to create your own, and created and ran a container - based on that image. -* You created a Docker Hub account and repository. -* You pushed your custom image to Docker Hub, and made it available both for - yourself and other Docker users. - - - - -You've only scratched the surface of what Docker can do. -[Learn more](last_page.md) about where to go next. diff --git a/engine/getstarted/step_three.md b/engine/getstarted/step_three.md deleted file mode 100644 index 85de07cf97..0000000000 --- a/engine/getstarted/step_three.md +++ /dev/null @@ -1,120 +0,0 @@ ---- -description: Getting started with Docker -keywords: beginner, getting started, Docker -redirect_from: -- /mac/step_three/ -- /windows/step_three/ -- /linux/step_three/ -- /engine/tutorials/usingdocker/ -title: Find and run the whalesay image ---- - -People all over the world create Docker images. You can find these images by -browsing the Docker Hub. In this next section, you'll search for and find the -image you'll use in the rest of this getting started. - -## Step 1: Locate the whalesay image - -1. Open your browser and [browse the Docker Store](https://store.docker.com/community/images/docker/whalesay) to - see the **whalesay** image. - - The Docker Store contains images from individuals like you and official images - from organizations like RedHat, IBM, Google, Microsoft, and a whole lot more. - Each image repository contains information about an image. It should - include information such as what kind of software the image contains and - how to use it. You may notice that the **whalesay** image is based on a - Linux distribution called Ubuntu. In the next step, you run the **whalesay** - image on your machine. - -## Step 2: Run the whalesay image - -Make sure Docker is running. On Docker for Mac and Docker for Windows, this is indicated by the Docker whale showing in the status bar. - -1. Open a command-line terminal. - -2. Type the `docker run docker/whalesay cowsay boo` command and press RETURN. - - This command runs the **whalesay** image in a container. Your terminal should look like the following: - - $ docker run docker/whalesay cowsay boo - Unable to find image 'docker/whalesay:latest' locally - latest: Pulling from docker/whalesay - e9e06b06e14c: Pull complete - a82efea989f9: Pull complete - 37bea4ee0c81: Pull complete - 07f8e8c5e660: Pull complete - 676c4a1897e6: Pull complete - 5b74edbcaa5b: Pull complete - 1722f41ddcb5: Pull complete - 99da72cfe067: Pull complete - 5d5bd9951e26: Pull complete - fb434121fc77: Already exists - Digest: sha256:d6ee73f978a366cf97974115abe9c4099ed59c6f75c23d03c64446bb9cd49163 - Status: Downloaded newer image for docker/whalesay:latest - _____ - < boo > - ----- - \ - \ - \ - ## . - ## ## ## == - ## ## ## ## === - /""""""""""""""""___/ === - ~~~ {~~ ~~~~ ~~~ ~~~~ ~~ ~ / ===- ~~~ - \______ o __/ - \ \ __/ - \____\______/ - - The first time you run a software image, the `docker` command looks for it - on your local system. If the image isn't there, then `docker` gets it from - the hub. - -5. While still in the command line terminal, type `docker images` command and press RETURN. - - The command lists all the images on your local system. You should see - `docker/whalesay` in the list. - - $ docker images - REPOSITORY TAG IMAGE ID CREATED SIZE - docker/whalesay latest fb434121fc77 3 hours ago 247 MB - hello-world latest 91c95931e552 5 weeks ago 910 B - - When you run an image in a container, Docker downloads the image to your - computer. This local copy of the image saves you time. Docker only - downloads the image again if the image's source changes on the hub. You - can, of course, delete the image yourself. You'll learn more about that - later. Let's leave the image there for now because we are going to use it - later. - -6. Take a moment to play with the **whalesay** container a bit. - - Try running the `whalesay` image again with a word or phrase. Try a long or - short phrase. Can you break the whale? - - $ docker run docker/whalesay cowsay boo-boo - _________ - < boo-boo > - --------- - \ - \ - \ - ## . - ## ## ## == - ## ## ## ## === - /""""""""""""""""___/ === - ~~~ {~~ ~~~~ ~~~ ~~~~ ~~ ~ / ===- ~~~ - \______ o __/ - \ \ __/ - \____\______/ - -## Where to go next - -On this page, you learned to search for images on Docker Hub. You used your -command line to run an image. Think about it, effectively you ran a piece of -Linux software on your computer. You learned that running an image copies -it on your computer. Now, you are ready to create your own Docker image. -Go on to the next part [to build your own image](step_four.md). - - -  diff --git a/engine/getstarted/step_two.md b/engine/getstarted/step_two.md deleted file mode 100644 index ace13a9b69..0000000000 --- a/engine/getstarted/step_two.md +++ /dev/null @@ -1,42 +0,0 @@ ---- -description: Getting started with Docker -keywords: beginner, getting started, Docker -redirect_from: -- /mac/step_two/ -- /windows/step_two/ -- /linux/step_two/ -title: Learn about images and containers ---- - -Docker Engine provides the core Docker technology that enables images and -containers. As the last step in your installation, you ran the -`docker run hello-world` command. The command you ran had three parts. - -![Container Explainer](tutimg/container_explainer.png) - -An *image* is a filesystem and parameters to use at runtime. It doesn't have -state and never changes. A *container* is a running instance of an image. -When you ran the command, Docker Engine: - -* checked to see if you had the `hello-world` software image -* downloaded the image from the Docker Hub (more about the hub later) -* loaded the image into the container and "ran" it - -Depending on how it was built, an image might run a simple, single command and -then exit. This is what `hello-world` did. - -A Docker image, though, is capable of much more. An image can start software as -complex as a database, wait for you (or someone else) to add data, store the -data for later use, and then wait for the next person. - -Who built the `hello-world` software image though? In this case, Docker did, but -anyone can. Docker Engine lets people (or companies) create and share software -through Docker images. Using Docker Engine, you don't have to worry about -whether your computer can run the software in a Docker image — a Docker -container *can always run it*. - -## Where to go next - -See, that was quick wasn't it? Now, you are ready to do some really fun stuff -with Docker. Go on to the next part [to find and run the whalesay -image](step_three.md). diff --git a/engine/getstarted/tutimg/add_repository.png b/engine/getstarted/tutimg/add_repository.png deleted file mode 100644 index 9a255c2778..0000000000 Binary files a/engine/getstarted/tutimg/add_repository.png and /dev/null differ diff --git a/engine/getstarted/tutimg/browse_and_search.png b/engine/getstarted/tutimg/browse_and_search.png deleted file mode 100644 index e533d1eda1..0000000000 Binary files a/engine/getstarted/tutimg/browse_and_search.png and /dev/null differ diff --git a/engine/getstarted/tutimg/container_explainer.png b/engine/getstarted/tutimg/container_explainer.png deleted file mode 100644 index d7a67349f2..0000000000 Binary files a/engine/getstarted/tutimg/container_explainer.png and /dev/null differ diff --git a/engine/getstarted/tutimg/hub_signup.png b/engine/getstarted/tutimg/hub_signup.png deleted file mode 100644 index 24cac692c5..0000000000 Binary files a/engine/getstarted/tutimg/hub_signup.png and /dev/null differ diff --git a/engine/getstarted/tutimg/image_found.png b/engine/getstarted/tutimg/image_found.png deleted file mode 100644 index 43654b38b2..0000000000 Binary files a/engine/getstarted/tutimg/image_found.png and /dev/null differ diff --git a/engine/getstarted/tutimg/line_one.png b/engine/getstarted/tutimg/line_one.png deleted file mode 100644 index 4d1a1c8bdf..0000000000 Binary files a/engine/getstarted/tutimg/line_one.png and /dev/null differ diff --git a/engine/getstarted/tutimg/new_image.png b/engine/getstarted/tutimg/new_image.png deleted file mode 100644 index f95ac9deec..0000000000 Binary files a/engine/getstarted/tutimg/new_image.png and /dev/null differ diff --git a/engine/getstarted/tutimg/tagger.png b/engine/getstarted/tutimg/tagger.png deleted file mode 100644 index d6f5f931a7..0000000000 Binary files a/engine/getstarted/tutimg/tagger.png and /dev/null differ diff --git a/engine/getstarted/tutimg/whale_repo.png b/engine/getstarted/tutimg/whale_repo.png deleted file mode 100644 index cc7661ff1c..0000000000 Binary files a/engine/getstarted/tutimg/whale_repo.png and /dev/null differ diff --git a/engine/installation/index.md b/engine/installation/index.md index 2d59d5f825..db1677168e 100644 --- a/engine/installation/index.md +++ b/engine/installation/index.md @@ -90,5 +90,4 @@ up on what Docker for AWS and Docker for Azure have to offer you ## Get started After setting up Docker, try learning the basics over at -[Getting started with Docker](/engine/getstarted/), then learn how to deploy -full-blown applications in our [app tutorial](/engine/getstarted-voting-app/). +[Getting started with Docker](/get-started/). diff --git a/engine/tutorials/dockervolumes.md b/engine/tutorials/dockervolumes.md index fd528d51c0..bf1ce6978e 100644 --- a/engine/tutorials/dockervolumes.md +++ b/engine/tutorials/dockervolumes.md @@ -8,10 +8,6 @@ redirect_from: title: Manage data in containers --- -So far you've been introduced to some -[basic Docker concepts](/engine/getstarted/step_three.md), seen how to work with -[Docker images](/engine/getstarted/step_four.md), and learned about -[how to network your containers](/engine/tutorials/networkingcontainers.md). In this section you're going to learn how you can manage data inside and between your Docker containers. @@ -361,12 +357,3 @@ Data volumes are directly accessible from the Docker host. This means you can read and write to them with normal Linux tools. In most cases you should not do this as it can cause data corruption if your containers and applications are unaware of your direct access. - -# Next steps - -Now you've learned a bit more about how to use Docker we're going to see how to -combine Docker with the services available on -[Docker Hub](https://hub.docker.com) including Automated Builds and private -repositories. - -Go to [Store images in Docker Hub](/engine/getstarted/step_six.md). diff --git a/engine/tutorials/index.md b/engine/tutorials/index.md index 112eee159f..aac5756879 100644 --- a/engine/tutorials/index.md +++ b/engine/tutorials/index.md @@ -8,9 +8,7 @@ title: Engine tutorials # Learn by example -* [Hello world in a container](/engine/getstarted/step_one.md) -* [Run a simple application](/engine/getstarted/step_three.md) -* [Build your own images](/engine/getstarted/step_four.md) * [Network containers](/engine/tutorials/networkingcontainers.md) * [Manage data in containers](/engine/tutorials/dockervolumes.md) -* [Store images on Docker Hub](/engine/getstarted/step_six.md) +* [Samples](/samples/) +* [Get Started](/get-started/) diff --git a/engine/userguide/index.md b/engine/userguide/index.md index 8d6664026c..0405303bf3 100644 --- a/engine/userguide/index.md +++ b/engine/userguide/index.md @@ -2,20 +2,17 @@ description: How to use the Docker Engine user guide keywords: engine, introduction, documentation, about, technology, docker, user, guide, framework, home, intro title: Docker Engine user guide +redirect_from: +- /engine/userguide/intro/ --- - This guide helps users learn how to use Docker Engine. -- [Introduction to Engine user guide](intro.md) - ## Learn by example -- [Hello world in a container](/engine/getstarted/step_one.md) -- [Build your own images](/engine/getstarted/step_four.md) - [Network containers](/engine/tutorials/networkingcontainers.md) -- [Run a simple application](/engine/getstarted/step_three.md) - [Manage data in containers](/engine/tutorials/dockervolumes.md) -- [Store images on Docker Hub](/engine/getstarted/step_six.md) +- [Samples](/samples/) +- [Get started](/get-started/) ## Work with images diff --git a/engine/userguide/intro.md b/engine/userguide/intro.md deleted file mode 100644 index 48b4963ec2..0000000000 --- a/engine/userguide/intro.md +++ /dev/null @@ -1,134 +0,0 @@ ---- -description: Introduction to user guide -identifier: engine_guide_intro -keywords: docker, introduction, documentation, about, technology, docker.io, user, guide, user's, manual, platform, framework, home, intro -redirect_from: -- /userguide/ -title: Engine user guide ---- - -This guide takes you through the fundamentals of using Docker Engine and -integrating it into your environment. You'll learn how to use Engine to: - -* Dockerize your applications. -* Run your own containers. -* Build Docker images. -* Share your Docker images with others. -* And a whole lot more! - -This guide is broken into major sections that take you through learning the basics of Docker Engine and the other Docker products that support it. - -## Dockerizing applications: A "Hello world" - -*How do I run applications inside containers?* - -Docker Engine offers a containerization platform to power your applications. To -learn how to Dockerize applications and run them: - -Go to [Dockerizing Applications](/engine/getstarted/step_one.md). - - -## Working with containers - -*How do I manage my containers?* - -Once you get a grip on running your applications in Docker containers, you'll learn how to manage those containers. To find out -about how to inspect, monitor and manage containers: - -Go to [Working with Containers](/engine/getstarted/step_three.md). - -## Working with Docker images - -*How can I access, share and build my own images?* - -Once you've learnt how to use Docker it's time to take the next step and -learn how to build your own application images with Docker. - -Go to [Working with Docker Images](/engine/getstarted/step_four.md). - -## Networking containers - -Until now we've seen how to build individual applications inside Docker -containers. Now learn how to build whole application stacks with Docker -networking. - -Go to [Networking Containers](/engine/tutorials/networkingcontainers.md). - -## Managing data in containers - -Now we know how to link Docker containers together the next step is -learning how to manage data, volumes and mounts inside our containers. - -Go to [Managing Data in Containers](/engine/tutorials/dockervolumes.md). - -## Managing metadata (labels) for Docker objects - -Labels are a mechanism for applying metadata to Docker objects, including: - -- Images -- Containers -- Local daemons -- Volumes -- Networks -- Swarm nodes -- Swarm services - - -You can use labels to organize your images, record licensing information, annotate -relationships between containers, volumes, and networks, or in any way that makes -sense for your business or application. - -Go to [Managing Docker object labels](labels-custom-metadata.md). - -## Docker products that complement Engine - -Often, one powerful technology spawns many other inventions that make that easier to get to, easier to use, and more powerful. These spawned things share one common characteristic: they augment the central technology. The following Docker products expand on the core Docker Engine functions. - -### Docker Hub - -Docker Hub is the central hub for Docker. It hosts public Docker images -and provides services to help you build and manage your Docker -environment. To learn more: - -Go to [Using Docker Hub](/docker-hub/). - -### Docker Machine - -Docker Machine helps you get Docker Engines up and running quickly. Machine -can set up hosts for Docker Engines on your computer, on cloud providers, -and/or in your data center, and then configure your Docker client to securely -talk to them. - -Go to [Docker Machine user guide](/machine/). - -### Docker Compose - -Docker Compose allows you to define an application's components -- their containers, -configuration, links and volumes -- in a single file. Then a single command -will set everything up and start your application running. - -Go to [Docker Compose user guide](/compose/). - - -### Docker Swarm - -Docker Swarm pools several Docker Engines together and exposes them as a single -virtual Docker Engine. It serves the standard Docker API, so any tool that already -works with Docker can now transparently scale up to multiple hosts. - -Go to [Docker Swarm user guide](/swarm/). - -## Getting help - -* [Docker homepage](https://www.docker.com/) -* [Docker Hub](https://hub.docker.com) -* [Docker blog](https://blog.docker.com/) -* [Docker documentation](/) -* [Docker Getting Started Guide](/engine/getstarted/index.md) -* [Docker code on GitHub](https://github.com/docker/docker) -* [Docker mailing - list](https://groups.google.com/forum/#!forum/docker-user) -* Docker on IRC: irc.freenode.net and channel #docker -* [Docker on Twitter](https://twitter.com/docker) -* Get [Docker help](https://stackoverflow.com/search?q=docker) on - StackOverflow diff --git a/engine/userguide/networking/default_network/dockerlinks.md b/engine/userguide/networking/default_network/dockerlinks.md index 9b232198db..7e951d46f2 100644 --- a/engine/userguide/networking/default_network/dockerlinks.md +++ b/engine/userguide/networking/default_network/dockerlinks.md @@ -28,15 +28,12 @@ between containers in a more controlled way. ## Connect using network port mapping -In [Run a simple application](/engine/getstarted/step_three.md), you created a -container that ran a Python Flask application: +Let's say you used this command to run a simple Python Flask application: $ docker run -d -P training/webapp python app.py > **Note**: -> Containers have an internal network and an IP address -> (as we saw when we used the `docker inspect` command to show the container's -> IP address in [Run a simple application](/engine/getstarted/step_three.md) section). +> Containers have an internal network and an IP address. > Docker can have a variety of network configurations. You can see more > information on Docker networking [here](/engine/userguide/networking/index.md). diff --git a/get-started/get-started-visualizer1.png b/get-started/get-started-visualizer1.png new file mode 100644 index 0000000000..67f4807771 Binary files /dev/null and b/get-started/get-started-visualizer1.png differ diff --git a/get-started/index.md b/get-started/index.md new file mode 100644 index 0000000000..d25f28b090 --- /dev/null +++ b/get-started/index.md @@ -0,0 +1,159 @@ +--- +title: "Get Started, Part 1: Orientation and Setup" +keywords: get started, setup, orientation, quickstart, intro, concepts, containers +description: Get oriented on some basics of Docker before diving into the walkthrough. +redirect_from: +- /engine/getstarted/ +- /learn/ +- /engine/getstarted/step_one/ +- /engine/getstarted/step_two/ +- /engine/getstarted/step_three/ +- /engine/getstarted/step_four/ +- /engine/getstarted/step_five/ +- /engine/getstarted/step_six/ +- /engine/getstarted/last_page/ +- /engine/getstarted-voting-app/ +- /engine/getstarted-voting-app/node-setup/ +- /engine/getstarted-voting-app/create-swarm/ +- /engine/getstarted-voting-app/deploy-app/ +- /engine/getstarted-voting-app/test-drive/ +- /engine/getstarted-voting-app/customize-app/ +- /engine/getstarted-voting-app/cleanup/ +- /engine/userguide/intro/ +- /mac/started/ +- /windows/started/ +- /linux/started/ +- /getting-started/ +- /mac/step_one/ +- /windows/step_one/ +- /linux/step_one/ +- /engine/tutorials/dockerizing/ +- /mac/step_two/ +- /windows/step_two/ +- /linux/step_two/ +- /mac/step_three/ +- /windows/step_three/ +- /linux/step_three/ +- /engine/tutorials/usingdocker/ +- /mac/step_four/ +- /windows/step_four/ +- /linux/step_four/ +- /engine/tutorials/dockerimages/ +- /userguide/dockerimages/ +- /engine/userguide/dockerimages/ +- /mac/last_page/ +- /windows/last_page/ +- /linux/last_page/ +- /mac/step_six/ +- /windows/step_six/ +- /linux/step_six/ +- /engine/tutorials/dockerrepos/ +- /userguide/dockerrepos/ +- /engine/userguide/containers/dockerimages/ +--- + +{% include_relative nav.html selected="1" %} + +Welcome! We are excited you want to learn how to use Docker. + +In this seven-part tutorial, you will: + +1. Get set up and oriented, on this page. +2. [Build and run your first app](part2.md) +3. [Turn your app into a scaling service](part3.md) +4. [Span your service across multiple machines](part4.md) +5. [Add a visitor counter that persists data](part5.md) +6. [Deploy your swarm to production](part6.md) + +The application itself is very simple so that you are not too distracted by +what the code is doing. After all, the value of Docker is in how it can build, +ship, and run applications; it's totally agnostic as to what your application +actually does. + +## Prerequisites + +While we'll define concepts along the way, it is good for you to understand +[what Docker is](https://www.docker.com/what-docker) and [why you would use +Docker](https://www.docker.com/use-cases) before we begin. + +We also need to assume you are familiar with a few concepts before we continue: + +- IP Addresses and Ports +- Virtual Machines +- Editing configuration files +- Basic familiarity with the ideas of code dependencies and building +- Machine resource usage terms, like CPU percentages, RAM use in bytes, etc. + +## A brief explanation of containers + +An **image** is a lightweight, stand-alone, executable package that includes +everything needed to run a piece of software, including the code, a runtime, +libraries, environment variables, and config files. + +A **container** is a runtime instance of an image -- what the image becomes in +memory when actually executed. It runs completely isolated from the host +environment by default, only accessing host files and ports if configured to +do so. + +Containers run apps natively on the host machine's kernel. They have better +performance characteristics than virtual machines that only get virtual access +to host resources through a hypervisor. Containers can get native access, each +one running in a discrete process, taking no more memory than any other +executable. + +## Containers vs. virtual machines + +Consider this diagram comparing virtual machines to containers: + +### Virtual Machine diagram + +![Virtual machine stack example](https://www.docker.com/sites/default/files/VM%402x.png) + +Virtual machines run guest operating systems -- note the OS layer in each box. +This is resource intensive, and the resulting disk image and appication state is +an entangelment of OS settings, system-installed dependencies, OS security +patches, and other easy-to-lose, hard-to-replicate ephemera. + +### Container diagram + +![Container stack example](https://www.docker.com/sites/default/files/Container%402x.png) + +Containers can share a single kernel, and the only information that needs to be +in a container image is the executable and its package dependencies, which +never need to be installed on the host system. These processes run like native +processes, and you can manage them individually by running commands like `docker +ps` -- just like you would run `ps` on Linux to see active processes. Finally, +because they contain all their dependencies, there is no configuration +entanglement; a containerized app "runs anywhere." + +## Setup + +Before we get started, make sure your system has the latest version of Docker +installed. + +[Install Docker](/engine/installation/index.md){: class="button outline-btn" style="margin-bottom: 30px; margin-right:100%"} + +You should be able to run `docker run hello-world` and see a response like this: + +``` +$ docker run hello-world + +Hello from Docker! +This message shows that your installation appears to be working correctly. + +To generate this message, Docker took the following steps: +...(snipped)... +``` + +If you see a message like the one above, you're ready to begin the journey. + +## Conclusion + +The unit of scale being an individual, portable executable has vast +implications. It means that CI/CD can push updates to one part of a distributed +application, system dependencies aren't a thing you worry about, resource +density is increased, and orchestrating scaling behavior is a matter of spinning +up new executables, not new VM hosts. We'll be learning about all of those +things, but first let's learn to walk. + +[On to Part 2 >>](part2.md){: class="button outline-btn" style="margin-bottom: 30px; margin-right: 100%"} diff --git a/get-started/nav.html b/get-started/nav.html new file mode 100644 index 0000000000..49578bcd1d --- /dev/null +++ b/get-started/nav.html @@ -0,0 +1,8 @@ +

diff --git a/get-started/part2.md b/get-started/part2.md new file mode 100644 index 0000000000..a58f321edb --- /dev/null +++ b/get-started/part2.md @@ -0,0 +1,310 @@ +--- +title: "Get Started, Part 2: Containers" +keywords: containers, python, code, coding, build, push, run +description: Learn how to write, build, and run a simple app -- the Docker way. +--- + +{% include_relative nav.html selected="2" %} + +## Prerequisites + +- [Install Docker](/engine/installation/). +- Read the orientation in [Part 1](index.md). +- Give your environment a quick test run to make sure you're all set up: + + ``` + docker run hello-world + ``` + +## Introduction + +It's time to begin building an app the Docker way. We'll start at the bottom of +the hierarchy of such an app, which is a container, which we cover on this page. +Above this level is a service, which defines how containers behave in +production, covered in [Part 3](part3.md). Finally, at the top level is the +stack, defining the interactions of all the services, covered in +[Part 5](part5.md). + +- Stack +- Services +- **Container** (you are here) + +## Your new development environment + +In the past, if you were to start writing a Python app, your first +order of business was to install a Python runtime onto your machine. But, +that creates a situation where the environment on your machine has to be just +so in order for your app to run as expected; ditto for the server that runs +your app. + +With Docker, you can just grab a portable Python runtime as an image, no +installation necessary. Then, your build can include the base Python image +right alongside your app code, ensuring that your app, its dependencies, and the +runtime, all travel together. + +These portable images are defined by something called a `Dockerfile`. + +## Define a container with a `Dockerfile` + +`Dockerfile` will define what goes on in the environment inside your +container. Access to resources like networking interfaces and disk drives is +virtualized inside this environment, which is isolated from the rest of your +system, so you have to map ports to the outside world, and +be specific about what files you want to "copy in" to that environment. However, +after doing that, you can expect that the build of your app defined in this +`Dockerfile` will behave exactly the same wherever it runs. + +### `Dockerfile` + +Create an empty directory and put this file in it, with the name `Dockerfile`. +Take note of the comments that explain each statement. + +```conf +# Use an official Python runtime as a base image +FROM python:2.7-slim + +# Set the working directory to /app +WORKDIR /app + +# Copy the current directory contents into the container at /app +ADD . /app + +# Install any needed packages specified in requirements.txt +RUN pip install -r requirements.txt + +# Make port 80 available to the world outside this container +EXPOSE 80 + +# Define environment variable +ENV NAME World + +# Run app.py when the container launches +CMD ["python", "app.py"] +``` + +This `Dockerfile` refers to a couple of things we haven't created yet, namely +`app.py` and `requirements.txt`. Let's get those in place next. + +## The app itself + +Grab these two files and place them in the same folder as `Dockerfile`. +This completes our app, which as you can see is quite simple. When the above +`Dockerfile` is built into an image, `app.py` and `requirements.txt` will be +present because of that `Dockerfile`'s `ADD` command, and the output from +`app.py` will be accessible over HTTP thanks to the `EXPOSE` command. + +### `requirements.txt` + +``` +Flask +Redis +``` + +### `app.py` + +```python +from flask import Flask +from redis import Redis, RedisError +import os +import socket + +# Connect to Redis +redis = Redis(host="redis", db=0) + +app = Flask(__name__) + +@app.route("/") +def hello(): + try: + visits = redis.incr('counter') + except RedisError: + visits = "cannot connect to Redis, counter disabled" + + html = "

Hello {name}!

" \ + "Hostname: {hostname}
" \ + "Visits: {visits}" + return html.format(name=os.getenv('NAME', "world"), hostname=socket.gethostname(), visits=visits) + +if __name__ == "__main__": + app.run(host='0.0.0.0', port=80) +``` + +Now we see that `pip install requirements.txt` installs the Flask and Redis +libraries for Python, and the app prints the environment variable `NAME`, as +well as the output of a call to `socket.gethostname()`. Finally, because Redis +isn't running (as we've only installed the Python library, and not Redis +itself), we should expect that the attempt to use it here will fail and produce +the error message. + +> *Note*: Accessing the name of the host when inside a container retrieves the +container ID, which is like the process ID for a running executable. + +## Build the App + +That's it! You don't need Python or anything in `requirements.txt` on your +system, nor will building or running this image install them on your system. It +doesn't seem like you've really set up an environment with Python and Flask, but +you have. + +Here's what `ls` should show: + +```shell +$ ls +Dockerfile app.py requirements.txt +``` + +Now run the build command. This creates a Docker image, which we're going to +tag using `-t` so it has a friendly name. + +```shell +docker build -t friendlyhello . +``` + +Where is your built image? It's in your machine's local Docker image registry: + +```shell +$ docker images + +REPOSITORY TAG IMAGE ID +friendlyhello latest 326387cea398 +``` + +## Run the app + +Run the app, mapping your machine's port 4000 to the container's `EXPOSE`d port 80 +using `-p`: + +```shell +docker run -p 4000:80 friendlyhello +``` + +You should see a notice that Python is serving your app at `http://0.0.0.0:80`. +But that message coming from inside the container, which doesn't know you mapped +port 80 of that container to 4000, making the correct URL +`http://localhost:4000`. Go there, and you'll see the "Hello World" text, the +container ID, and the Redis error message. + +> **Note**: This port remapping of `4000:80` is to demonstrate the difference +between what you `EXPOSE` within the `Dockerfile`, and what you `publish` using +`docker run -p`. In later steps, we'll just map port 80 on the host to port 80 +in the container and use `http://localhost`. + +Hit `CTRL+C` in your terminal to quit. + +Now let's run the app in the background, in detached mode: + +```shell +docker run -d -p 4000:80 friendlyhello +``` + +You get the long container ID for your app and then are kicked back to your +terminal. Your container is running in the background. You can also see the +abbreviated container ID with `docker ps` (and both work interchangeably when +running commands): + +```shell +$ docker ps +CONTAINER ID IMAGE COMMAND CREATED +1fa4ab2cf395 friendlyhello "python app.py" 28 seconds ago +``` + +You'll see that `CONTAINER ID` matches what's on `http://localhost:4000`. + +Now use `docker stop` to end the process, using the `CONTAINER ID`, like so: + +```shell +docker stop 1fa4ab2cf395 +``` + +## Share your image + +To demonstrate the portability of what we just created, let's upload our build +and run it somewhere else. After all, you'll need to learn how to push to +registries to make deployment of containers actually happen. + +A registry is a collection of repositories, and a repository is a collection of +images -- sort of like a GitHub repository, except the code is already built. An +account on a registry can create many repositories. The `docker` CLI is +preconfigured to use Docker's public registry by default. + +> **Note**: We'll be using Docker's public registry here just because it's free +and pre-configured, but there are many public ones to choose from, and you can +even set up your own private registry using [Docker Trusted +Registry](/datacenter/dtr/2.2/guides/). + +If you don't have a Docker account, sign up for one at +[cloud.docker.com](https://cloud.docker.com/). Make note of your username. + +Log in your local machine. + +```shell +docker login +``` + +Now, publish your image. The notation for associating a local image with a +repository on a registry, is `username/repository:tag`. The `:tag` is optional, +but recommended; it's the mechanism that registries use to give Docker images a +version. So, putting all that together, enter your username, and repo +and tag names, so your existing image will upload to your desired destination: + +```shell +docker tag friendlyhello username/repository:tag +``` + +Upload your tagged image: + +```shell +docker push username/repository:tag +``` + +Once complete, the results of this upload are publicly available. From now on, +you can use `docker run` and run your app on any machine with this command: + +```shell +docker run -p 4000:80 username/repository:tag +``` + +> Note: If you don't specify the `:tag` portion of these commands, + the tag of `:latest` will be assumed, both when you build and when you run + images. + +No matter where `docker run` executes, it pulls your image, along with Python +and all the dependencies from `requirements.txt`, and runs your code. It all +travels together in a neat little package, and the host machine doesn't have to +install anything but Docker to run it. + +## Conclusion of part one + +That's all for this page. In the next section, we will learn how to scale our +application by running this container in a **service**. + +[Continue to Part 3 >>](part3.md){: class="button outline-btn" style="margin-bottom: 30px"} + + +## Recap and cheat sheet (optional) + +Here's [a terminal recording of what was covered on this page](https://asciinema.org/a/blkah0l4ds33tbe06y4vkme6g): + + + +Here is a list of the basic commands from this page, and some related ones if +you'd like to explore a bit before moving on. + +```shell +docker build -t friendlyname . # Create image using this directory's Dockerfile +docker run -p 4000:80 friendlyname # Run "friendlyname" mapping port 4000 to 80 +docker run -d -p 4000:80 friendlyname # Same thing, but in detached mode +docker ps # See a list of all running containers +docker stop # Gracefully stop the specified container +docker ps -a # See a list of all containers, even the ones not running +docker kill # Force shutdown of the specified container +docker rm # Remove the specified container from this machine +docker rm $(docker ps -a -q) # Remove all containers from this machine +docker images -a # Show all images on this machine +docker rmi # Remove the specified image from this machine +docker rmi $(docker images -q) # Remove all images from this machine +docker login # Log in this CLI session using your Docker credentials +docker tag username/repository:tag # Tag for upload to registry +docker push username/repository:tag # Upload tagged image to registry +docker run username/repository:tag # Run image from a registry +``` diff --git a/get-started/part3.md b/get-started/part3.md new file mode 100644 index 0000000000..a8eddfd75e --- /dev/null +++ b/get-started/part3.md @@ -0,0 +1,172 @@ +--- +title: "Get Started, Part 3: Services" +keywords: services, replicas, scale, ports, compose, compose file, stack, networking +description: Learn how to define load-balanced and scalable service that runs containers. +--- +{% include_relative nav.html selected="3" %} + +## Prerequisites + +- [Install Docker](/engine/installation/). +- Read the orientation in [Part 1](index.md). +- Learn how to create containers in [Part 2](part2.md). +- Make sure you have pushed the container you created to a registry, as + instructed; we'll be using it here. +- Ensure your image is working by + running this and visiting `http://localhost/` (slotting in your info for + `username`, `repo`, and `tag`): + + ``` + docker run -p 80:80 username/repo:tag + ``` + +## Introduction + +In part 3, we scale our application and enable load-balancing. To do this, we +must go one level up in the hierarchy of a distributed application: the +**service**. + +- Stack +- **Services** (you are here) +- Container (covered in [part 2](part2.md)) + +## Understanding services + +In a distributed application, different pieces of the app are called +"services." For example, if you imagine a video sharing site, there will +probably be a service for storing application data in a database, a service +for video transcoding in the background after a user uploads something, a +service for the front-end, and so on. + +A service really just means, "containers in production." A service only runs one +image, but it codifies the way that image runs -- what ports it should use, how +many replicas of the container should run so the service has the capacity it +needs, and so on. Scaling a service changes the number of container instances +running that piece of software, assigning more computing resources to the +service in the process. + +Luckily it's very easy to define, run, and scale services with the Docker +platform -- just write a `docker-compose.yml` file. + +## Your first `docker-compose.yml` File + +A `docker-compose.yml` file is a YAML file that defines how Docker containers +should behave in production. + +### `docker-compose.yml` + +Save this file as `docker-compose.yml` wherever you want. Be sure you have +pushed the image you created in [Part 2](part2.md) to a registry, and use +that info to replace `username/repo:tag`: + +```yaml +version: "3" +services: + web: + image: username/repo:tag + deploy: + replicas: 5 + resources: + limits: + cpus: "0.1" + memory: 50M + restart_policy: + condition: on-failure + ports: + - "80:80" + networks: + - webnet +networks: + webnet: +``` + +This `docker-compose.yml` file tells Docker to do the following: + +- Run five instances of [the image we uploaded in step 2](part2.md) as a service + called `web`, limiting each one to use, at most, 10% of the CPU (across all + cores), and 50MB of RAM. +- Immediately restart containers if one fails. +- Map port 80 on the host to `web`'s port 80. +- Instruct `web`'s containers to share port 80 via a load-balanced network + called `webnet`. (Internally, the containers themselves will publish to + `web`'s port 80 at an ephemeral port.) +- Define the `webnet` network with the default settings (which is a + load-balanced overlay network). + +## Run your new load-balanced app + +Now let's run it. You have to give your app a name -- here it is set to +`getstartedlab` : + +``` +docker stack deploy -c docker-compose.yml getstartedlab +``` + +> **Note**: If you get an error that "this node is not a swarm manager," go + ahead and run `docker swarm init` and then retry. We'll get into the meaning + of that command in [part 4](part4.md). + +See a list of the five containers you just launched: + +``` +docker stack ps getstartedlab +``` + +You can run `curl http://localhost` several times in a row, or go to that URL in +your browser and hit refresh a few times. Either way, you'll see the container +ID randomly change, demonstrating the load-balancing; with each request, one of +the five replicas is chosen at random to respond. + +## Scale the app + +You can scale the app by changing the `replicas` value in `docker-compose.yml`, +saving the change, and re-running the `docker stack deploy` command: + +``` +docker stack deploy -c docker-compose.yml getstartedlab +``` + +Docker will do an in-place update, no need to tear the stack down first or kill +any containers. + +### Take down the app + +Take the app down with `docker stack rm`: + +``` +docker stack rm getstartedlab +``` + +It's as easy as that to stand up and scale your app with Docker. You've taken +a huge step towards learning how to run containers in production. Up next, +you will learn how to run this app on a cluster of machines. + +> Note: Compose files like this are used to define applications with Docker, and +can be uploaded to cloud providers using [Docker Cloud](/docker-cloud/), or on +any hardware or cloud provider you choose with [Docker Enterprise +Edition](https://www.docker.com/enterprise-edition). + +[On to "Part 4" >>](part4.md){: class="button outline-btn" style="margin-bottom: 30px"} + +## Recap and cheat sheet (optional) + +Here's [a terminal recording of what was covered on this page](https://asciinema.org/a/b5gai4rnflh7r0kie01fx6lip): + + + +To recap, while typing `docker run` is simple enough, the true implementation +of a container in production is running it as a service. Services codify a +container's behavior in a Compose file, and this file can be used to scale, +limit, and redeploy our app. Changes to the service can be applied in place, as +it runs, using the same command that launched the service: +`docker stack deploy`. + +Some commands to explore at this stage: + +```shell +docker stack ls # List all running applications on this Docker host +docker stack deploy -c # Run the specified Compose file +docker stack services # List the services associated with an app +docker stack ps # List the running containers associated with an app +docker stack rm # Tear down an application +``` diff --git a/get-started/part4.md b/get-started/part4.md new file mode 100644 index 0000000000..9c065a0743 --- /dev/null +++ b/get-started/part4.md @@ -0,0 +1,276 @@ +--- +title: "Get Started, Part 4: Swarms" +keywords: swarms, scale, cluster, machine, vm, manager, deploy, ssh, orchestration +description: Learn how to create clusters of Dockerized machines. +--- +{% include_relative nav.html selected="4" %} + +## Prerequisites + +- [Install Docker](/engine/installation/). +- Read the orientation in [Part 1](index.md). +- Learn how to create containers in [Part 2](part2.md). +- Make sure you have pushed the container you created to a registry, as + instructed; we'll be using it here. +- Ensure your image is working by + running this and visiting `http://localhost/` (slotting in your info for + `username`, `repo`, and `tag`): + + ``` + docker run -p 80:80 username/repo:tag + ``` +- Have a copy of your `docker-compose.yml` from [Part 3](part3.md) handy. + +## Introduction + +In [part 3](part3.md), you took an app you wrote in [part 2](part2.md), and +defined how it should run in production by turning it into a service, scaling it +up 5x in the process. + +Here in part 4, you deploy this application onto a cluster, running it on +multiple machines. Multi-container, multi-machine applications are made possible +by joining multiple macines into a "Dockerized" cluster called a **swarm**. + +## Understanding Swarm clusters + +A swarm is a group of machines that are running Docker and have been joined into +a cluster. After that has happened, you continue to run the Docker commands +you're used to, but now they are executed on a cluster by a **swarm manager**. + +Swarm managers can use several strategies to run containers, such as "emptiest +node" -- which fills the least utilized machines with containers. Or "global", +which ensures that each machine gets exactly one instance of the specified +container. You instruct the swarm manager to use these strategies in the Compose +file, just like the one you have already been using. + +Swarm managers are the only machines in a swarm that can execute your commands, +or authorize other machines to join the swarm as **workers**. Workers are just +there to provide capacity and do not have the authority to tell any other +machine what it can and can't do. + +Up until now you have been using Docker in a single-host mode on your local +machine. But Docker also can be switched into **swarm mode**, and that's what +enables the use of swarms. Enabling swarm mode instantly makes the current +machine a swarm manager. From then on, Docker will run the commands you execute +on the swarm you're managing, rather than just on the current machine. + +{% capture local-instructions %} +You now have two VMs created, named `myvm1` and `myvm2`. The first one will act +as the manager, which executes `docker` commands and authenticates workers to +join the swarm, and the second will be a worker. + +You can send commands to your VMs using `docker-machine ssh`. Instruct `myvm1` +to become a swarm manager with `docker swarm init` and you'll see output like +this: + +``` +$ docker-machine ssh myvm1 "docker swarm init" +Swarm initialized: current node is now a manager. + +To add a worker to this swarm, run the following command: + + docker swarm join \ + --token \ + : +``` + +> **Note**: Getting an error about needing to use `--advertise-addr`? Copy the +> IP address for `myvm1` by running `docker-machine ls`, then run the +> `docker swarm init` command again, using that IP and specifying port `2377` +> (the port for swarm joins) with `--advertise-addr`. For example: +> +> `docker-machine ssh myvm1 "docker swarm init --advertise-addr 192.168.99.100:2377"` + +As you can see, the response to `docker swarm init` contains a pre-configured +`docker swarm join` command for you to run on any nodes you want to add. Copy +this command, and send it to `myvm2` via `docker-machine ssh` to have `myvm2` +join your new swarm as a worker: + +``` +$ docker-machine ssh myvm2 "docker swarm join \ +--token \ +:" + +This node joined a swarm as a worker. +``` + +Congratulations, you have created your first swarm. + +> **Note**: You can also run `docker-machine ssh myvm2` with no command attached +to open a terminal session on that VM. Type `exit` when you're ready to return +to the host shell prompt. It may be easier to paste the join command in that +way. + +{% endcapture %} + +{% capture local %} +#### VMs on your local machine (Mac, Linux, Windows 7 and 8) + +First, you'll need a hypervisor that can create VMs, so [install +VirtualBox](https://www.virtualbox.org/wiki/Downloads) for your machine's OS. + +> **Note**: If you're on a Windows system that has Hyper-V installed, such as +Windows 10, there is no need for this step and you should use Hyper-V instead. +View the instructions for Hyper-V systems by clicking the Hyper-V tab above. + +Now, create a couple of VMs using `docker-machine`, using the VirtualBox driver: + +```none +$ docker-machine create --driver virtualbox myvm1 +$ docker-machine create --driver virtualbox myvm2 +``` + +{{ local-instructions }} +{% endcapture %} + +{% capture localwin %} +#### VMs on your local machine (Windows 10) + +First, quickly create a virtual switch for your VMs to share, so they will be +able to connect to each other. + +1. Launch Hyper-V Manager +2. Click **Virtual Switch Manager** in the right-hand menu +3. Click **Create Virtual Switch** of type **External** +4. Give it the name `myswitch`, and check the box to share your host machine's + active network adapter + +Now, create a couple of virtual machines using our node management tool, +`docker-machine`: + +```none +$ docker-machine create -d hyperv --hyperv-virtual-switch "myswitch" myvm1 +$ docker-machine create -d hyperv --hyperv-virtual-switch "myswitch" myvm2 +``` + +{{ local-instructions }} +{% endcapture %} + +## Set up your swarm + +A swarm is made up of multiple nodes, which can be either physical or virtual +machines. The basic concept is simple enough: run `docker swarm init` to enable +swarm mode and make your current machine a swarm manager, then run +`docker swarm join` on other machines to have them join the swarm as a worker. +Choose a tab below to see how this plays out in various contexts. We'll use VMs +to quickly create a two-machine cluster and turn it into a swarm. + +### Create a cluster + + +
+
{{ local }}
+
{{ localwin }}
+
+ +## Deploy your app on a cluster + +The hard part is over. Now you just repeat the process you used in [part +3](part3.md) to deploy on your new swarm. Just remember that only swarm managers +like `myvm1` execute Docker commands; workers are just for capacity. + +Copy the file `docker-compose.yml` you created in part 3 to the swarm manager +`myvm1`'s home directory (alias: `~`) by using the `docker-machine scp` command: + +``` +docker-machine scp docker-compose.yml myvm1:~ +``` + +Now have `myvm1` use its powers as a swarm manager to deploy your app, by sending +the same `docker stack deploy` command you used in part 3 to `myvm1` using +`docker-machine ssh`: + +``` +docker-machine ssh myvm1 "docker stack deploy -c docker-compose.yml getstartedlab" +``` + +And that's it, the app is deployed on a cluster. + +Wrap all the commands you used in part 3 in a call to `docker-machine ssh`, and +they'll all work as you'd expect. Only this time, you'll see that the containers +have been distributed between both `myvm1` and `myvm2`. + +``` +$ docker-machine ssh myvm1 "docker stack ps getstartedlab" + +ID NAME IMAGE NODE DESIRED STATE +jq2g3qp8nzwx test_web.1 username/repo:tag myvm1 Running +88wgshobzoxl test_web.2 username/repo:tag myvm2 Running +vbb1qbkb0o2z test_web.3 username/repo:tag myvm2 Running +ghii74p9budx test_web.4 username/repo:tag myvm1 Running +0prmarhavs87 test_web.5 username/repo:tag myvm2 Running +``` + +### Accessing your cluster + +You can access your app from the IP address of **either** `myvm1` or `myvm2`. +The network you created is shared between them and load-balancing. Run +`docker-machine ls` to get your VMs' IP addresses and visit either of them on a +browser, hitting refresh (or just `curl` them). You'll see five possible +container IDs all cycling by randomly, demonstrating the load-balancing. + +The reason both IP addresses work is that nodes in a swarm participate in an in +ingress **routing mesh**. This ensures that a service deployed at a certain port +within your swarm always has that port reserved to itself, no matter what node +is actually running the container. Here's a diagram of how a routing mesh for a +service called `my-web` published at port `8080` on a three-node swarm would +look: + +![routing mesh diagram](/engine/swarm/images/ingress-routing-mesh.png) + +> **Note**: If you're having any connectivity trouble, keep in mind that in +> order to use the ingress network in the swarm, you need to have +> the following ports open between the swarm nodes before you enable swarm mode: +> +> - Port 7946 TCP/UDP for container network discovery. +> - Port 4789 UDP for the container ingress network. + +## Iterating and scaling your app + +From here you can do everything you learned about in part 3: scale the app by +changing the `docker-compose.yml` file, or change the app behavior be editing +code. In either case, simply running `docker stack deploy` again deploys these +changes. You can tear down the stack with `docker stack rm`. You can also join +any machine, physical or virtual, to this swarm, using the same +`docker swarm join` command you used on `myvm2`, and capacity will be added to +your cluster; just run `docker stack deploy` afterwards and your app will take +advantage of the new resources. + +[On to Part 5 >>](part5.md){: class="button outline-btn" style="margin-bottom: 30px"} + + +## Recap and cheat sheet (optional) + +Here's [a terminal recording of what was covered on this page](https://asciinema.org/a/113837): + + + +In part 4 you learned what a swarm is, how nodes in swarms can be managers or +workers, created a swarm, and deployed an application on it. You saw that the +core Docker commands didn't change from part 3, they just had to be targeted to +run on a swarm master. You also saw the power of Docker's networking in action, +which kept load-balancing requests across containers, even though they were +running on different machines. Finally, you learned how to iterate and scale +your app on a cluster. + +Here are some commands you might like to run to interact with your swarm a bit: + +```shell +docker-machine create --driver virtualbox myvm1 # Create a VM (Mac, Win7, Linux) +docker-machine create -d hyperv --hyperv-virtual-switch "myswitch" myvm1 # Win10 +docker-machine env myvm1 # View basic information about your node +docker-machine ssh myvm1 "docker node ls" # List the nodes in your swarm +docker-machine ssh myvm1 "docker node inspect " # Inspect a node +docker-machine ssh myvm1 "docker swarm join-token -q worker" # View join token +docker-machine ssh myvm1 # Open an SSH session with the VM; type "exit" to end +docker-machine ssh myvm2 "docker swarm leave" # Make the worker leave the swarm +docker-machine ssh myvm1 "docker swarm leave -f" # Make master leave, kill swarm +docker-machine start myvm1 # Start a VM that is currently not running +docker-machine stop $(docker-machine ls -q) # Stop all running VMs +docker-machine rm $(docker-machine ls -q) # Delete all VMs and their disk images +docker-machine scp docker-compose.yml myvm1:~ # Copy file to node's home dir +docker-machine ssh myvm1 "docker stack deploy -c " # Deploy an app +``` diff --git a/get-started/part5.md b/get-started/part5.md new file mode 100644 index 0000000000..a9c2bed256 --- /dev/null +++ b/get-started/part5.md @@ -0,0 +1,231 @@ +--- +title: "Get Started, Part 5: Stacks" +keywords: stack, data, persist, dependencies, redis, storage, volume, port +description: Learn how to create a multi-container application that uses all the machines in a cluster. +--- + +{% include_relative nav.html selected="5" %} + +## Prerequisites + +- [Install Docker](/engine/installation/). +- Read the orientation in [Part 1](index.md). +- Learn how to create containers in [Part 2](part2.md). +- Make sure you have pushed the container you created to a registry, as + instructed; we'll be using it here. +- Ensure your image is working by + running this and visiting `http://localhost/` (slotting in your info for + `username`, `repo`, and `tag`): + + ``` + docker run -p 80:80 username/repo:tag + ``` +- Have a copy of your `docker-compose.yml` from [Part 3](part3.md) handy. +- Have the swarm you created in [part 4](part4.md) running and ready. + +## Introduction + +In [part 4](part4.md), you learned how to set up a swarm, which is a cluster of +machines running Docker, and deployed an application to it, with containers +running in concert on multiple machines. + +Here in part 5, you'll reach the top of the hierarchy of distributed +applications: the **stack**. A stack is a group of interelated services that +share dependencies, and can be orchestrated and scaled together. A single stack +is capable of defining and coordinating the functionality of an entire +application (though very complex applications may want to use multiple stacks). + +Some good news is, you have technically been working with stacks since part 3, +when you created a Compose file and used `docker stack deploy`. But that was a +single service stack running on a single host, which is not usually what takes +place in production. Here, you're going to take what you've learned and make +multiple services relate to each other, and run them on multiple machines. + +This is the home stretch, so congratulate yourself! + +## Adding a new service and redploying. + +It's easy to add services to our `docker-compose.yml` file. First, let's add +a free visualizer service that lets us look at how our swarm is scheduling +containers. Open up `docker-compose.yml` in an editor and replace its contents +with the following: + +```yaml +version: "3" +services: + web: + image: docs/get-started:part2 + deploy: + replicas: 5 + restart_policy: + condition: on-failure + resources: + limits: + cpus: "0.1" + memory: 50M + ports: + - "80:80" + networks: + - webnet + visualizer: + image: dockersamples/visualizer:stable + ports: + - "8080:8080" + volumes: + - "/var/run/docker.sock:/var/run/docker.sock" + deploy: + placement: + constraints: [node.role == manager] + networks: + - webnet +networks: + webnet: +``` + +The only thing new here is the peer service to `web`, named `visualizer`. You'll +see two new things here: a `volumes` key, giving the visualizer access to the +host's socket file for Docker, and a `placement` key, ensuring that this service +only ever runs on a swarm manager -- never a worker. That's because this +container, built from [an open source project created by +Docker](https://github.com/ManoMarks/docker-swarm-visualizer), displays Docker +services running on a swarm in a diagram. + +We'll talk more about placement constraints and volumes in a moment. But for +now, copy this new `docker-compose.yml` file to the swarm manager, `myvm1`: + +``` +docker-machine scp myvm1 docker-compose.yml myvm1:~ +``` + +Now just re-run the `docker stack deploy` command on the manager, and whatever +services need updating will be updated: + +``` +$ docker-machine ssh myvm1 "docker stack deploy -c docker-compose.yml getstartedlab" +Updating service getstartedlab_web (id: angi1bf5e4to03qu9f93trnxm) +Updating service getstartedlab_visualizer (id: l9mnwkeq2jiononb5ihz9u7a4) +``` + +You saw in the Compose file that `visualizer` runs on port 8080. Get the IP +address of the one of your nodes by running `docker-machine ls`. Go to either IP +address @ port 8080 and you will see the visualizer running: + +![Visualizer screenshot](get-started-visualizer1.png) + +The single copy of `visualizer` is running on the manager as you expect, and the +five instances of `web` are spread out across the swarm. You can corroborate +this visualization by running `docker stack ps `: + +``` +docker-machine ssh myvm1 "docker stack ps getstartedlab" +``` + +The visualizer is a standalone service that can run in any app that includes it +in the stack. It doesn't depend on anything else. Now let's create a service +that *does* have a dependency: the Redis service that will provide a visitor +counter. + + +## Persisting data + +Go through the same workflow once more. Save this new `docker-compose.yml` file, +which finally adds a Redis service. + +```yaml +version: "3" +services: + web: + image: johndmulhausen/get-started:part1 + deploy: + replicas: 5 + restart_policy: + condition: on-failure + resources: + limits: + cpus: "0.1" + memory: 50M + ports: + - "80:80" + networks: + - webnet + visualizer: + image: dockersamples/visualizer:stable + ports: + - "8080:8080" + volumes: + - "/var/run/docker.sock:/var/run/docker.sock" + deploy: + placement: + constraints: [node.role == manager] + networks: + - webnet + redis: + image: redis + ports: + - "6379:6739" + volumes: + - ./data:/data + deploy: + placement: + constraints: [node.role == manager] + networks: + - webnet +networks: + webnet: +``` + +Redis has an official image in the Docker library and has been granted the short +`image` name of just `redis`, so no `username/repo` notation here. The Redis +port, 6379, has been pre-configured by Redis to be exposed from the container to +the host, and here in our Compose file we expose it from the host to the world, +so you can actually enter the IP for any of your nodes into Redis Desktop +Manager and manage this Redis instance, if you so choose. + +Most importantly, there are a couple of things in the `redis` specification that +make data persist between deployments of this stack: + +- `redis` always runs on the manager, so it's always using the same filesystem. +- `redis` accesses an arbitrary directory in the host's file system as `/data` + inside the container, which is where Redis stores data. + +Together, this is creating a "source of truth" in your host's physical +filesystem for the Redis data. Without this, Redis would store its data in +`/data` inside the container's filesystem, which would get wiped out if that +container were ever redeployed. + +This source of truth has two components: + +- The placement constraint you put on the Redis service, ensuring that it + always uses the same host. +- The volume you created that lets the container access `./data` (on the host) + as `/data` (inside the Redis container). While containers come and go, the + files stored on `./data` on the specified host will persist, enabling + continuity. + +To deploy your new Redis-using stack, create `./data` on the manager, copy over +the new `docker-compose.yml` file with `docker-machine scp`, and run +`docker stack deploy` one more time. + +``` +$ docker-machine ssh myvm1 "mkdir ./data" +$ docker-machine scp compose-file.yml myvm1:~ +$ docker-machine ssh myvm1 "docker stack deploy -c docker-compose.yml getstartedlab" +``` + +Check the results on http://localhost and you'll see that a visitor counter is +now live and storing information on Redis. + +[On to Part 6 >>](part6.md){: class="button outline-btn" style="margin-bottom: 30px"} + +## Recap (optional) + +Here's [a terminal recording of what was covered on this page](https://asciinema.org/a/113840): + + + +You learned that stacks are inter-related services all running in concert, and +that -- surprise! -- you've been using stacks since part three of this tutorial. +You learned that to add more services to your stack, you insert them in your +Compose file. Finally, you learned that by using a combination of placement +constraints and volumes you can create a permanent home for persisting data, so +that your app's data survives when the container is torn down and redeployed. diff --git a/get-started/part6.md b/get-started/part6.md new file mode 100644 index 0000000000..7a04d96fe5 --- /dev/null +++ b/get-started/part6.md @@ -0,0 +1,171 @@ +--- +title: "Get Started, Part 6: Deploy your app" +keywords: deploy, production, datacenter, cloud, aws, azure, provider, admin, enterprise +description: Deploy your app to production using Docker CE or EE. +--- +{% include_relative nav.html selected="6" %} + +## Prerequisites + +- [Install Docker](/engine/installation/). +- Read the orientation in [Part 1](index.md). +- Learn how to create containers in [Part 2](part2.md). +- Make sure you have pushed the container you created to a registry, as + instructed; we'll be using it here. +- Ensure your image is working by + running this and visiting `http://localhost/` (slotting in your info for + `username`, `repo`, and `tag`): + + ``` + docker run -p 80:80 username/repo:tag + ``` +- Have [the final version of `docker-compose.yml` from Part 5](/get-started/part5/#persisting-data) handy. + +## Introduction + +You've been editing the same Compose file for this entire tutorial. Well, we +have good news: that Compose file works just as well in production as it does +on your machine. Here, we go through some options for running your +Dockerized application. + +## Choose an option + +{% capture cloud %} +If you're okay with using Docker Community Edition in +production, you can use Docker Cloud to help manage your app on popular +cloud providers such as Amazon Web Services, DigitalOcean, and Microsoft Azure. + +To set up and deploy: + +- Connect Docker Cloud with your preferred provider, granting Docker Cloud permission + to automatically provision and "Dockerize" VMs for you. +- Use Docker Cloud to create your computing resources and create your swarm. +- Deploy your app. + +> **Note**: We will be linking into the Docker Cloud documentation here; be sure + to come back to this page after completing each step. + +### Connect Docker Cloud + +First, link Docker Cloud with your cloud provider: + +* [Amazon Web Services setup guide](/docker-cloud/cloud-swarm/link-aws-swarm/){: onclick="ga('send', 'event', 'Get Started Referral', 'Cloud', 'AWS');"} +* [DigitalOcean setup guide](/docker-cloud/infrastructure/link-do.md){: onclick="ga('send', 'event', 'Get Started Referral', 'Cloud', 'DigitalOcean');"} +* [Microsoft Azure setup guide](/docker-cloud/infrastructure/link-azure.md){: onclick="ga('send', 'event', 'Get Started Referral', 'Cloud', 'Azure');"} +* [Packet setup guide](/docker-cloud/infrastructure/link-packet.md){: onclick="ga('send', 'event', 'Get Started Referral', 'Cloud', 'Packet');"} +* [SoftLayer setup guide](/docker-cloud/infrastructure/link-softlayer.md){: onclick="ga('send', 'event', 'Get Started Referral', 'Cloud', 'SoftLayer');"} +* [Use the Docker Cloud Agent to Bring your Own Host](/docker-cloud/infrastructure/byoh.md){: onclick="ga('send', 'event', 'Get Started Referral', 'Cloud', 'BYOH');"} + +### Create your swarm + +After your cloud provider is all set up, create a Swarm: + +* If you're on AWS you + can [automatically create a + swarm](/docker-cloud/cloud-swarm/create-cloud-swarm/){: onclick="ga('send', 'event', 'Get Started Referral', 'Cloud', 'Create AWS Swarm');"}. +* Otherwise, [create your nodes](/docker-cloud/getting-started/your_first_node/){: onclick="ga('send', 'event', 'Get Started Referral', 'Cloud', 'Create Nodes');"} + in the Docker Cloud UI, and run the `docker swarm init` and `docker swarm join` + commands you learned in [part 4](part4.md) over [SSH via Docker + Cloud](/docker-cloud/infrastructure/ssh-into-a-node/). Finally, [enable Swarm + Mode](/docker-cloud/cloud-swarm/using-swarm-mode/) by clicking the toggle at + the top of the screen, and [register the + swarm](/docker-cloud/cloud-swarm/register-swarms/) you just made. + +### Deploy your app + +[Connect to your swarm via Docker +Cloud](/docker-cloud/cloud-swarm/connect-to-swarm/). This opens a terminal whose +context is your local machine, but whose Docker commands are routed up to the +swarm running on your cloud provider. This is a little different from the +paradigm you've been following, where you were slinging commands via SSH; now, +you can directly access both your local file system and your remote swarm, +enabling some very tidy-looking commands: + +``` +docker stack deploy -c docker-compose.yml getstartedlab +``` + +That's it! Your app is running in production and is managed by Docker Cloud. +{% endcapture %} +{% capture enterpriseboilerplate %} +Customers of Docker Enterprise Edition run a stable, commercially-supported +version of Docker Engine, and as an add-on they get our first-class management +software, Docker Datacenter. You can manage every aspect of your application +via UI using Universal Control Plane, run a private image registry with Docker +Trusted Registry, integrate with your LDAP provider, sign production images with +Docker Content Trust, and many other features. + +[Take a tour of Docker Enterprise Edition](https://www.docker.com/enterprise-edition){: class="button outline-btn" onclick="ga('send', 'event', 'Get Started Referral', 'Enterprise', 'Take tour');"} +{% endcapture %} +{% capture enterprisedeployapp %} +Once you're all set up and Datacenter is running, you can [deploy your Compose +file from directly within the UI](/datacenter/ucp/2.1/guides/user/services/){: onclick="ga('send', 'event', 'Get Started Referral', 'Enterprise', 'Deploy app in UI');"}. + +![Deploy an app on DDC](/datacenter/ucp/2.1/guides/images/deploy-app-ui-1.png) + +After that, you'll see it running, and can change any aspect of the application +you choose, or even edit the Compose file itself. + +![Managing app on DDC](/datacenter/ucp/2.1/guides/images/deployed_visualizer.png) +{% endcapture %} +{% capture enterprisecloud %} +{{ enterpriseboilerplate }} + +The bad news is: the only cloud providers with official Docker +Enterprise editions are Amazon Web Services and Microsoft Azure. + +The good news is: there are one-click templates to quickly deploy Docker +Enterprise on each of these providers: + +* [Docker Enterprise for AWS](https://store.docker.com/editions/enterprise/docker-ee-aws?tab=description){: onclick="ga('send', 'event', 'Get Started Referral', 'Enterprise', 'EE for AWS');"} +* [Docker Enterprise for Azure](https://store.docker.com/editions/enterprise/docker-ee-azure?tab=description){: onclick="ga('send', 'event', 'Get Started Referral', 'Enterprise', 'EE for Azure');"} + +> **Note**: Having trouble with these? View [our setup guide for AWS](/datacenter/install/aws/){: onclick="ga('send', 'event', 'Get Started Referral', 'Enterprise', 'AWS setup guide');"}. +> You can also [view the WIP guide for Microsoft Azure](https://github.com/docker/docker.github.io/pull/2796){: onclick="ga('send', 'event', 'Get Started Referral', 'Enterprise', 'Azure setup guide');"}. + +{{ enterprisedeployapp }} +{% endcapture %} +{% capture enterpriseonprem %} +{{ enterpriseboilerplate }} + +Bringing your own server to Docker Enterprise and setting up Docker Datacenter +essentially involves two steps: + +1. [Get Docker Enterprise Edition for your server's OS from Docker Store](https://store.docker.com/search?offering=enterprise&type=edition){: onclick="ga('send', 'event', 'Get Started Referral', 'Enterprise', 'Get Docker EE for your OS');"}. +2. Follow the [instructions to install Datacenter on your own host](/datacenter/install/linux/){: onclick="ga('send', 'event', 'Get Started Referral', 'Enterprise', 'BYOH setup guide');"}. + +> **Note**: Running Windows containers? View our [Windows Server setup guide](/docker-ee-for-windows/install/){: onclick="ga('send', 'event', 'Get Started Referral', 'Enterprise', 'Windows Server setup guide');"}. + +{{ enterprisedeployapp }} +{% endcapture %} + + +
+
{{ cloud }}
+
{{ enterprisecloud }}
+
{{ enterpriseonprem }}
+
+ +## Congratulations! + +You've taken a full-stack, dev-to-deploy tour of the entire Docker platform. + +There is much more to the Docker platform than what was covered here, but you +have a good idea of the basics of containers, images, services, swarms, stacks, +scaling, load-balancing, volumes, and placement constraints. + +Want to go deeper? Here are some resources we recommend: + +- [Samples](/samples/): Our samples include multiple examples of popular software + running in containers, and some good labs that teach best practices. +- [User Guide](/engine/userguide/): The user guide has serveral examples that + explain networking and storage in greater depth than was covered here. +- [Admin Guide](/engine/admin/): Covers how to manage a Dockerized production + environment. +- [Training](https://training.docker.com/): Official Docker courses that offer + in-person instruction and virtual classroom environments. +- [Blog](https://blog.docker.com): Covers what's going on with Docker lately. diff --git a/index.md b/index.md index 5fbdf3a695..28bf618932 100644 --- a/index.md +++ b/index.md @@ -16,29 +16,207 @@ Fix docs bugs to claim the points, and cash in your points for prizes in [the sw [Hackathon details](/hackathon/){: class="button outline-btn" style="margin:20px"}[View available bugs on GitHub](https://github.com/docker/docker.github.io/milestone/9){: class="button outline-btn" style="margin:20px"} [Visit the rewards store](http://www.cafepress.com/dockerdocshackathon){: class="button outline-btn" style="margin:20px"} -## Introduction to Docker +## Get started with Docker -
-
-### Learn Docker basics +Try our new multi-part walkthrough that goes from writing your first app, +data storage, networking, and swarms, ending with your app running on +production servers in the cloud. Total reading time is less than an hour! -Get started learning Docker concepts, tools, and commands. The examples show you -how to build, push, and pull Docker images, and run them as containers. This -tutorial stops short of teaching you how to deploy applications. +[Get started with Docker](/get-started/){: class="button outline-btn" style="margin-bottom:30px"} -[Start the basic tutorial](/engine/getstarted/){: class="button outline-btn"} -
+{% if site.edge == true %} +{% capture ce-edge-section %} -
-### Define and deploy apps in Swarm Mode +## Docker CE Edge -Learn how to relate containers to each other, define them as services, and -configure an application stack ready to deploy at scale in a production -environment. Highlights Compose Version 3 new features and swarm mode. +The Docker CE Edge channel provides monthly releases which allow you to try +new features of Docker and verify bug fixes quickly. Edge releases are only +supported for one month, and a given Edge release will not receive any updates +once a new edge release is available. -[Start the application tutorial](/engine/getstarted-voting-app/){: class="button outline-btn"} -
-
+Stable releases are not published to the Edge channel, so Linux repository users +still need to subscribe to the Stable channel as well. + +Commercial support is not available for Docker CE. + +For information about all Docker release channels and expectations about +support, see [Docker channels](/engine/installation/#docker-channels). + + +Read more about Docker CE Edge releases + +
+ +This page lists features that are only available in Docker CE Edge releases. +Where applicable, the API and CLI reference documentation has been updated to +reflect these features, but **full documentation for a given feature may not be +available until a Docker CE Stable release incorporates the feature**. + +### Docker CE Edge new features + + +
+
+ +#### Docker CE Edge 17.04 + +The following major features and changes are included in Docker CE Edge 17.04. +Continue reading, or go straight to [API and CLI](#api-and-cli), +[Daemon](#daemon), [Dockerfile](#dockerfile), [Services](#services), or +[Stacks](#stacks). + +[Read the full release notes](https://github.com/docker/docker/releases/tag/v17.04.0-ce){: target="_blank" class="_" } + +##### API and CLI + +- Add `--device-cgroup-rule` flag to give containers access to devices that appear + after the container is started. {% include github-pr.md pr=22563 %} + +- Allow swarm nodes to join with `--availability=drain` to prevent them from + taking non-manager workloads. {% include github-pr.md pr=24993 %} + +- Add `publish` and `expose` filters to `docker ps`, so that containers can be + filtered by port or port range for TCP or UDP protocols {% include github-pr.md pr=27557 %} + +- Add `--no-trunc` and `--format` flags to the `docker service ls` command, and + as well as the ability to specify the default format for `docker service ls` + using the `ServicesFormat` option to the Docker CLI. Also add a + `docker stack services` command. {% include github-pr.md pr=28199 %} + +- Add ability to filter plugins by whether they are enabled or disabled in + `docker plugin ls` output. {% include github-pr.md pr=28627 %} + +- Add `mode` option to `--log-opts` flag for both `docker` and `dockerd`. If set + to `non-blocking`, and the log buffer fills up, log messages will be lost, but + the container will not block. The `max-buffer-size` option controls the + maximum size of the ring buffer. Defaults to `blocking`, which will cause the + container to block if messages cannot be logged. See + [Options for all drivers](/engine/admin/logging/overview.md#options-for-all-drivers). + {% include github-pr.md pr=28762 %} + +- It is no longer possible to inadvertently pull images on an architecture where + they will not run. {% include github-pr.md pr=29001 %} + +- It is now possible to create AWS log groups when using the AWS logging driver. + See [`awslogs-create-group`](engine/admin/logging/awslogs.md#awslogs-create-group). + {% include github-pr.md pr=29504 %} + +- Add the ability to filter `docker network ls` output by creation time, using + the `{% raw %}{{CreatedAt}}{% endraw %}` format specifier. + {% include github-pr.md pr=29900 %} + +- Named but untagged images are now removed if you run `docker image prune` if + `--dangling-only` is set to `true`. {% include github-pr.md pr=30330 %} + +- Add `--add-host` flag to `docker build`, which will add entries to the + `/etc/hosts` file of a container created from that image. The `/etc/hosts` + file is not saved within the image itself. {% include github-pr.md pr=30383 %} + +- Prevent `docker network ls` from pulling all the endpoints, to reduce + impact on the network. {% include github-pr.md pr=30673 %} + +- Windows-specific commands and options no longer show in command help text on + non-Windows clients. {% include github-pr.md pr=30780 %} + +- When you specify an IP address when running `docker network connect`, the + IP address is now checked for validity. {% include github-pr.md pr=30807 %} + +- Add the ability to customize bind-mount consistency to be more appropriate + for some platforms and workloads. Options are `consistent` (the default), + `cached`, or `delegated`. {% include github-pr.md pr=31047 %} + +##### Daemon + +- Docker Daemon logging settings no longer affect the `docker build` command. + {% include github-pr.md pr=29552 %} + +- Add a `registry-mirrors` configuration option for the Docker daemon, which + replaces the daemon's registry mirrors with a new set of registry mirrors. + {% include github-pr.md pr=29650 %} + +- Add the ability to specify the default shared memory size for the Docker + daemon, using the `--default-shm-size` or the `default-shm-size` key in + `daemon.json`. {% include github-pr.md pr=29692 %} + +- Add a `no-new-privileges` configuration option for the Docker daemon, which + prevents unprivileged containers from gaining new privileges. + {% include github-pr.md pr=29984 %} + +- If a Docker client communicates with an older daemon and attempts to perform + an operation not supported by the daemon, an error is printed, which shows + the API versions of both the client and daemon. + {% include github-pr.md pr=30187 %} + +- The Docker daemon no longer depends upon `sqlite`. This change means that it + is not possible to upgrade the Docker daemon from version 1.9 directly to the + latest version. It is recommended to upgrade from one major version to the + next, in sequence. {% include github-pr.md pr=30208 %} + +##### Dockerfile + +- Using the pattern `**/` in a Dockerfile now (correctly) behaves the same as + `**`. {% include github-pr.md pr=29043 %} + +- Time values less than 1 second are no longer allowed in health-check options + in the Dockerfile. {% include github-pr.md pr=31177 %} + +##### Services + +- When a service is updated with both `--secret-add` and `--secret-rm` in the + same operation, the order of operations is now changed so that the + `--secret-rm` always occurs first. {% include github-pr.md pr=29802 %} + +- Add the ability to create or update a service to be read-only using the + `--read-only` flag. {% include github-pr.md pr=30162 %} + +- Docker now updates swarm nodes if the swarm configuration is updated. + {% include github-pr.md pr=30259 %} + +- Add topology-aware placement preferences for Swarm services. This feature + allows services to be balanced over nodes based on a particular user-defined + property, such as which datacenter or rack they are located in. + See [Control service scale and placement](/engine/swarm/services.md#control-service-scale-and-placement). + {% include github-pr.md pr=30725 %} + +- Add the ability to customize the stop signal which will be sent to nodes, when + creating or updating a service. {% include github-pr.md pr=30754 %} + +- Add the ability to address a secret by name or prefix, as well as ID, when + updating it. {% include github-pr.md pr=30856 %} + +- Add the ability to roll back to a previous version of a service if an + updated service fails to deploy. Several flags are available at service + creation or update,to control the rollback action, failure threshold, + monitoring delay, rollback delay, and parallelism. + {% include github-pr.md pr=31108 %} + +- Add the ability to specify the stream when using the Docker service logs API. + {% include github-pr.md pr=31313 %} + +- Add `--tail` and `--since` flags to `docker service logs` command, to filter + the logs by time or to show the tail of the logs and show new content as it + is logged. {% include github-pr.md pr=31500 %} + +- Add a `--verbose` flag to the `docker inspect` command. For swarm networks, + this flag shows all nodes and services attached to the network. + {% include github-pr.md pr=31710 %} + +##### Stacks + +- Compose file version 3.2 is now supported. This includes support for different + types of endpoints and expands the options you can use when specifying mounts. + {% include github-pr.md pr=31795 %} + +
+ +
+
+{% endcapture %} +{{ ce-edge-section | markdownify }} +{% endif %} ## Docker Editions @@ -70,7 +248,6 @@ channel for more predictability. - ## Run Docker anywhere
diff --git a/learn.md b/learn.md deleted file mode 100644 index ac24fa2eaf..0000000000 --- a/learn.md +++ /dev/null @@ -1,35 +0,0 @@ ---- -title: Learn Docker -redirect_from: -- /engine/quickstart/ ---- - -In this section, you can explore various ways to get up to speed on -Docker workflows. - - - - - - - - - - -
-## Learn the basics of Docker - -The basic tutorial introduces Docker concepts, tools, and commands. The examples show you how to build, push, -and pull Docker images, and run them as containers. This -tutorial stops short of teaching you how to deploy applications. - -## Define and deploy applications - -The define-and-deploy tutorial shows how to relate -containers to each other and define them as services in an application that is ready to deploy at scale in a -production environment. Highlights Compose Version 3 new features and swarm mode. -
-[Start the basic tutorial](/engine/getstarted/){: class="button primary-btn"} - -[Start the application tutorial](/engine/getstarted-voting-app/){: class="button primary-btn"} -
diff --git a/machine/overview.md b/machine/overview.md index 87264394c6..df542524e2 100644 --- a/machine/overview.md +++ b/machine/overview.md @@ -11,21 +11,39 @@ You can use Docker Machine to: * Provision Swarm clusters ## What is Docker Machine? -Docker Machine is a tool that lets you install Docker Engine on virtual hosts, and manage the hosts with `docker-machine` commands. You can use Machine to create Docker hosts on your local Mac or Windows box, on your company network, in your data center, or on cloud providers like AWS or Digital Ocean. -Using `docker-machine` commands, you can start, inspect, stop, and restart a managed host, upgrade the Docker client and daemon, and configure a Docker client to talk to your host. +Docker Machine is a tool that lets you install Docker Engine on virtual hosts, +and manage the hosts with `docker-machine` commands. You can use Machine to +create Docker hosts on your local Mac or Windows box, on your company network, +in your data center, or on cloud providers like AWS or Digital Ocean. -Point the Machine CLI at a running, managed host, and you can run `docker` commands directly on that host. For example, run `docker-machine env default` to point to a host called `default`, follow on-screen instructions to complete `env` setup, and run `docker ps`, `docker run hello-world`, and so forth. +Using `docker-machine` commands, you can start, inspect, stop, and restart a +managed host, upgrade the Docker client and daemon, and configure a Docker +client to talk to your host. -Machine _was_ the _only_ way to run Docker on Mac or Windows previous to Docker v1.12. Starting with the beta program and Docker v1.12, [Docker for Mac](/docker-for-mac/index.md) and [Docker for Windows](/docker-for-windows/index.md) are available as native apps and the better choice for this use case on newer desktops and laptops. We encourage you to try out these new apps. The installers for Docker for Mac and Docker for Windows include Docker Machine, along with Docker Compose. +Point the Machine CLI at a running, managed host, and you can run `docker` +commands directly on that host. For example, run `docker-machine env default` to +point to a host called `default`, follow on-screen instructions to complete +`env` setup, and run `docker ps`, `docker run hello-world`, and so forth. -If you aren't sure where to begin, see [Get Started with Docker](/engine/getstarted/index.md), which helps you choose the right app for your system and guides you through a brief end-to-end tutorial on Docker. +Machine _was_ the _only_ way to run Docker on Mac or Windows previous to Docker +v1.12. Starting with the beta program and Docker v1.12, [Docker for +Mac](/docker-for-mac/index.md) and [Docker for +Windows](/docker-for-windows/index.md) are available as native apps and the +better choice for this use case on newer desktops and laptops. We encourage you +to try out these new apps. The installers for Docker for Mac and Docker for +Windows include Docker Machine, along with Docker Compose. + +If you aren't sure where to begin, see [Get Started with Docker](/get-started/), +which guides you through a brief end-to-end tutorial on Docker. ## Why should I use it? -Docker Machine enables you to provision multiple remote Docker hosts on various flavors of Linux. +Docker Machine enables you to provision multiple remote Docker hosts on various +flavors of Linux. -Additionally, Machine allows you to run Docker on older Mac or Windows systems, as described in the previous topic. +Additionally, Machine allows you to run Docker on older Mac or Windows systems, +as described in the previous topic. Docker Machine has these two broad use cases. @@ -39,28 +57,50 @@ Docker Machine has these two broad use cases. ![Docker Machine for provisioning multiple systems](img/provision-use-case.png) - Docker Engine runs natively on Linux systems. If you have a Linux box as your primary system, and want to run `docker` commands, all you need to do is download and install Docker Engine. However, if you want an efficient way to provision multiple Docker hosts on a network, in the cloud or even locally, you need Docker Machine. + Docker Engine runs natively on Linux systems. If you have a Linux box as your + primary system, and want to run `docker` commands, all you need to do is + download and install Docker Engine. However, if you want an efficient way to + provision multiple Docker hosts on a network, in the cloud or even locally, + you need Docker Machine. - Whether your primary system is Mac, Windows, or Linux, you can install Docker Machine on it and use `docker-machine` commands to provision and manage large numbers of Docker hosts. It automatically creates hosts, installs Docker Engine on them, then configures the `docker` clients. Each managed host ("**_machine_**") is the combination of a Docker host and a configured client. + Whether your primary system is Mac, Windows, or Linux, you can install Docker + Machine on it and use `docker-machine` commands to provision and manage large + numbers of Docker hosts. It automatically creates hosts, installs Docker + Engine on them, then configures the `docker` clients. Each managed host + ("**_machine_**") is the combination of a Docker host and a configured client. ## What's the difference between Docker Engine and Docker Machine? -When people say "Docker" they typically mean **Docker Engine**, the client-server application made up of the Docker daemon, a REST API that specifies interfaces for interacting with the daemon, and a command line interface (CLI) client that talks to the daemon (through the REST API wrapper). Docker Engine accepts `docker` commands from the CLI, such as `docker run `, `docker ps` to list running containers, `docker images` to list images, and so on. +When people say "Docker" they typically mean **Docker Engine**, the +client-server application made up of the Docker daemon, a REST API that +specifies interfaces for interacting with the daemon, and a command line +interface (CLI) client that talks to the daemon (through the REST API wrapper). +Docker Engine accepts `docker` commands from the CLI, such as `docker run +`, `docker ps` to list running containers, `docker images` to list +images, and so on. ![Docker Engine](img/engine.png) -**Docker Machine** is a tool for provisioning and managing your Dockerized hosts (hosts with Docker Engine on them). Typically, you install Docker Machine on your local system. Docker Machine has its own command line client `docker-machine` and the Docker Engine client, `docker`. You can use Machine to install Docker Engine on one or more virtual systems. These virtual systems can be local (as when you use Machine to install and run Docker Engine in VirtualBox on Mac or Windows) or remote (as when you use Machine to provision Dockerized hosts on cloud providers). The Dockerized hosts themselves can be thought of, and are sometimes referred to as, managed "**_machines_**". +**Docker Machine** is a tool for provisioning and managing your Dockerized hosts +(hosts with Docker Engine on them). Typically, you install Docker Machine on +your local system. Docker Machine has its own command line client +`docker-machine` and the Docker Engine client, `docker`. You can use Machine to +install Docker Engine on one or more virtual systems. These virtual systems can +be local (as when you use Machine to install and run Docker Engine in VirtualBox +on Mac or Windows) or remote (as when you use Machine to provision Dockerized +hosts on cloud providers). The Dockerized hosts themselves can be thought of, +and are sometimes referred to as, managed "**_machines_**". ![Docker Machine](img/machine.png) ## Where to go next -- [Install Docker Machine](install-machine.md) -- Create and run a Docker host on your [local system using VirtualBox](get-started.md) -- Provision multiple Docker hosts [on your cloud provider](get-started-cloud.md) -- [Provision a Docker Swarm cluster with Docker Machine](/swarm/provision-with-machine.md) (Legacy Swarm) +- [Install Docker Machine](install-machine.md) +- Create and run a Docker host on your [local system using VirtualBox](get-started.md) +- Provision multiple Docker hosts [on your cloud provider](get-started-cloud.md) +- [Provision a Docker Swarm cluster with Docker Machine](/swarm/provision-with-machine.md) (Legacy Swarm) - [Getting started with swarm mode](/engine/swarm/swarm-tutorial/) (Docker Engine 1.12 and above) -- [Understand Machine concepts](concepts.md) -- [Docker Machine driver reference](drivers/index.md) -- [Docker Machine subcommand reference](reference/index.md) -- [Migrate from Boot2Docker to Docker Machine](migrate-to-machine.md) +- [Understand Machine concepts](concepts.md) +- [Docker Machine driver reference](drivers/index.md) +- [Docker Machine subcommand reference](reference/index.md) +- [Migrate from Boot2Docker to Docker Machine](migrate-to-machine.md) diff --git a/swarm/install-w-machine.md b/swarm/install-w-machine.md index 10381e8f2d..bb0625435f 100644 --- a/swarm/install-w-machine.md +++ b/swarm/install-w-machine.md @@ -239,7 +239,7 @@ your swarm, and start an image on your swarm. $ docker run -it ubuntu bash ``` - For more examples and ideas, visit the [User Guide](/engine/userguide/intro/). + For more examples and ideas, visit the [User Guide](/engine/userguide/). 5. Use the `docker ps` command to find out which node the container ran on. diff --git a/toolbox/overview.md b/toolbox/overview.md index b17b5de06f..15fe96b7c0 100644 --- a/toolbox/overview.md +++ b/toolbox/overview.md @@ -55,7 +55,7 @@ Toolbox includes these Docker tools: ## Next Steps -* Try out the examples in the [Getting Started](/engine/getstarted/index.md) tutorial. +* Try the [Get started](/get-started/) tutorial. * Dig in deeper with [more tutorials and examples](/engine/tutorials/index.md) on building images, running containers, networking, managing data, and storing images on Docker Hub. diff --git a/toolbox/toolbox_install_mac.md b/toolbox/toolbox_install_mac.md index b789a5eb2d..87beec9498 100644 --- a/toolbox/toolbox_install_mac.md +++ b/toolbox/toolbox_install_mac.md @@ -247,7 +247,7 @@ installed as a part of the Toolbox install. ## Next Steps -* Try out the examples in the [Getting Started](/engine/getstarted/index.md) tutorial. +* Try the [Get started](/get-started/) tutorial. * Dig in deeper with [more tutorials and examples](/engine/tutorials/index.md) on building images, running containers, networking, managing data, and storing images on Docker Hub. diff --git a/toolbox/toolbox_install_windows.md b/toolbox/toolbox_install_windows.md index 9007ccc35f..074da01d2f 100644 --- a/toolbox/toolbox_install_windows.md +++ b/toolbox/toolbox_install_windows.md @@ -245,7 +245,7 @@ To uninstall Toolbox on Windows, do the following: ## Next Steps -* Try out the examples in the [Getting Started](/engine/getstarted/index.md) tutorial. +* Try out the [Get started](/get-started/) tutorial. * Dig in deeper with [more tutorials and examples](/engine/tutorials/index.md) on building images, running containers, networking, managing data, and storing images on Docker Hub.