diff --git a/datacenter/ucp/2.2/guides/user/services/deploy-app-cli.md b/datacenter/ucp/2.2/guides/user/services/deploy-app-cli.md index 19dec1ee4e..9ccdd1eede 100644 --- a/datacenter/ucp/2.2/guides/user/services/deploy-app-cli.md +++ b/datacenter/ucp/2.2/guides/user/services/deploy-app-cli.md @@ -158,6 +158,13 @@ from the Compose file in play. For example, 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. +## Pull images with stack deploy + +Let `docker stack deploy` handle any image pulls for you, instead of using +`docker pull`. This way, your deployment won't try to pull from nodes that +are down. Also, when new nodes are added to the swarm, images are pulled +automatically. + ## Cleanup When you're all done, you can take down the entire stack by using `docker stack diff --git a/develop/dev-best-practices.md b/develop/dev-best-practices.md index 8ea646cfac..bef4976d3a 100644 --- a/develop/dev-best-practices.md +++ b/develop/dev-best-practices.md @@ -95,6 +95,10 @@ keep image size small: are only available to services rather than standalone containers. These features allow you to keep your images as generic as possible and to avoid storing sensitive data within the Docker images or containers themselves. +- Let `docker stack deploy` handle any image pulls for you, instead of using + `docker pull`. This way, your deployment won't try to pull from nodes + that are down. Also, when new nodes are added to the swarm, images are + pulled automatically. There are limitations around sharing data amongst nodes of a swarm service. If you use [Docker for AWS](/docker-for-aws/persistent-data-volumes.md) or