Compose 스타일 정의를 Swarm service 집합으로 배포하는 docker stack 그룹.
stack deploy 는 docker compose up 의 직접 대체가 아니라 Swarm용 배포 경로다.docker stack COMMAND
deploy: 새 stack 배포 또는 업데이트-c, –compose-file, –prune, –resolve-image, –with-registry-auth, –detachls: stack 목록 조회–formatservices: 특정 stack의 service 목록–filter, –format, -qps: stack task 목록–filter, –format, –no-resolve, –no-truncconfig: merge와 interpolation 후 최종 config 출력rm: stack 제거# Swarm stack 배포 docker stack deploy -c compose.yaml myapp # registry auth를 worker 노드에 전달 docker stack deploy -c compose.yaml --with-registry-auth myapp # task 상태 확인 docker stack ps myapp
docker compose 에서 동작하던 옵션 일부가 Swarm deploy 문맥에서는 다르게 해석되거나 무시될 수 있다.–with-registry-auth 필요 여부를 확인한다.deploy 섹션은 Swarm에서만 의미가 크며, standalone Compose에서는 무시되는 값이 많다.Usage: docker stack COMMAND Manage Swarm stacks Commands: config Outputs the final config file, after doing merges and interpolations deploy Deploy a new stack or update an existing stack ls List stacks ps List the tasks in the stack rm Remove one or more stacks services List the services in the stack Run 'docker stack COMMAND --help' for more information on a command.
+