Skip to content

Instantly share code, notes, and snippets.

@lhriley
Created March 8, 2018 20:09
Show Gist options
  • Select an option

  • Save lhriley/4f890b3fcabfd3759cd7e3c540abc5f3 to your computer and use it in GitHub Desktop.

Select an option

Save lhriley/4f890b3fcabfd3759cd7e3c540abc5f3 to your computer and use it in GitHub Desktop.
Quickly kill a named docker container without knowing all of the details of it
#!/bin/bash
service="DOCKER_CONTAINER"; docker kill $(docker ps | grep "${service}" | awk '{print $1}')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment