-
This commit is contained in:
@@ -6,6 +6,10 @@
|
||||
|
||||
_script_path_this=$(realpath "$(ps -p $$ -o args= 2>/dev/null | awk '{print $2}')")
|
||||
_latter="${_script_path_this#/apps/data}"
|
||||
if [[ -z "$APPS_DATA" ]]; then
|
||||
runc_name=$(grep devices </proc/self/cgroup | awk -F / '{print $NF}')
|
||||
APPS_DATA=$(cat "/host/workspace/runc-rootfs/$runc_name/config.json" | jq -r '.mounts[] | select(.destination == "/apps/data") | .source')
|
||||
fi
|
||||
_absolute_path="${APPS_DATA}$_latter"
|
||||
|
||||
nsenter --mount=/host/proc/1/ns/mnt --net=/host/proc/1/ns/net /usr/bin/bash "$_absolute_path"
|
||||
|
||||
Reference in New Issue
Block a user