Skip to content

Instantly share code, notes, and snippets.

@mz2
Created March 27, 2017 12:05
Show Gist options
  • Save mz2/0474b86c0261e415de422aaee4136e1c to your computer and use it in GitHub Desktop.
Save mz2/0474b86c0261e415de422aaee4136e1c to your computer and use it in GitHub Desktop.
An example script that kills previous instance(s) of a docker container with name "manuscript-annotations"
#!/bin/bash
# $PATH tweak done so this also runs from Xcode.
PATH="/usr/local/bin:${PATH}"
if [[ $(docker ps -q --filter=ancestor=manuscript-annotations) ]]; then
docker stop $(docker ps -q --filter=ancestor=manuscript-annotations)
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment