]> git.proxmox.com Git - mirror_lxc.git/blame - doc/lxc-execute.sgml.in
Various fedora template improvements
[mirror_lxc.git] / doc / lxc-execute.sgml.in
CommitLineData
d823d5b9 1<!--
2
3lxc: linux Container library
4
5(C) Copyright IBM Corp. 2007, 2008
6
7Authors:
8Daniel Lezcano <dlezcano at fr.ibm.com>
9
10This library is free software; you can redistribute it and/or
11modify it under the terms of the GNU Lesser General Public
12License as published by the Free Software Foundation; either
13version 2.1 of the License, or (at your option) any later version.
14
15This library is distributed in the hope that it will be useful,
16but WITHOUT ANY WARRANTY; without even the implied warranty of
17MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18Lesser General Public License for more details.
19
20You should have received a copy of the GNU Lesser General Public
21License along with this library; if not, write to the Free Software
22Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
23
24-->
25
99e4008c
MN
26<!DOCTYPE refentry PUBLIC "-//Davenport//DTD DocBook V3.0//EN" [
27
10fba81b 28<!ENTITY commonoptions SYSTEM "@builddir@/common_options.sgml">
99e4008c
MN
29<!ENTITY seealso SYSTEM "@builddir@/see_also.sgml">
30]>
d823d5b9 31
32<refentry>
33
34 <docinfo><date>@LXC_GENERATE_DATE@</date></docinfo>
35
36 <refmeta>
37 <refentrytitle>lxc-execute</refentrytitle>
38 <manvolnum>1</manvolnum>
39 </refmeta>
40
41 <refnamediv>
42 <refname>lxc-execute</refname>
43
44 <refpurpose>
45 run an application inside a container.
46 </refpurpose>
47 </refnamediv>
48
49 <refsynopsisdiv>
50 <cmdsynopsis>
51 <command>lxc-execute <replaceable>-n name</replaceable>
20117280
CLG
52 <optional>-f config_file</optional> <optional>-s KEY=VAL
53 </optional>
dfafa5a5 54 <optional>--</optional>
11eaec4c 55 <replaceable>command</replaceable></command>
d823d5b9 56 </cmdsynopsis>
57 </refsynopsisdiv>
58
59 <refsect1>
60 <title>Description</title>
61
62 <para>
94b81f61
MN
63 <command>lxc-execute</command> runs the specified
64 <replaceable>command</replaceable> inside the container
65 specified by <replaceable>name</replaceable>.
66 </para>
67 <para>
68 It will setup the container
69 according to the configuration previously defined with the
70 lxc-create command or with the configuration file parameter.
71 If no configuration is
72 defined, the default isolation is used.
d823d5b9 73 </para>
d823d5b9 74 <para>
75 This command is mainly used when you want to quickly launch an
94b81f61 76 application in an isolated environment.
d823d5b9 77 </para>
94b81f61
MN
78 <para>
79 <command>lxc-execute</command> command will run the
80 specified command into the container via an intermediate
81 process, <command>lxc-init</command>.
82 This lxc-init after launching the specified command,
83 will wait for its end and all other reparented processes.
84 (that allows to support daemons in the container).
85 In other words, in the
86 container, <command>lxc-init</command> has the pid 1 and the
87 first process of the application has the pid 2.
88 </para>
e4b3fe58 89 <para>
90 The above <command>lxc-init</command> is designed to forward received
91 signals to the started command.
92 So <command>lxc-kill</command> (1) sent signal is received
93 by the user specified command (pid 2 in the container).
94 </para>
d823d5b9 95 </refsect1>
96
97 <refsect1>
98 <title>Options</title>
99 <variablelist>
100
d823d5b9 101 <varlistentry>
102 <term>
94b81f61 103 <option>-f, --rcfile <replaceable>config_file</replaceable></option>
d823d5b9 104 </term>
105 <listitem>
106 <para>
107 Specify the configuration file to configure the virtualization
108 and isolation functionalities for the container.
109 </para>
94b81f61
MN
110 <para>
111 This configuration file if present will be used even if there is
112 already a configuration file present in the previously created
113 container (via lxc-create).
114 </para>
d823d5b9 115 </listitem>
116 </varlistentry>
20117280
CLG
117 <varlistentry>
118 <term>
94b81f61 119 <option>-s, --define <replaceable>KEY=VAL</replaceable></option>
20117280
CLG
120 </term>
121 <listitem>
122 <para>
123 Assign value <replaceable>VAL</replaceable> to configuration
124 variable <replaceable>KEY</replaceable>. This overrides any
125 assignment done in <replaceable>config_file</replaceable>.
126 </para>
127 </listitem>
128 </varlistentry>
dfafa5a5
CLG
129 <varlistentry>
130 <term><option>--</option></term>
131 <listitem>
132 <para>
133 Signal the end of options and disables further option
134 processing. Any arguments after the -- are treated as
135 arguments.
136 </para>
137 <para>
138 This option is useful when you want to execute, with the
139 command <command>lxc-execute</command>, a command line
140 with its own options.
141 </para>
142 </listitem>
143 </varlistentry>
d823d5b9 144
145 </variablelist>
146
147 </refsect1>
148
10fba81b
MN
149 &commonoptions;
150
d823d5b9 151 <refsect1>
152 <title>Diagnostic</title>
153
154 <variablelist>
155
156 <varlistentry>
157 <term>The container is busy</term>
158 <listitem>
159 <para>
160 The specified container is already running an
161 application. You should stop it before reuse this
162 container or create a new one.
163 </para>
164 </listitem>
165 </varlistentry>
166
167 </variablelist>
168
169 </refsect1>
170
99e4008c 171 &seealso;
d823d5b9 172
173 <refsect1>
174 <title>Author</title>
175 <para>Daniel Lezcano <email>daniel.lezcano@free.fr</email></para>
176 </refsect1>
177
178</refentry>
179
180<!-- Keep this comment at the end of the file
181Local variables:
182mode: sgml
183sgml-omittag:t
184sgml-shorttag:t
185sgml-minimize-attributes:nil
186sgml-always-quote-attributes:t
187sgml-indent-step:2
188sgml-indent-data:t
189sgml-parent-document:nil
190sgml-default-dtd-file:nil
191sgml-exposed-tags:nil
192sgml-local-catalogs:nil
193sgml-local-ecat-files:nil
194End:
195-->