1singularity(1)                                                  singularity(1)
2
3
4

NAME

6       singularity-shell - Run a shell within a container
7
8
9

SYNOPSIS

11       singularity shell [shell options...] <container>
12
13
14

DESCRIPTION

16       singularity shell supports the following formats:
17
18
19       *.sif               Singularity Image Format (SIF). Native to
20       Singularity 3.0+
21
22
23       *.sqsh              SquashFS format.  Native to Singularity 2.4+
24
25
26       *.img               ext3 format. Native to Singularity versions < 2.4.
27
28
29       directory/          sandbox format. Directory containing a valid root
30       file
31                             system and optionally Singularity meta-data.
32
33
34       instance://*        A local running instance of a container. (See the
35       instance
36                             command group.)
37
38
39       library://*         A container hosted on a Library (default
40
41https://cloud.sylabs.io/library)⟩
42
43
44       docker://*          A container hosted on Docker Hub
45
46
47       shub://*            A container hosted on Singularity Hub
48
49
50

OPTIONS

52       --add-caps=""
53           a comma separated capability list to add
54
55
56       --allow-setuid[=false]
57           allow setuid binaries in container (root only)
58
59
60       --app=""
61           set an application to run inside a container
62
63
64       --apply-cgroups=""
65           apply cgroups from file for container processes (root only)
66
67
68       -B, --bind=[]
69           a user-bind path specification.  spec has the format
70       src[:dest[:opts]], where src and dest are outside and inside paths.  If
71       dest is not given, it is set equal to src.  Mount options ('opts') may
72       be specified as 'ro' (read-only) or 'rw' (read/write, which is the
73       default). Multiple bind paths can be given by a comma separated list.
74
75
76       -e, --cleanenv[=false]
77           clean environment before running container
78
79
80       -c, --contain[=false]
81           use minimal /dev and empty other directories (e.g. /tmp and $HOME)
82       instead of sharing filesystems from your host
83
84
85       -C, --containall[=false]
86           contain not only file systems, but also PID, IPC, and environment
87
88
89       --dns=""
90           list of DNS server separated by commas to add in resolv.conf
91
92
93       --docker-login[=false]
94           login to a Docker Repository interactively
95
96
97       --drop-caps=""
98           a comma separated capability list to drop
99
100
101       -h, --help[=false]
102           help for shell
103
104
105       -H, --home="/builddir"
106           a home directory specification.  spec can either be a src path or
107       src:dest pair.  src is the source path of the home directory outside
108       the container and dest overrides the home directory within the
109       container.
110
111
112       --hostname=""
113           set container hostname
114
115
116       -i, --ipc[=false]
117           run container in a new IPC namespace
118
119
120       --keep-privs[=false]
121           let root user keep privileges in container (root only)
122
123
124       -n, --net[=false]
125           run container in a new network namespace (sets up a bridge network
126       interface by default)
127
128
129       --network="bridge"
130           specify desired network type separated by commas, each network will
131       bring up a dedicated interface inside container
132
133
134       --network-args=[]
135           specify network arguments to pass to CNI plugins
136
137
138       --no-home[=false]
139           do NOT mount users home directory if home is not the current
140       working directory
141
142
143       --no-init[=false]
144           do NOT start shim process with --pid
145
146
147       --no-privs[=false]
148           drop all privileges from root user in container
149
150
151       --nohttps[=false]
152           do NOT use HTTPS, for communicating with local docker registry
153
154
155       --nv[=false]
156           enable experimental Nvidia support
157
158
159       -o, --overlay=[]
160           use an overlayFS image for persistent data storage or as read-only
161       layer of container
162
163
164       -p, --pid[=false]
165           run container in a new PID namespace
166
167
168       --pwd=""
169           initial working directory for payload process inside the container
170
171
172       -S, --scratch=[]
173           include a scratch directory within the container that is linked to
174       a temporary dir (use -W to force location)
175
176
177       --security=[]
178           enable security features (SELinux, Apparmor, Seccomp)
179
180
181       -s, --shell=""
182           path to program to use for interactive shell
183
184
185       -u, --userns[=false]
186           run container in a new user namespace, allowing Singularity to run
187       completely unprivileged on recent kernels. This disables some features
188       of Singularity, for example it only works with sandbox images.
189
190
191       --uts[=false]
192           run container in a new UTS namespace
193
194
195       --vm[=false]
196           enable VM support
197
198
199       --vm-cpu="1"
200           Number of CPU cores to allocate to Virtual Machine (implies --vm)
201
202
203       --vm-err[=false]
204           enable attaching stderr from VM
205
206
207       --vm-ram="1024"
208           Amount of RAM in MiB to allocate to Virtual Machine (implies --vm)
209
210
211       -W, --workdir=""
212           working directory to be used for /tmp, /var/tmp and $HOME (if
213       -c/--contain was also used)
214
215
216       -w, --writable[=false]
217           by default all Singularity containers are available as read only.
218       This option makes the file system accessible as read/write.
219
220
221       --writable-tmpfs[=false]
222           makes the file system accessible as read-write with non persistent
223       data (with overlay support only)
224
225
226

EXAMPLE

228                $ singularity shell /tmp/Debian.sif
229                Singularity/Debian.sif> pwd
230                /home/gmk/test
231                Singularity/Debian.sif> exit
232
233                $ singularity shell -C /tmp/Debian.sif
234                Singularity/Debian.sif> pwd
235                /home/gmk
236                Singularity/Debian.sif> ls -l
237                total 0
238                Singularity/Debian.sif> exit
239
240                $ sudo singularity shell -w /tmp/Debian.sif
241                $ sudo singularity shell --writable /tmp/Debian.sif
242
243                $ singularity shell instance://my_instance
244
245                $ singularity shell instance://my_instance
246                Singularity: Invoking an interactive shell within container...
247                Singularity container: > ps -ef
248                UID        PID  PPID  C STIME TTY          TIME CMD
249                ubuntu       1     0  0 20:00 ?        00:00:00 /usr/local/bin/singularity/bin/sinit
250                ubuntu       2     0  0 20:01 pts/8    00:00:00 /bin/bash --norc
251                ubuntu       3     2  0 20:02 pts/8    00:00:00 ps -ef
252
253
254
255

SEE ALSO

257       singularity(1)
258
259
260

HISTORY

262       29-May-2019 Auto generated by spf13/cobra
263
264
265
266Auto generated by spf13/cobra      May 2019                     singularity(1)
Impressum