60
59
<title>Description</title>
63
<command>lxc-execute</command> runs
64
the <replaceable>command</replaceable> inside the container
65
specified by <replaceable>name</replaceable>. This command
66
should be used to launch an application, eg. sshd or bash.
62
<command>lxc-execute</command> runs the specified
63
<replaceable>command</replaceable> inside the container
64
specified by <replaceable>name</replaceable>.
67
It will setup the container
68
according to the configuration previously defined with the
69
lxc-create command or with the configuration file parameter.
70
If no configuration is
71
defined, the default isolation is used.
70
74
This command is mainly used when you want to quickly launch an
71
application in an isolated environment. It will create an
72
intermediate process allowing you application to daemonize in
73
the pid namespace and will mount the proc filesystem to complete
75
application in an isolated environment.
78
<command>lxc-execute</command> command will run the
79
specified command into the container via an intermediate
80
process, <command>lxc-init</command>.
81
This lxc-init after launching the specified command,
82
will wait for its end and all other reparented processes.
83
(that allows to support daemons in the container).
84
In other words, in the
85
container, <command>lxc-init</command> has the pid 1 and the
86
first process of the application has the pid 2.
89
The above <command>lxc-init</command> is designed to forward received
90
signals to the started command.
91
So <command>lxc-kill</command> (1) sent signal is received
92
by the user specified command (pid 2 in the container).
85
<option>-f <replaceable>config_file</replaceable></option>
102
<option>-f, --rcfile <replaceable>config_file</replaceable></option>
89
106
Specify the configuration file to configure the virtualization
90
107
and isolation functionalities for the container.
110
This configuration file if present will be used even if there is
111
already a configuration file present in the previously created
112
container (via lxc-create).
96
<option>-s <replaceable>KEY=VAL</replaceable></option>
118
<option>-s, --define <replaceable>KEY=VAL</replaceable></option>