CMD=ls docker stack deploy --prune -c stack.yml my-stack
Created
January 27, 2019 15:03
-
-
Save mageddo/b5bf403a645e50e16e878700e5cd6297 to your computer and use it in GitHub Desktop.
Customize stack command without need to duplicate service
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '3' | |
services: | |
docker: | |
image: alpine | |
command: sh -c $CMD | |
deploy: | |
restart_policy: | |
condition: on-failure | |
mode: global |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment