2012-11-26 12:08:13 -05:00
|
|
|
<!--
|
2008-11-18 13:45:49 +00:00
|
|
|
|
|
|
|
lxc: linux Container library
|
|
|
|
|
|
|
|
(C) Copyright IBM Corp. 2007, 2008
|
|
|
|
|
|
|
|
Authors:
|
2013-03-19 11:19:06 +01:00
|
|
|
Daniel Lezcano <daniel.lezcano at free.fr>
|
2008-11-18 13:45:49 +00:00
|
|
|
|
|
|
|
This library is free software; you can redistribute it and/or
|
|
|
|
modify it under the terms of the GNU Lesser General Public
|
|
|
|
License as published by the Free Software Foundation; either
|
|
|
|
version 2.1 of the License, or (at your option) any later version.
|
|
|
|
|
|
|
|
This library is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
Lesser General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU Lesser General Public
|
|
|
|
License along with this library; if not, write to the Free Software
|
2013-09-03 14:29:46 -04:00
|
|
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
2008-11-18 13:45:49 +00:00
|
|
|
|
|
|
|
-->
|
|
|
|
|
2013-04-29 16:47:35 -04:00
|
|
|
<!DOCTYPE refentry PUBLIC @docdtd@ [
|
2009-05-28 15:32:29 +02:00
|
|
|
|
2009-05-28 15:32:30 +02:00
|
|
|
<!ENTITY commonoptions SYSTEM "@builddir@/common_options.sgml">
|
2009-05-28 15:32:29 +02:00
|
|
|
<!ENTITY seealso SYSTEM "@builddir@/see_also.sgml">
|
|
|
|
]>
|
2008-11-18 13:45:49 +00:00
|
|
|
|
|
|
|
<refentry>
|
|
|
|
|
|
|
|
<docinfo><date>@LXC_GENERATE_DATE@</date></docinfo>
|
|
|
|
|
|
|
|
<refmeta>
|
|
|
|
<refentrytitle>lxc-execute</refentrytitle>
|
|
|
|
<manvolnum>1</manvolnum>
|
|
|
|
</refmeta>
|
|
|
|
|
|
|
|
<refnamediv>
|
|
|
|
<refname>lxc-execute</refname>
|
|
|
|
|
|
|
|
<refpurpose>
|
|
|
|
run an application inside a container.
|
|
|
|
</refpurpose>
|
|
|
|
</refnamediv>
|
|
|
|
|
|
|
|
<refsynopsisdiv>
|
|
|
|
<cmdsynopsis>
|
2012-09-10 16:49:31 -04:00
|
|
|
<command>lxc-execute</command>
|
|
|
|
<arg choice="req">-n <replaceable>name</replaceable></arg>
|
2018-04-15 22:42:43 +02:00
|
|
|
<arg choice="opt">-d</arg>
|
2012-09-10 16:49:31 -04:00
|
|
|
<arg choice="opt">-f <replaceable>config_file</replaceable></arg>
|
|
|
|
<arg choice="opt">-s KEY=VAL</arg>
|
2018-09-09 13:22:58 +02:00
|
|
|
<arg choice="opt">-u, --uid <replaceable>uid</replaceable></arg>
|
|
|
|
<arg choice="opt">-g, --gid <replaceable>gid</replaceable></arg>
|
2012-09-10 16:49:31 -04:00
|
|
|
<arg choice="opt">-- <replaceable>command</replaceable></arg>
|
2008-11-18 13:45:49 +00:00
|
|
|
</cmdsynopsis>
|
|
|
|
</refsynopsisdiv>
|
|
|
|
|
|
|
|
<refsect1>
|
|
|
|
<title>Description</title>
|
|
|
|
|
|
|
|
<para>
|
2010-04-29 10:03:59 +02:00
|
|
|
<command>lxc-execute</command> runs the specified
|
|
|
|
<replaceable>command</replaceable> inside the container
|
|
|
|
specified by <replaceable>name</replaceable>.
|
|
|
|
</para>
|
|
|
|
<para>
|
|
|
|
It will setup the container
|
|
|
|
according to the configuration previously defined with the
|
|
|
|
lxc-create command or with the configuration file parameter.
|
|
|
|
If no configuration is
|
|
|
|
defined, the default isolation is used.
|
2008-11-18 13:45:49 +00:00
|
|
|
</para>
|
|
|
|
<para>
|
|
|
|
This command is mainly used when you want to quickly launch an
|
2010-04-29 10:03:59 +02:00
|
|
|
application in an isolated environment.
|
2008-11-18 13:45:49 +00:00
|
|
|
</para>
|
2010-04-29 10:03:59 +02:00
|
|
|
<para>
|
|
|
|
<command>lxc-execute</command> command will run the
|
|
|
|
specified command into the container via an intermediate
|
|
|
|
process, <command>lxc-init</command>.
|
|
|
|
This lxc-init after launching the specified command,
|
|
|
|
will wait for its end and all other reparented processes.
|
2013-10-20 00:34:07 -04:00
|
|
|
(to support daemons in the container).
|
2010-04-29 10:03:59 +02:00
|
|
|
In other words, in the
|
|
|
|
container, <command>lxc-init</command> has the pid 1 and the
|
|
|
|
first process of the application has the pid 2.
|
|
|
|
</para>
|
2010-04-29 10:03:59 +02:00
|
|
|
<para>
|
|
|
|
The above <command>lxc-init</command> is designed to forward received
|
|
|
|
signals to the started command.
|
|
|
|
</para>
|
2008-11-18 13:45:49 +00:00
|
|
|
</refsect1>
|
|
|
|
|
|
|
|
<refsect1>
|
|
|
|
<title>Options</title>
|
|
|
|
<variablelist>
|
|
|
|
|
|
|
|
<varlistentry>
|
|
|
|
<term>
|
2010-04-29 10:03:59 +02:00
|
|
|
<option>-f, --rcfile <replaceable>config_file</replaceable></option>
|
2008-11-18 13:45:49 +00:00
|
|
|
</term>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
Specify the configuration file to configure the virtualization
|
|
|
|
and isolation functionalities for the container.
|
|
|
|
</para>
|
2010-04-29 10:03:59 +02:00
|
|
|
<para>
|
|
|
|
This configuration file if present will be used even if there is
|
|
|
|
already a configuration file present in the previously created
|
|
|
|
container (via lxc-create).
|
|
|
|
</para>
|
2008-11-18 13:45:49 +00:00
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
2010-01-14 07:43:18 +01:00
|
|
|
<varlistentry>
|
|
|
|
<term>
|
2010-04-29 10:03:59 +02:00
|
|
|
<option>-s, --define <replaceable>KEY=VAL</replaceable></option>
|
2010-01-14 07:43:18 +01:00
|
|
|
</term>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
Assign value <replaceable>VAL</replaceable> to configuration
|
|
|
|
variable <replaceable>KEY</replaceable>. This overrides any
|
|
|
|
assignment done in <replaceable>config_file</replaceable>.
|
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
2018-04-15 22:42:43 +02:00
|
|
|
|
|
|
|
<varlistentry>
|
|
|
|
<term>
|
|
|
|
<option>-d, --daemon</option>
|
|
|
|
</term>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
Run the container as a daemon. As the container has no
|
|
|
|
more tty, if an error occurs nothing will be displayed,
|
|
|
|
the log file can be used to check the error.
|
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
2018-09-09 13:22:58 +02:00
|
|
|
<varlistentry>
|
|
|
|
<term>
|
2021-07-05 17:34:23 -03:00
|
|
|
<option>-u, --uid <replaceable>uid</replaceable></option>
|
2018-09-09 13:22:58 +02:00
|
|
|
</term>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
Executes the <replaceable>command</replaceable> with user ID
|
2018-10-07 17:00:50 +09:00
|
|
|
<replaceable>uid</replaceable> inside the container.
|
2018-09-09 13:22:58 +02:00
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
<varlistentry>
|
|
|
|
<term>
|
|
|
|
<option>--g, --gid <replaceable>gid</replaceable></option>
|
|
|
|
</term>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
Executes the <replaceable>command</replaceable> with group ID
|
2018-10-07 17:00:50 +09:00
|
|
|
<replaceable>gid</replaceable> inside the container.
|
2018-09-09 13:22:58 +02:00
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
2011-05-05 12:07:51 +02:00
|
|
|
<varlistentry>
|
|
|
|
<term><option>--</option></term>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
Signal the end of options and disables further option
|
|
|
|
processing. Any arguments after the -- are treated as
|
2013-04-09 09:41:15 -04:00
|
|
|
arguments to <replaceable>command</replaceable>.
|
2011-05-05 12:07:51 +02:00
|
|
|
</para>
|
|
|
|
<para>
|
2013-04-09 09:41:15 -04:00
|
|
|
This option is useful when you want specify options
|
|
|
|
to <replaceable>command</replaceable> and don't want
|
|
|
|
<command>lxc-execute</command> to interpret them.
|
2011-05-05 12:07:51 +02:00
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
2008-11-18 13:45:49 +00:00
|
|
|
|
|
|
|
</variablelist>
|
|
|
|
|
|
|
|
</refsect1>
|
|
|
|
|
2009-05-28 15:32:30 +02:00
|
|
|
&commonoptions;
|
|
|
|
|
2008-11-18 13:45:49 +00:00
|
|
|
<refsect1>
|
|
|
|
<title>Diagnostic</title>
|
|
|
|
|
|
|
|
<variablelist>
|
|
|
|
|
|
|
|
<varlistentry>
|
|
|
|
<term>The container is busy</term>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
The specified container is already running an
|
|
|
|
application. You should stop it before reuse this
|
|
|
|
container or create a new one.
|
|
|
|
</para>
|
|
|
|
</listitem>
|
2012-11-26 12:08:13 -05:00
|
|
|
</varlistentry>
|
2008-11-18 13:45:49 +00:00
|
|
|
|
|
|
|
</variablelist>
|
|
|
|
|
|
|
|
</refsect1>
|
|
|
|
|
2009-05-28 15:32:29 +02:00
|
|
|
&seealso;
|
2008-11-18 13:45:49 +00:00
|
|
|
|
|
|
|
<refsect1>
|
|
|
|
<title>Author</title>
|
|
|
|
<para>Daniel Lezcano <email>daniel.lezcano@free.fr</email></para>
|
|
|
|
</refsect1>
|
|
|
|
|
|
|
|
</refentry>
|
|
|
|
|
|
|
|
<!-- Keep this comment at the end of the file
|
|
|
|
Local variables:
|
|
|
|
mode: sgml
|
|
|
|
sgml-omittag:t
|
|
|
|
sgml-shorttag:t
|
|
|
|
sgml-minimize-attributes:nil
|
|
|
|
sgml-always-quote-attributes:t
|
|
|
|
sgml-indent-step:2
|
|
|
|
sgml-indent-data:t
|
|
|
|
sgml-parent-document:nil
|
|
|
|
sgml-default-dtd-file:nil
|
|
|
|
sgml-exposed-tags:nil
|
|
|
|
sgml-local-catalogs:nil
|
|
|
|
sgml-local-ecat-files:nil
|
|
|
|
End:
|
|
|
|
-->
|