INNER CODE UNIT · Go
CDEBUG_ROOTFS
iximiuz/cdebug · cmd/exec/exec.go:286
export CDEBUG_ROOTFS=/
if [ "${HOME:-/}" != "/" ]; then
ln -s /proc/{{ .TARGET_PID }}/root/ ${HOME}target-rootfs
fi
# TODO: Add target container's PATH to the user's PATH
exec {{ .Cmd }}
`))
chrootEntrypoint = template.Must(template.New("chroot-entrypoint").Parse(`
set -eu
CURRENT_PID=$(sh -c 'echo $PPID')
{{ if .IsNix }}
CURRENT_NIX_INODE=$(stat -c '%i' /nix)