Debian Codegraph @

doc/ko/lxc-unshare.sgml.in

raw
1 <!-- SPDX-License-Identifier: LGPL-2.1+ -->
2
3 <!DOCTYPE refentry PUBLIC @docdtd@ [
4
5 <!ENTITY commonoptions SYSTEM "@builddir@/common_options.sgml">
6 <!ENTITY seealso SYSTEM "@builddir@/see_also.sgml">
7 ]>
8
9 <refentry>
10
11 <docinfo><date>@LXC_GENERATE_DATE@</date></docinfo>
12
13 <refmeta>
14 <refentrytitle>lxc-unshare</refentrytitle>
15 <manvolnum>1</manvolnum>
16 </refmeta>
17
18 <refnamediv>
19 <refname>lxc-unshare</refname>
20
21 <refpurpose>
22 <!--
23 Run a task in a new set of namespaces.
24 -->
25 새로운 네임스페이스 내에서 태스크 실행
26 </refpurpose>
27 </refnamediv>
28
29 <refsynopsisdiv>
30 <cmdsynopsis>
31 <command>lxc-unshare</command>
32 <arg choice="req">-s, --namespaces <replaceable>namespaces</replaceable></arg>
33 <arg choice="opt">-u, --user <replaceable>user</replaceable></arg>
34 <arg choice="opt">-H, --hostname <replaceable>hostname</replaceable></arg>
35 <arg choice="opt">-i, --ifname <replaceable>ifname</replaceable></arg>
36 <arg choice="opt">-d, --daemon</arg>
37 <arg choice="opt">-M, --remount</arg>
38 <arg choice="req">command</arg>
39 </cmdsynopsis>
40 </refsynopsisdiv>
41
42 <refsect1>
43 <title><!-- Description -->설명</title>
44
45 <para>
46 <!--
47 <command>lxc-unshare</command> can be used to run a task in a cloned set
48 of namespaces. This command is mainly provided for testing purposes.
49 Despite its name, it always uses clone rather than unshare to create
50 the new task with fresh namespaces. Apart from testing kernel
51 regressions this should make no difference.
52 -->
53 <command>lxc-unshare</command>는 복제된 네임스페이스 내에서 태스크를 실행한다.
54 이 명령어는 주로 테스트 목적으로 사용된다.
55 이러한 이름에도 불구하고, 새 네임스페이스에 새로운 태스크를 생성하기 위해 unshare 대신 clone을 사용한다.
56 테스트 중인 커널 버전이 낮아지지 않는다면, 별 차이는 없다.
57 </para>
58
59 </refsect1>
60
61 <refsect1>
62
63 <title><!-- Options -->옵션</title>
64
65 <variablelist>
66
67 <varlistentry>
68 <term>
69 <option>-s, --namespaces <replaceable>namespaces</replaceable></option>
70 </term>
71 <listitem>
72 <para>
73 <!--
74 Specify the namespaces to attach to, as a pipe-separated list,
75 e.g. <replaceable>NETWORK|IPC</replaceable>. Allowed values are
76 <replaceable>MOUNT</replaceable>, <replaceable>PID</replaceable>,
77 <replaceable>UTSNAME</replaceable>, <replaceable>IPC</replaceable>,
78 <replaceable>USER </replaceable> and
79 <replaceable>NETWORK</replaceable>. This allows one to change
80 the context of the process to e.g. the network namespace of the
81 container while retaining the other namespaces as those of the
82 host. (The pipe symbol needs to be escaped, e.g.
83 <replaceable>MOUNT\|PID</replaceable> or quoted, e.g.
84 <replaceable>"MOUNT|PID"</replaceable>.)
85 -->
86 붙일 네임스페이스를 지정한다.
87 <replaceable>NETWORK|IPC</replaceable>와 같이 파이프(|)로 구분된 리스트를 사용할 수 있다. 허용되는 값은 <replaceable>MOUNT</replaceable>, <replaceable>PID</replaceable>, <replaceable>UTSNAME</replaceable>, <replaceable>IPC</replaceable>, <replaceable>USER </replaceable>, <replaceable>NETWORK</replaceable>이다. 이를 사용하여, 컨테이너의 네트워크 네임스페이스를 사용하면서도 다른 네임스페이스는 호스트의 것을 그대로 사용하는 등의 조작이 가능하다.
88 (파이프 기호는 <replaceable>MOUNT\|PID</replaceable>처럼 \로 처리를 해주거나, <replaceable>"MOUNT|PID"</replaceable>처럼 따옴표를 붙여야 한다.)
89 </para>
90 </listitem>
91 </varlistentry>
92
93 <varlistentry>
94 <term>
95 <option>-u, --user <replaceable>user</replaceable></option>
96 </term>
97 <listitem>
98 <para>
99 <!--
100 Specify a user which the new task should become.
101 -->
102 새로운 태스크를 실행할 사용자를 지정한다.
103 </para>
104 </listitem>
105 </varlistentry>
106
107 <varlistentry>
108 <term>
109 <option>-H, --hostname <replaceable>hostname</replaceable></option>
110 </term>
111 <listitem>
112 <para>
113 <!--
114 Set the hostname in the new container. Only allowed if
115 the UTSNAME namespace is set.
116 -->
117 새로운 컨테이너의 호스트이름을 지정한다. UTS 네임스페이스가 설정되었을 때만 가능하다.
118 </para>
119 </listitem>
120 </varlistentry>
121
122 <varlistentry>
123 <term>
124 <option>-i, --ifname <replaceable>interfacename</replaceable></option>
125 </term>
126 <listitem>
127 <para>
128 <!--
129 Move the named interface into the container. Only allowed
130 if the NETWORK namespace is set. You may specify this
131 argument multiple times to move multiple interfaces into
132 container.
133 -->
134 지정한 이름의 네트워크 인터페이스를 컨테이너 내부로 옮긴다. NETWORK 네임스페이스가 설정되었을 때만 가능하다. 여러개의 인터페이스를 옮기기 위해 여러번 이 인수를 지정하는 것도 가능하다.
135 </para>
136 </listitem>
137 </varlistentry>
138
139 <varlistentry>
140 <term>
141 <option>-d, --daemon</option>
142 </term>
143 <listitem>
144 <para>
145 <!--
146 Daemonize (do not wait for the container to exit before exiting)
147 -->
148 데몬화 한다. (컨테이너가 종료되기 전까지 기다리지 않는다)
149 </para>
150 </listitem>
151 </varlistentry>
152
153 <varlistentry>
154 <term>
155 <option>-M, --remount</option>
156 </term>
157 <listitem>
158 <para>
159 <!--
160 Mount default filesystems (/proc /dev/shm and /dev/mqueue)
161 in the container. Only allowed if MOUNT namespace is set.
162 -->
163 컨테이너 내부에 (/proc /dev/shm and /dev/mqueue)같은 기본 파일 시스템들을 마운트 한다. MOUNT 네임스페이스가 설정되었을 때만 가능하다.
164 </para>
165 </listitem>
166 </varlistentry>
167
168 </variablelist>
169
170 </refsect1>
171
172 <refsect1>
173 <title><!-- Examples -->예제</title>
174 <para>
175 <!--
176 To spawn a new shell with its own UTS (hostname) namespace,
177 <programlisting>
178 lxc-unshare -s UTSNAME /bin/bash
179 </programlisting>
180 If the hostname is changed in that shell, the change will not be
181 reflected on the host.
182 -->
183 자신만의 UTS(hostname) 네임스페이스를 갖는 새로운 쉘을 실행하려면 아래처럼 하면 된다.
184 <programlisting>
185 lxc-unshare -s UTSNAME /bin/bash
186 </programlisting>
187 만약, 그 쉘에서 호스트이름이 변경되어도 호스트에는 영향을 끼치지 않는다.
188 </para>
189 <para>
190 <!--
191 To spawn a shell in a new network, pid, and mount namespace,
192 <programlisting>
193 lxc-unshare -s "NETWORK|PID|MOUNT" /bin/bash
194 </programlisting>
195 The resulting shell will have pid 1 and will see no network interfaces.
196 After re-mounting /proc in that shell,
197 <programlisting>
198 mount -t proc proc /proc
199 </programlisting>
200 ps output will show there are no other processes in the namespace.
201 -->
202 새로운 네트워크, PID, 마운트 네임스페이스 내에 쉘을 실행하려면, 아래처럼 하면 된다.
203 <programlisting>
204 lxc-unshare -s "NETWORK|PID|MOUNT" /bin/bash
205 </programlisting>
206 그 결과 생긴 쉘은 1번 pid를 갖는다. 그리고 네트워크 인터페이스는 없다.
207 이 쉘에서 아래처럼 /proc을 다시 마운트하고
208 <programlisting>
209 mount -t proc proc /proc
210 </programlisting>
211 ps 명령어를 입력하면, 네임스페이스 내에서 다른 프로세스들은 보이지 않을 것이다.
212 </para>
213 <para>
214 <!--
215 To spawn a shell in a new network, pid, mount, and hostname
216 namespace.
217 <programlisting>
218 lxc-unshare -s "NETWORK|PID|MOUNT|UTSNAME" -M -H myhostname -i veth1 /bin/bash
219 </programlisting>
220 -->
221 새로운 네트워크, PID, 마운트 그리고 호스트 이름(UTS) 네임스페이스 내에 쉘을 실행하려면, 아래처럼 하면 된다.
222 <programlisting>
223 lxc-unshare -s "NETWORK|PID|MOUNT|UTSNAME" -M -H myhostname -i veth1 /bin/bash
224 </programlisting>
225
226 <!--
227 The resulting shell will have pid 1 and will see two network
228 interfaces (lo and veth1). The hostname will be "myhostname" and
229 /proc will have been remounted. ps output will show there are
230 no other processes in the namespace.
231 -->
232 그 결과 생긴 쉘은 1번 pid를 갖는다. 그리고 2개의 네트워크 인터페이스(lo와 veth1)를 갖는다. 호스트 이름은 "myhostname"이고, /proc은 다시 마운트 된다.
233 ps 명령어를 입력하면, 네임스페이스 내에서 다른 프로세스들은 보이지 않을 것이다.
234 </para>
235 </refsect1>
236
237 &seealso;
238
239 </refentry>
240
241 <!-- Keep this comment at the end of the file
242 Local variables:
243 mode: sgml
244 sgml-omittag:t
245 sgml-shorttag:t
246 sgml-minimize-attributes:nil
247 sgml-always-quote-attributes:t
248 sgml-indent-step:2
249 sgml-indent-data:t
250 sgml-parent-document:nil
251 sgml-default-dtd-file:nil
252 sgml-exposed-tags:nil
253 sgml-local-catalogs:nil
254 sgml-local-ecat-files:nil
255 End:
256 -->