1
2
3
4
5
6
7
$ basename "$(head /proc/1/cgroup)"
a5fd0bad6a8c6dbf4bc41022d5614cc0eb97971d1279f4434473abb2d0290df4

// 確認
$ docker ps --no-trunc | awk '{print $1,$2}'
CONTAINER ID
a5fd0bad6a8c6dbf4bc41022d5614cc0eb97971d1279f4434473abb2d0290df4 container_name