2016-03-03 08:18:17 +08:00
|
|
|
# NAME
|
|
|
|
runc exec - execute new process inside the container
|
|
|
|
|
|
|
|
# SYNOPSIS
|
2016-06-12 05:46:47 +08:00
|
|
|
runc exec [command options] <container-id> -- <container command> [args...]
|
2016-03-03 08:18:17 +08:00
|
|
|
|
|
|
|
Where "<container-id>" is the name for the instance of the container and
|
|
|
|
"<container command>" is the command to be executed in the container.
|
|
|
|
|
|
|
|
# EXAMPLE
|
|
|
|
For example, if the container is configured to run the linux ps command the
|
|
|
|
following will output a list of processes running in the container:
|
|
|
|
|
|
|
|
# runc exec <container-id> ps
|
|
|
|
|
|
|
|
# OPTIONS
|
2017-02-03 06:08:35 +08:00
|
|
|
--console value specify the pty slave path for use with the container
|
|
|
|
--cwd value current working directory in the container
|
|
|
|
--env value, -e value set environment variables
|
|
|
|
--tty, -t allocate a pseudo-TTY
|
|
|
|
--user value, -u value UID (format: <uid>[:<gid>])
|
2017-02-07 11:29:40 +08:00
|
|
|
--additional-gids value, -g value additional gids
|
2017-02-03 06:08:35 +08:00
|
|
|
--process value, -p value path to the process.json
|
|
|
|
--detach, -d detach from the container's process
|
|
|
|
--pid-file value specify the file to write the process id to
|
|
|
|
--process-label value set the asm process label for the process commonly used with selinux
|
|
|
|
--apparmor value set the apparmor profile for the process
|
|
|
|
--no-new-privs set the no new privileges value for the process
|
|
|
|
--cap value, -c value add a capability to the bounding set for the process
|
|
|
|
--no-subreaper disable the use of the subreaper used to reap reparented processes
|
2019-02-25 17:58:43 +08:00
|
|
|
--preserve-fds value pass N additional file descriptors to the container (stdio + $LISTEN_FDS + N in total) (default: 0)
|