~serge-hallyn/ubuntu/saucy/lxc/lxc-dnsmasq

« back to all changes in this revision

Viewing changes to doc/lxc-attach.1

  • Committer: Stéphane Graber
  • Date: 2013-02-18 15:20:18 UTC
  • mto: This revision was merged to the branch mainline in revision 190.
  • Revision ID: stgraber@ubuntu.com-20130218152018-ls2gi9hkqs2kuhj8
Tags: upstream-0.9.0~alpha3
Import upstream version 0.9.0~alpha3

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
.\" This manpage has been automatically generated by docbook2man 
2
 
.\" from a DocBook document.  This tool can be found at:
3
 
.\" <http://shell.ipoline.com/~elmert/comp/docbook2X/> 
4
 
.\" Please send any bug reports, improvements, comments, patches, 
5
 
.\" etc. to Steve Cheng <steve@ggi-project.org>.
6
 
.TH "LXC-ATTACH" "1" "02 March 2012" "" ""
7
 
 
8
 
.SH NAME
9
 
lxc-attach \- start a process inside a running container.
10
 
.SH SYNOPSIS
11
 
 
12
 
\fBlxc-attach \fI-n
13
 
name\fB [-a
14
 
arch] [-e]
15
 
[-- command]\fR
16
 
 
17
 
.SH "DESCRIPTION"
18
 
.PP
19
 
\fBlxc-attach\fR runs the specified
20
 
\fIcommand\fR inside the container
21
 
specified by \fIname\fR\&. The container
22
 
has to be running already.
23
 
.PP
24
 
If no \fIcommand\fR is specified, the
25
 
current default shell of the user running
26
 
\fBlxc-attach\fR will be looked up inside the
27
 
container and executed. This will fail if no such user exists
28
 
inside the container or the container does not have a working
29
 
nsswitch mechanism.
30
 
.SH "OPTIONS"
31
 
.TP
32
 
\fB   -a, --arch \fIarch\fB \fR
33
 
Specify the architecture which the kernel should appear to be
34
 
running as to the command executed. This option will accept the
35
 
same settings as the \fBlxc.arch\fR option in
36
 
container configuration files, see
37
 
\fB\fIlxc.conf\fB\fR(5)\&. By default, the current archictecture of the
38
 
running container will be used.
39
 
.TP
40
 
\fB   -e, --elevated-privileges \fR
41
 
Do not drop privileges when running
42
 
\fIcommand\fR inside the container. If
43
 
this option is specified, the new process will
44
 
\fBnot\fR be added to the container's cgroup(s)
45
 
and it will not drop its capabilities before executing.
46
 
 
47
 
\fBWarning:\fR This may leak privileges into the
48
 
container if the command starts subprocesses that remain active
49
 
after the main process that was attached is terminated. The
50
 
(re-)starting of daemons inside the container is problematic,
51
 
especially if the daemon starts a lot of subprocesses such as
52
 
\fBcron\fR or \fBsshd\fR\&.
53
 
\fBUse with great care.\fR
54
 
.SH "COMMON OPTIONS"
55
 
.PP
56
 
These options are common to most of lxc commands.
57
 
.TP
58
 
\fB-?, -h, --help\fR
59
 
Print a longer usage message than normal.
60
 
.TP
61
 
\fB--usage\fR
62
 
Give the usage message
63
 
.TP
64
 
\fB-q, --quiet\fR
65
 
mute on
66
 
.TP
67
 
\fB-o, --logfile=\fIFILE\fB\fR
68
 
Output to an alternate log
69
 
\fIFILE\fR\&. The default is no log.
70
 
.TP
71
 
\fB-l, --logpriority=\fILEVEL\fB\fR
72
 
Set log priority to
73
 
\fILEVEL\fR\&. The default log
74
 
priority is ERROR\&. Possible values are :
75
 
FATAL, CRIT,
76
 
WARN, ERROR,
77
 
NOTICE, INFO,
78
 
DEBUG\&.
79
 
 
80
 
Note that this option is setting the priority of the events
81
 
log in the alternate log file. It do not have effect on the
82
 
ERROR events log on stderr.
83
 
.TP
84
 
\fB-n, --name=\fINAME\fB\fR
85
 
Use container identifier \fINAME\fR\&.
86
 
The container identifier format is an alphanumeric string.
87
 
.SH "EXAMPLES"
88
 
.PP
89
 
To spawn a new shell running inside an existing container, use
90
 
 
91
 
.nf
92
 
          lxc-attach -n container
93
 
        
94
 
.fi
95
 
.PP
96
 
To restart the cron service of a running Debian container, use
97
 
 
98
 
.nf
99
 
          lxc-attach -n container -- /etc/init.d/cron restart
100
 
        
101
 
.fi
102
 
.PP
103
 
To deactivate the network link eth1 of a running container that
104
 
does not have the NET_ADMIN capability, use the \fB-e\fR
105
 
option to use increased capabilities:
106
 
 
107
 
.nf
108
 
          lxc-attach -n container -e -- /sbin/ip link delete eth1
109
 
        
110
 
.fi
111
 
.SH "SECURITY"
112
 
.PP
113
 
The \fB-e\fR should be used with care, as it may break
114
 
the isolation of the containers if used improperly.
115
 
.SH "SEE ALSO"
116
 
.PP
117
 
\fBlxc\fR(1),
118
 
\fBlxc-create\fR(1),
119
 
\fBlxc-destroy\fR(1),
120
 
\fBlxc-start\fR(1),
121
 
\fBlxc-stop\fR(1),
122
 
\fBlxc-execute\fR(1),
123
 
\fBlxc-kill\fR(1),
124
 
\fBlxc-console\fR(1),
125
 
\fBlxc-monitor\fR(1),
126
 
\fBlxc-wait\fR(1),
127
 
\fBlxc-cgroup\fR(1),
128
 
\fBlxc-ls\fR(1),
129
 
\fBlxc-ps\fR(1),
130
 
\fBlxc-info\fR(1),
131
 
\fBlxc-freeze\fR(1),
132
 
\fBlxc-unfreeze\fR(1),
133
 
\fBlxc-attach\fR(1),
134
 
\fBlxc.conf\fR(5)
135
 
.SH "AUTHOR"
136
 
.PP
137
 
Daniel Lezcano <daniel.lezcano@free.fr>