Skip to content

Instantly share code, notes, and snippets.

@runcom
Created October 18, 2016 18:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save runcom/cb47fb04a2eedd5aff79cc5ec78302fd to your computer and use it in GitHub Desktop.
Save runcom/cb47fb04a2eedd5aff79cc5ec78302fd to your computer and use it in GitHub Desktop.
$ export id=$(docker run -d busybox sleep 10000)
$ docker exec -d $id tail -f /dev/null # runaway process
$ export exec_id=$(docker inspect $id | jq -r '.[0].ExecIDs[0]') # just getting the first one since there's only one
$ sudo kill -9 $(sudo cat /var/run/docker/libcontainerd/containerd/$id/$exec_id/pid)
$ docker inspect $id | jq -r '.[0].ExecIDs' # should be null as we killed it!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment