edited screen snap breaking out topics for Docker Cloud swarm mode added another where-to-next link added more where-to-next links added back in on-page TOC for create swarm topic incorporated Ryan's review comments on first draft more Ryan's review comments, sweep thru all for consistency, notoc on short pages, etc. removed duplicate link to 'create a new swarm in docker cloud' Laura's comments incorporated re-organized Cloud topics, added in Swarm Mode Ryan's review comments on Cloud, added new type of advisory for Beta previews more review comments, manage infrastructure --> standard mode fixing image testing cloud images updates to Cloud welcome page for Swarm, non-Swarm descriptions add new cloud repository image retake of corrupted image fixed the other instance of corrupted image by referencing the retake fixing corrupted image on GitHub Signed-off-by: Victoria Bialas <victoria.bialas@docker.com>
3.1 KiB
description, keywords, redirect_from, title
| description | keywords | redirect_from | title | ||
|---|---|---|---|---|---|
| Deploy to Docker Cloud | deploy, docker, cloud |
|
Add a "Deploy to Docker Cloud" button |
The Deploy to Docker Cloud button allows developers to deploy stacks with
one click in Docker Cloud as long as they are logged in. The button is intended
to be added to README.md files in public GitHub repositories, although it can
be used anywhere else.
Note
: You must be logged in to Docker Cloud for the button to work correctly. If you are not logged in, you'll see a 404 error instead.
This is an example button to deploy our python quickstart:
The button redirects the user to the Launch new Stack wizard, with the stack definition already filled with the contents of any of the following files (which are fetched in the order shown) from the repository (taking into account branch and relative path):
docker-cloud.ymldocker-compose.ymlfig.yml
The user can still modify the stack definition before deployment.
Adding the 'Deploy to Docker Cloud' button in GitHub
You can simply add the following snippet to your README.md file:
[](https://cloud.docker.com/stack/deploy/)
Docker Cloud will detect the HTTP referer header and deploy the stack file found in the repository, branch and relative path where the source README.md file is stored.
Adding the 'Deploy to Docker Cloud' button in Docker Hub
If the button is displayed on the Docker Hub, Docker Cloud cannot automatically detect the source GitHub repository, branch and path. In this case, edit the repository description and add the following code:
[](https://cloud.docker.com/stack/deploy/?repo=<repo_url>)
where <repo_url> is the path to your GitHub repository (see below).
Adding the 'Deploy to Docker Cloud' button anywhere else
If you want to use the button somewhere else (i.e. from external documentation, or a landing site), you just need to create a link to the following URL:
https://cloud.docker.com/stack/deploy/?repo=<repo_url>
where <repo_url> is the path to your GitHub repository. For example:
https://github.com/docker/dockercloud-quickstart-pythonhttps://github.com/docker/dockercloud-quickstart-python/tree/stagingto use branchstaginginstead of the default branchhttps://github.com/docker/dockercloud-quickstart-python/tree/master/exampleto use branchmasterand the relative path/exampleinside the repository
You can use your own image for the link (or no image). Our Deploy to Docker Cloud image is available at the following URL:
https://files.cloud.docker.com/images/deploy-to-dockercloud.svg