We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 013005a commit d110a06Copy full SHA for d110a06
app/functions.sh
@@ -204,6 +204,10 @@ function get_self_cid {
204
if [[ ( ${#self_cid} != 64 ) && ( -f /proc/self/cgroup ) ]]; then
205
self_cid="$(grep -Eo -m 1 '[[:alnum:]]{64}' /proc/self/cgroup)"
206
fi
207
+ # cgroups v2
208
+ if [[ ( ${#self_cid} != 64 ) && ( -f /proc/self/mountinfo ) ]]; then
209
+ self_cid="$(grep '/userdata/hostname' /proc/self/mountinfo | grep -Eo '[[:alnum:]]{64}')"
210
+ fi
211
if [[ ( ${#self_cid} != 64 ) ]]; then
212
self_cid="$(docker_api "/containers/$(hostname)/json" | jq -r '.Id')"
213
0 commit comments