mirror of
https://git.proxmox.com/git/mirror_lxc
synced 2025-06-07 20:58:08 +00:00
doc: tweak documentation a little
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
This commit is contained in:
parent
f3672cf120
commit
084010482f
@ -102,8 +102,8 @@ by KATOH Yasufumi <karma at jazz.email.ne.jp>
|
|||||||
input faking via a TIOCSTI <command>ioctl</command> call after switching
|
input faking via a TIOCSTI <command>ioctl</command> call after switching
|
||||||
between userspace execution contexts with different privilege levels. Newer
|
between userspace execution contexts with different privilege levels. Newer
|
||||||
versions of <command>lxc-attach</command> will try to allocate a pseudo
|
versions of <command>lxc-attach</command> will try to allocate a pseudo
|
||||||
terminal master/slave pair on the host and attach any standard file
|
terminal file descriptor pair on the host and attach any standard file
|
||||||
descriptors which refer to a terminal to the slave side of the pseudo
|
descriptors which refer to a terminal to the container side of the pseudo
|
||||||
terminal before executing a shell or command. Note, that if none of the
|
terminal before executing a shell or command. Note, that if none of the
|
||||||
standard file descriptors refer to a terminal <command>lxc-attach</command>
|
standard file descriptors refer to a terminal <command>lxc-attach</command>
|
||||||
will not try to allocate a pseudo terminal. Instead it will simply attach
|
will not try to allocate a pseudo terminal. Instead it will simply attach
|
||||||
|
@ -246,22 +246,22 @@ by KATOH Yasufumi <karma at jazz.email.ne.jp>
|
|||||||
To spawn a shell in a new network, pid, mount, and hostname
|
To spawn a shell in a new network, pid, mount, and hostname
|
||||||
namespace.
|
namespace.
|
||||||
<programlisting>
|
<programlisting>
|
||||||
lxc-unshare -s "NETWORK|PID|MOUNT|UTSNAME" -M -H slave -i veth1 /bin/bash
|
lxc-unshare -s "NETWORK|PID|MOUNT|UTSNAME" -M -H myhostname -i veth1 /bin/bash
|
||||||
</programlisting>
|
</programlisting>
|
||||||
-->
|
-->
|
||||||
新しいネットワーク、PID、マウント、ホスト名 (UTS) 名前空間でシェルを起動するには、
|
新しいネットワーク、PID、マウント、ホスト名 (UTS) 名前空間でシェルを起動するには、
|
||||||
<programlisting>
|
<programlisting>
|
||||||
lxc-unshare -s "NETWORK|PID|MOUNT|UTSNAME" -M -H slave -i veth1 /bin/bash
|
lxc-unshare -s "NETWORK|PID|MOUNT|UTSNAME" -M -H myhostname -i veth1 /bin/bash
|
||||||
</programlisting>
|
</programlisting>
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
The resulting shell will have pid 1 and will see two network
|
The resulting shell will have pid 1 and will see two network
|
||||||
interfaces (lo and veth1). The hostname will be "slave" and
|
interfaces (lo and veth1). The hostname will be "myhostname" and
|
||||||
/proc will have been remounted. ps output will show there are
|
/proc will have been remounted. ps output will show there are
|
||||||
no other processes in the namespace.
|
no other processes in the namespace.
|
||||||
-->
|
-->
|
||||||
起動したシェルは PID 1 を持ち、2 つのネットワークインターフェース (lo と veth1) を持ちます。
|
起動したシェルは PID 1 を持ち、2 つのネットワークインターフェース (lo と veth1) を持ちます。
|
||||||
ホスト名は "slave" となり、/proc は再マウントされます。ps コマンドは、名前空間内には他のプロセスがない状態を表示するでしょう。
|
ホスト名は "myhostname" となり、/proc は再マウントされます。ps コマンドは、名前空間内には他のプロセスがない状態を表示するでしょう。
|
||||||
</para>
|
</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
|
@ -103,8 +103,8 @@ by Sungbae Yoo <sungbae.yoo at samsung.com>
|
|||||||
input faking via a TIOCSTI <command>ioctl</command> call after switching
|
input faking via a TIOCSTI <command>ioctl</command> call after switching
|
||||||
between userspace execution contexts with different privilege levels. Newer
|
between userspace execution contexts with different privilege levels. Newer
|
||||||
versions of <command>lxc-attach</command> will try to allocate a pseudo
|
versions of <command>lxc-attach</command> will try to allocate a pseudo
|
||||||
terminal master/slave pair on the host and attach any standard file
|
terminal file descriptor pair on the host and attach any standard file
|
||||||
descriptors which refer to a terminal to the slave side of the pseudo
|
descriptors which refer to a terminal to the container side of the pseudo
|
||||||
terminal before executing a shell or command. Note, that if none of the
|
terminal before executing a shell or command. Note, that if none of the
|
||||||
standard file descriptors refer to a terminal <command>lxc-attach</command>
|
standard file descriptors refer to a terminal <command>lxc-attach</command>
|
||||||
will not try to allocate a pseudo terminal. Instead it will simply attach
|
will not try to allocate a pseudo terminal. Instead it will simply attach
|
||||||
|
@ -242,21 +242,21 @@ by Sungbae Yoo <sungbae.yoo at samsung.com>
|
|||||||
To spawn a shell in a new network, pid, mount, and hostname
|
To spawn a shell in a new network, pid, mount, and hostname
|
||||||
namespace.
|
namespace.
|
||||||
<programlisting>
|
<programlisting>
|
||||||
lxc-unshare -s "NETWORK|PID|MOUNT|UTSNAME" -M -H slave -i veth1 /bin/bash
|
lxc-unshare -s "NETWORK|PID|MOUNT|UTSNAME" -M -H myhostname -i veth1 /bin/bash
|
||||||
</programlisting>
|
</programlisting>
|
||||||
-->
|
-->
|
||||||
새로운 네트워크, PID, 마운트 그리고 호스트 이름(UTS) 네임스페이스 내에 쉘을 실행하려면, 아래처럼 하면 된다.
|
새로운 네트워크, PID, 마운트 그리고 호스트 이름(UTS) 네임스페이스 내에 쉘을 실행하려면, 아래처럼 하면 된다.
|
||||||
<programlisting>
|
<programlisting>
|
||||||
lxc-unshare -s "NETWORK|PID|MOUNT|UTSNAME" -M -H slave -i veth1 /bin/bash
|
lxc-unshare -s "NETWORK|PID|MOUNT|UTSNAME" -M -H myhostname -i veth1 /bin/bash
|
||||||
</programlisting>
|
</programlisting>
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
The resulting shell will have pid 1 and will see two network
|
The resulting shell will have pid 1 and will see two network
|
||||||
interfaces (lo and veth1). The hostname will be "slave" and
|
interfaces (lo and veth1). The hostname will be "myhostname" and
|
||||||
/proc will have been remounted. ps output will show there are
|
/proc will have been remounted. ps output will show there are
|
||||||
no other processes in the namespace.
|
no other processes in the namespace.
|
||||||
-->
|
-->
|
||||||
그 결과 생긴 쉘은 1번 pid를 갖는다. 그리고 2개의 네트워크 인터페이스(lo와 veth1)를 갖는다. 호스트 이름은 "slave"이고, /proc은 다시 마운트 된다.
|
그 결과 생긴 쉘은 1번 pid를 갖는다. 그리고 2개의 네트워크 인터페이스(lo와 veth1)를 갖는다. 호스트 이름은 "myhostname"이고, /proc은 다시 마운트 된다.
|
||||||
ps 명령어를 입력하면, 네임스페이스 내에서 다른 프로세스들은 보이지 않을 것이다.
|
ps 명령어를 입력하면, 네임스페이스 내에서 다른 프로세스들은 보이지 않을 것이다.
|
||||||
</para>
|
</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
@ -90,8 +90,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|||||||
input faking via a TIOCSTI <command>ioctl</command> call after switching
|
input faking via a TIOCSTI <command>ioctl</command> call after switching
|
||||||
between userspace execution contexts with different privilege levels. Newer
|
between userspace execution contexts with different privilege levels. Newer
|
||||||
versions of <command>lxc-attach</command> will try to allocate a pseudo
|
versions of <command>lxc-attach</command> will try to allocate a pseudo
|
||||||
terminal master/slave pair on the host and attach any standard file
|
terminal file descriptor pair on the host and attach any standard file
|
||||||
descriptors which refer to a terminal to the slave side of the pseudo
|
descriptors which refer to a terminal to the container side of the pseudo
|
||||||
terminal before executing a shell or command. Note, that if none of the
|
terminal before executing a shell or command. Note, that if none of the
|
||||||
standard file descriptors refer to a terminal <command>lxc-attach</command>
|
standard file descriptors refer to a terminal <command>lxc-attach</command>
|
||||||
will not try to allocate a pseudo terminal. Instead it will simply attach
|
will not try to allocate a pseudo terminal. Instead it will simply attach
|
||||||
|
@ -190,11 +190,11 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|||||||
To spawn a shell in a new network, pid, mount, and hostname
|
To spawn a shell in a new network, pid, mount, and hostname
|
||||||
namespace.
|
namespace.
|
||||||
<programlisting>
|
<programlisting>
|
||||||
lxc-unshare -s "NETWORK|PID|MOUNT|UTSNAME" -M -H slave -i veth1 /bin/bash
|
lxc-unshare -s "NETWORK|PID|MOUNT|UTSNAME" -M -H myhostname -i veth1 /bin/bash
|
||||||
</programlisting>
|
</programlisting>
|
||||||
|
|
||||||
The resulting shell will have pid 1 and will see two network
|
The resulting shell will have pid 1 and will see two network
|
||||||
interfaces (lo and veth1). The hostname will be "slave" and
|
interfaces (lo and veth1). The hostname will be "myhostname" and
|
||||||
/proc will have been remounted. ps output will show there are
|
/proc will have been remounted. ps output will show there are
|
||||||
no other processes in the namespace.
|
no other processes in the namespace.
|
||||||
</para>
|
</para>
|
||||||
|
Loading…
Reference in New Issue
Block a user