Skip to content

Instantly share code, notes, and snippets.

@mageddo
Created January 27, 2019 15:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mageddo/b5bf403a645e50e16e878700e5cd6297 to your computer and use it in GitHub Desktop.
Save mageddo/b5bf403a645e50e16e878700e5cd6297 to your computer and use it in GitHub Desktop.
Customize stack command without need to duplicate service
CMD=ls docker stack deploy --prune -c stack.yml my-stack
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