Create and Manage Container Stacks
Step 1: Go to Configure > Containers and Container Stacks
- SelectConfigurein the top menu and selectContainers and Container Stacks.
- On theContainers and Container Stacksscreen, click on theContainer Stackstab.If there are container stacks in the host machine, they will be listed in this tab. If there are no container stacks available, you will only see the buttonAdd Container Stack.
Step 2: Create a Container Stack
- On theContainer Stackstab, click onAdd Container Stack.
- Name the container stack. Don't use spaces or special characters. In the screen below, it is named:Hello_World_StackYou can use the Web Editor to type in or paste commands of the Docker* Compose file for the stack. The Docker* Compose versions supported are 3.0 and 3.7.
- Copy the example commands below and paste in the Web Editor.version: '3' services: roach1: image: cockroachdb/cockroach:latest command: "start --insecure" deploy: replicas: 1 ports: - 8080 roachN: image: cockroachdb/cockroach:latest command: "start --insecure --join=roach1,roachN" deploy: mode: global
- Click onDeploy Container Stack.You will see the stack deployment in progress notification.
Step 3: Manage Container Stacks
- On theContainer Stackstab, click on the container stack you created in the previous step.In theContainer Stack Servicesscreen, you will see the list of services in the stack, as well as information about their images, configurations and date of last update.
- Click onEdit Container Stack.In theEdit Container Stackscreen, all fields can be modified.
- In the Web Editor, change the number of replicas in line 8:replicas: 2
- Click onUpdate Container Stack.You will see the stack update in progress notification.Once the update is complete, you will see a notification.You can update and delete individual services in the stack as well.
docker service logs esm_portainer_edge_agent