Docker stack
Jump to navigation
Jump to search
External
Internal
Overview
docker stack --orchestrator kubernetes <command>
Commands
ls
List stacks.
ps
List the tasks in the specified stack.
deploy
Deploy a new stack or update an existing stack.
docker stack deploy -c ./docker-compose-test.yml --namespace default test-stack
Example of a specification file that deploys PostgreSQL:
---
version: '3.7'
volumes:
c3-pg-db:
services:
c3-pg:
image: mdillon/postgis:${POSTGRES_VERSION}
ports:
- "5432:5432"
volumes:
- "c3-pg-db:/var/lib/postgresql/data"
services
List the services in the stack.
rm
Remove one or more stacks.
Examples
docker stack ps --namespace namespace-name stack-name