According to the docs they are two same commands: docker stack deploy and docker deploy.
Is that the case or some information is hidden somewhere?
When running Docker Engine in swarm mode, you can use docker stack deploy to deploy a complete application stack to the swarm. The deploy command accepts a stack description in the form of a Compose file. The docker stack deploy command supports any Compose file of version “3.0” or above.
Docker Compose is an official tool that helps you manage your Docker containers by letting you define everything through a docker-compose. yml file. docker stack is a command that's embedded into the Docker CLI. It lets you manage a cluster of Docker containers through Docker Swarm.
In simplest terms, a stack is a unit of application deployment. Using stacks, developers can organize all of the resources required by an application or an application component as a single unit. This enables devs to deploy, tear down, and re-deploy their applications at will.
Docker lets you build, test, and deploy applications quickly Using Docker, you can quickly deploy and scale applications into any environment and know your code will run. Running Docker on AWS provides developers and admins a highly reliable, low-cost way to build, ship, and run distributed applications at any scale.
The commands are synonyms, they hit the same backend API. Docker is in the first steps of transitioning from from docker $verb
commands to docker $noun $verb
, so you'll also see commands like docker images
from before and docker image ls
, or even docker ps
and now docker container ps
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With