~ubuntu-branches/ubuntu/quantal/lxc/quantal-201208301614

« back to all changes in this revision

Viewing changes to doc/lxc-execute.sgml.in

  • Committer: Bazaar Package Importer
  • Author(s): Guido Trotter
  • Date: 2010-06-28 10:15:48 UTC
  • mto: (1.1.4 upstream) (3.1.5 sid)
  • mto: This revision was merged to the branch mainline in revision 7.
  • Revision ID: james.westby@ubuntu.com-20100628101548-vexhggdo6x9cpwtk
ImportĀ upstreamĀ versionĀ 0.7.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
51
51
      <command>lxc-execute <replaceable>-n name</replaceable>
52
52
        <optional>-f config_file</optional> <optional>-s KEY=VAL
53
53
        </optional>
54
 
        <replaceable>command</replaceable>
55
 
      </command>
 
54
        <replaceable>command</replaceable></command>
56
55
    </cmdsynopsis>
57
56
  </refsynopsisdiv>
58
57
 
60
59
    <title>Description</title>
61
60
 
62
61
    <para>
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.
67
 
    </para>
68
 
 
 
62
      <command>lxc-execute</command> runs the specified
 
63
      <replaceable>command</replaceable> inside the container
 
64
      specified by <replaceable>name</replaceable>.
 
65
    </para>
 
66
    <para>
 
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.
 
72
    </para>
69
73
    <para>
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
74
 
      the pid isolation.
 
75
      application in an isolated environment.
75
76
    </para>
76
 
 
 
77
    <para>
 
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.
 
87
     </para>
 
88
     <para>
 
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).
 
93
     </para>
77
94
  </refsect1>
78
95
 
79
96
  <refsect1>
82
99
 
83
100
      <varlistentry>
84
101
        <term>
85
 
          <option>-f <replaceable>config_file</replaceable></option>
 
102
          <option>-f, --rcfile <replaceable>config_file</replaceable></option>
86
103
        </term>
87
104
        <listitem>
88
105
          <para>
89
106
            Specify the configuration file to configure the virtualization
90
107
            and isolation functionalities for the container.
91
108
          </para>
 
109
          <para>
 
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).
 
113
          </para>
92
114
        </listitem>
93
115
      </varlistentry>
94
116
      <varlistentry>
95
117
        <term>
96
 
          <option>-s <replaceable>KEY=VAL</replaceable></option>
 
118
          <option>-s, --define <replaceable>KEY=VAL</replaceable></option>
97
119
        </term>
98
120
        <listitem>
99
121
          <para>