Usage

December 17, 2019 ยท View on GitHub

Usage: enroot exec [options] [--] PID COMMAND [ARG...]

Execute a command inside an existing container.

 Options:
   -e, --env KEY[=VAL]  Export an environment variable inside the container

Description

Execute a command inside an existing container referred to by a proccess identifier.
The process identifier of a container can be obtained using the list command.

Example

# Start an alpine container, print its process identifier and sleep forever.
$ enroot start alpine sh -c 'echo $$; sleep infinity'
12019

# Execute bash inside the running container.
$ enroot exec 12019 bash