Skip to content

Instantly share code, notes, and snippets.

@gardner
Created October 17, 2019 01:27
Show Gist options
  • Save gardner/97936531ae61cef012c3c25031034236 to your computer and use it in GitHub Desktop.
Save gardner/97936531ae61cef012c3c25031034236 to your computer and use it in GitHub Desktop.
docker-compose command
#!/bin/bash
FILE='';
for f in *.yml; do
FILES="$FILES -f $f"
done
if [ ! -e .last-pull ]; then
touch .last-pull
fi
if test "`find .last-pull -mmin +1440`"; then
docker-compose $FILES pull
touch .last-pull
fi
docker-compose $FILES "$@"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment