github.com/zhuohuang-hust/src-cbuild@v0.0.0-20230105071821-c7aab3e7c840/mergeCode/runc/man/runc-exec.8.md (about)

     1  # NAME
     2     runc exec - execute new process inside the container
     3  
     4  # SYNOPSIS
     5     runc exec [command options] <container-id> -- <container command> [args...]
     6  
     7  Where "<container-id>" is the name for the instance of the container and
     8  "<container command>" is the command to be executed in the container.
     9  
    10  # EXAMPLE
    11  For example, if the container is configured to run the linux ps command the
    12  following will output a list of processes running in the container:
    13  
    14         # runc exec <container-id> ps
    15  
    16  # OPTIONS
    17     --console value              specify the pty slave path for use with the container
    18     --cwd value                  current working directory in the container
    19     --env value, -e value        set environment variables
    20     --tty, -t                    allocate a pseudo-TTY
    21     --user value, -u value       UID (format: <uid>[:<gid>])
    22     --process value, -p value    path to the process.json
    23     --detach, -d                 detach from the container's process
    24     --pid-file value             specify the file to write the process id to
    25     --process-label value        set the asm process label for the process commonly used with selinux
    26     --apparmor value             set the apparmor profile for the process
    27     --no-new-privs               set the no new privileges value for the process
    28     --cap value, -c value        add a capability to the bounding set for the process
    29     --no-subreaper               disable the use of the subreaper used to reap reparented processes