Skip to content

Instantly share code, notes, and snippets.

@laundmo
Last active May 4, 2023 13:35
Show Gist options
  • Save laundmo/0bf14a41c8093085eae5686cbd773f4a to your computer and use it in GitHub Desktop.
Save laundmo/0bf14a41c8093085eae5686cbd773f4a to your computer and use it in GitHub Desktop.
compose up safety
docker-compose() {
if [[ $@ == "up" ]]; then
read -p "Without a -d flag, all containers will attach to the current terminal and will need to be stopped to detach. Are you sure?"
command docker-compose "$@"
else
command docker-compose "$@"
fi
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment