Created
November 8, 2018 12:57
-
-
Save klihelp/ae048e2b770543d81e5869f3556c21ca to your computer and use it in GitHub Desktop.
Docker Pause Toggle
This file contains hidden or 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
# Toggle paused status for running containers | |
if [[ $(docker ps -q -f status=paused | wc -l) -gt 0 ]]; then docker unpause $(docker ps -q -f status=paused); else docker pause $(docker ps -q -f status=running); fi; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment