Skip to content

Instantly share code, notes, and snippets.

@arikw
Last active April 26, 2021 09:52
Show Gist options
  • Save arikw/8064957ceda2904be41e43e83ab71997 to your computer and use it in GitHub Desktop.
Save arikw/8064957ceda2904be41e43e83ab71997 to your computer and use it in GitHub Desktop.
Docker snippets

Check if a context name exists (replace $CONTEXT_NAME)

  [ -n "$(docker context ls --format '{{ index .Name }}' | grep -w $CONTEXT_NAME)" ]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment