Skip to content

Instantly share code, notes, and snippets.

@7error
Forked from nmarley/docker_cid.sh
Created August 13, 2020 01:57
Show Gist options
  • Select an option

  • Save 7error/9914f989b74785fe6e5a5665ab68fb9c to your computer and use it in GitHub Desktop.

Select an option

Save 7error/9914f989b74785fe6e5a5665ab68fb9c to your computer and use it in GitHub Desktop.

Revisions

  1. @nmarley nmarley created this gist Dec 8, 2016.
    5 changes: 5 additions & 0 deletions docker_cid.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,5 @@
    bash-4.3# cat /proc/1/cpuset
    /docker/13f8c221656e202db979d1e607c9c902282d8719ab70715978dd04ee6069d61e
    bash-4.3# DOCKER_CID=$(cat /proc/1/cpuset | cut -c9-)
    bash-4.3# echo $DOCKER_CID
    13f8c221656e202db979d1e607c9c902282d8719ab70715978dd04ee6069d61e