How to use nsenter

In CoreOS i use ‘sudo nsenter --pid --uts --mount --ipc --net --target $pid’ to get into container, but now in rancheros is unuseable, just always print the help.

[rancher@ros ~]$ sudo nsenter --pid --uts --mount --ipc --net --target 1322
BusyBox v1.26.2 () multi-call binary.

Usage: nsenter [OPTIONS] [PROG [ARGS]]

        -t, --target=PID                Target process to get namespaces from
        -m, --mount[=FILE]              Enter mount namespace
        -u, --uts[=FILE]                Enter UTS namespace (hostname etc)
        -i, --ipc[=FILE]                Enter System V IPC namespace
        -n, --net[=FILE]                Enter network namespace
        -p, --pid[=FILE]                Enter pid namespace
        -U, --user[=FILE]               Enter user namespace
        -S, --setuid=UID                Set uid in entered namespace
        -G, --setgid=GID                Set gid in entered namespace
        --preserve-credentials          Don't touch uids or gids
        -r, --root[=DIR]                Set root directory
        -w, --wd[=DIR]                  Set working directory
        -F, --no-fork                   Don't fork before exec'ing PROG
1 Like