Docker advanced method of rapid expansion

Docker advanced method of rapid expansion

1. Command method

Run the nginx service in the created Swarm cluster and use the --replicas parameter to specify the number of replicas to start.

docker service create --replicas 3 -p 80:80 --name nginx nginx:latest

or

docker service create -p 80:80 --name nginx nginx:latest
docker service scale nginx=3
docker service ls #View the copy status

2. Portainer method

You can use portainer to create a service on the web interface and specify the number of replicas. You can also dynamically increase or decrease the number of replicas at any time.

The above is the full content of this article. I hope it will be helpful for everyone’s study. I also hope that everyone will support 123WORDPRESS.COM.

You may also be interested in:
  • Detailed explanation of dynamic expansion of Docker container hard disk

<<:  MySQL Community Server 8.0.12 installation and configuration method graphic tutorial

>>:  Vue element implements table adding, deleting and modifying data

Recommend

Example code of vue custom component to implement v-model two-way binding data

In the project, you will encounter custom public ...

JavaScript imitates Jingdong carousel effect

This article shares the specific code for JavaScr...

Design perspective technology is an important capital of design ability

A design soldier asked: "Can I just do pure ...

Example of asynchronous file upload in html

Copy code The code is as follows: <form action...

Analysis of statement execution order of sql and MySQL

I encountered a problem today: Can I use the as a...

HTML Tutorial: Unordered List

<br />Original text: http://andymao.com/andy...

Detailed explanation of galera-cluster deployment in cluster mode of MySQL

Table of contents 1: Introduction to galera-clust...

How to reference jQuery in a web page

It can be referenced through CDN (Content Delivery...

How to open MySQL binlog log

binlog is a binary log file, which records all my...

Detailed analysis of the difference between Ref and Reactive in Vue3.0

Table of contents Ref and Reactive Ref Reactive T...

Simple tutorial on using Navicat For MySQL

recommend: Navicat for MySQL 15 Registration and ...

Optimization analysis of Limit query in MySQL optimization techniques

Preface In actual business, paging is a common bu...