How do I use stack? -5 minutes a day to play Docker container Technology (112) _docker

Source: Internet
Author: User

Click to have a surprise


With the stack YAML file defined, the application can be deployed through the Docker stack deploy command.

Docker will create the various resources according to the YAML content. In order to not duplicate the name, all resources will be prefixed with the stack names, and we are here wpstack_*.

After deployment is complete, you can view the status of various resources through related commands.

If you want to update some of the properties of the stack, modify the YAML file directly, and then redeploy it. For example, the WordPress port from 8000 to 8888.

Execute the Docker stack deploy command again.

Stack update succeeded. Check the service wpstack_wordpress to confirm that the port has been updated to 8888:

To update the port, Swarm started a new wpstack_wordpress container that had been shutdown before.

It is also easy to remove the stack:



Click to have a surprise


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.