1podman(1)() podman(1)()
2
3
4
6 podman - Simple management tool for pods, containers and images
7
8
10 podman [options] command
11
12
14 Podman (Pod Manager) is a fully featured container engine that is a
15 simple daemonless tool. Podman provides a Docker-CLI comparable com‐
16 mand line that eases the transition from other container engines and
17 allows the management of pods, containers and images. Simply put:
18 alias docker=podman. Most Podman commands can be run as a regular
19 user, without requiring additional privileges.
20
21
22 Podman uses Buildah(1) internally to create container images. Both
23 tools share image (not container) storage, hence each can use or manip‐
24 ulate images (but not containers) created by the other.
25
26
27 Default settings for flags are defined in containers.conf. Most set‐
28 tings for Remote connections use the server's containers.conf, except
29 when documented in man pages.
30
31
32 podman [GLOBAL OPTIONS]
33
34
36 --cgroup-manager=manager
37 The CGroup manager to use for container cgroups. Supported values are
38 cgroupfs or systemd. Default is systemd unless overridden in the con‐
39 tainers.conf file.
40
41
42 Note: Setting this flag can cause certain commands to break when called
43 on containers previously created by the other CGroup manager type.
44 Note: CGroup manager is not supported in rootless mode when using
45 CGroups Version V1.
46
47
48 --cni-config-dir
49 Path of the configuration directory for CNI networks. (Default:
50 /etc/cni/net.d)
51
52
53 --connection, -c
54 Connection to use for remote podman (Default connection is configured
55 in containers.conf) Remote connections use local containers.conf for
56 default.
57
58
59 --conmon
60 Path of the conmon binary (Default path is configured in contain‐
61 ers.conf)
62
63
64 --events-backend=type
65 Backend to use for storing events. Allowed values are file, journald,
66 and none. When file is specified, the events are stored under a subdi‐
67 rectory of the tmpdir location (see --tmpdir below).
68
69
70 --help, -h
71 Print usage statement
72
73
74 --hooks-dir=path
75 Each *.json file in the path configures a hook for Podman containers.
76 For more details on the syntax of the JSON files and the semantics of
77 hook injection, see oci-hooks(5). Podman and libpod currently support
78 both the 1.0.0 and 0.1.0 hook schemas, although the 0.1.0 schema is
79 deprecated.
80
81
82 This option may be set multiple times; paths from later options have
83 higher precedence (oci-hooks(5) discusses directory precedence).
84
85
86 For the annotation conditions, libpod uses any annotations set in the
87 generated OCI configuration.
88
89
90 For the bind-mount conditions, only mounts explicitly requested by the
91 caller via --volume are considered. Bind mounts that libpod inserts by
92 default (e.g. /dev/shm) are not considered.
93
94
95 If --hooks-dir is unset for root callers, Podman and libpod will cur‐
96 rently default to /usr/share/containers/oci/hooks.d and /etc/contain‐
97 ers/oci/hooks.d in order of increasing precedence. Using these de‐
98 faults is deprecated, and callers should migrate to explicitly setting
99 --hooks-dir.
100
101
102 Podman and libpod currently support an additional precreate state which
103 is called before the runtime's create operation. Unlike the other
104 stages, which receive the container state on their standard input,
105 precreate hooks receive the proposed runtime configuration on their
106 standard input. They may alter that configuration as they see fit, and
107 write the altered form to their standard output.
108
109
110 WARNING: the precreate hook lets you do powerful things, such as adding
111 additional mounts to the runtime configuration. That power also makes
112 it easy to break things. Before reporting libpod errors, try running
113 your container with precreate hooks disabled to see if the problem is
114 due to one of your hooks.
115
116
117 --identity=path
118 Path to ssh identity file. If the identity file has been encrypted,
119 podman prompts the user for the passphrase. If no identity file is
120 provided and no user is given, podman defaults to the user running the
121 podman command. Podman prompts for the login password on the remote
122 server.
123
124
125 Identity value resolution precedence:
126 - command line value
127 - environment variable CONTAINER_SSHKEY, if CONTAINER_HOST is found
128 - containers.conf Remote connections use local containers.conf for de‐
129 fault.
130
131
132 --log-level=level
133 Log messages above specified level: debug, info, warn, error (default),
134 fatal or panic (default: "error")
135
136
137 --namespace=namespace
138 Set libpod namespace. Namespaces are used to separate groups of con‐
139 tainers and pods in libpod's state. When namespace is set, created
140 containers and pods will join the given namespace, and only containers
141 and pods in the given namespace will be visible to Podman.
142
143
144 --network-cmd-path=path
145 Path to the command binary to use for setting up a network. It is cur‐
146 rently only used for setting up a slirp4netns network. If "" is used
147 then the binary is looked up using the $PATH environment variable.
148
149
150 --remote, -r
151 Access Podman service will be remote Remote connections use local con‐
152 tainers.conf for default.
153
154
155 --url=value
156 URL to access Podman service (default from containers.conf, rootless
157 unix://run/user/$UID/podman/podman.sock or as root unix://run/pod‐
158 man/podman.sock).
159
160
161 • CONTAINER_HOST is of the format <schema>://[<user[:<pass‐
162 word>]@]<host>[:<port>][<path>]
163
164
165
166 Details:
167 - user will default to either root or current running user
168 - password has no default
169 - host must be provided and is either the IP or name of the machine
170 hosting the Podman service
171 - port defaults to 22
172 - path defaults to either /run/podman/podman.sock, or
173 /run/user/<uid>/podman/podman.sock if running rootless.
174
175
176 URL value resolution precedence:
177 - command line value
178 - environment variable CONTAINER_HOST
179 - containers.conf
180 - unix://run/podman/podman.sock Remote connections use local contain‐
181 ers.conf for default.
182
183
184 --root=value
185 Storage root dir in which data, including images, is stored (default:
186 "/var/lib/containers/storage" for UID 0, "$HOME/.local/share/contain‐
187 ers/storage" for other users). Default root dir configured in
188 /etc/containers/storage.conf.
189
190
191 --runroot=value
192 Storage state directory where all state information is stored (default:
193 "/run/containers/storage" for UID 0, "/run/user/$UID/run" for other
194 users). Default state dir configured in /etc/containers/storage.conf.
195
196
197 --runtime=value
198 Name of the OCI runtime as specified in containers.conf or absolute
199 path to the OCI compatible binary used to run containers.
200
201
202 --runtime-flag=flag
203 Adds global flags for the container runtime. To list the supported
204 flags, please consult the manpages of the selected container runtime
205 (runc is the default runtime, the manpage to consult is runc(8). When
206 the machine is configured for cgroup V2, the default runtime is crun,
207 the manpage to consult is crun(8).).
208
209
210 Note: Do not pass the leading -- to the flag. To pass the runc flag
211 --log-format json to podman build, the option given would be --run‐
212 time-flag log-format=json.
213
214
215 --storage-driver=value
216 Storage driver. The default storage driver for UID 0 is configured in
217 /etc/containers/storage.conf ($HOME/.config/containers/storage.conf in
218 rootless mode), and is vfs for non-root users when fuse-overlayfs is
219 not available. The STORAGE_DRIVER environment variable overrides the
220 default. The --storage-driver specified driver overrides all.
221
222
223 Overriding this option will cause the storage-opt settings in /etc/con‐
224 tainers/storage.conf to be ignored. The user must specify additional
225 options via the --storage-opt flag.
226
227
228 --storage-opt=value
229 Storage driver option, Default storage driver options are configured in
230 /etc/containers/storage.conf ($HOME/.config/containers/storage.conf in
231 rootless mode). The STORAGE_OPTS environment variable overrides the de‐
232 fault. The --storage-opt specified options overrides all. If you spec‐
233 ify --storage-opt="", no storage options will be used.
234
235
236 --syslog=true|false
237 Output logging information to syslog as well as the console (default
238 false).
239
240
241 On remote clients, logging is directed to the file $HOME/.config/con‐
242 tainers/podman.log.
243
244
245 --tmpdir
246 Path to the tmp directory, for libpod runtime content.
247
248
249 NOTE --tmpdir is not used for the temporary storage of downloaded im‐
250 ages. Use the environment variable TMPDIR to change the temporary
251 storage location of downloaded container images. Podman defaults to use
252 /var/tmp.
253
254
255 --version, -v
256 Print the version
257
258
260 Podman can set up environment variables from env of [engine] table in
261 containers.conf. These variables can be overridden by passing environ‐
262 ment variables before the podman commands.
263
264
266 The Podman command can be used with remote services using the --remote
267 flag. Connections can be made using local unix domain sockets, ssh or
268 directly to tcp sockets. When specifying the podman --remote flag, only
269 the global options --url, --identity, --log-level, --connection are
270 used.
271
272
273 Connection information can also be managed using the containers.conf
274 file.
275
276
278 The exit code from podman gives information about why the container
279 failed to run or why it exited. When podman commands exit with a
280 non-zero code, the exit codes follow the chroot standard, see below:
281
282
283 125 The error is with podman itself
284
285
286 $ podman run --foo busybox; echo $?
287 Error: unknown flag: --foo
288 125
289
290
291
292 126 Executing a contained command and the command cannot be invoked
293
294
295 $ podman run busybox /etc; echo $?
296 Error: container_linux.go:346: starting container process caused "exec: \"/etc\": permission denied": OCI runtime error
297 126
298
299
300
301 127 Executing a contained command and the command cannot be found
302 $ podman run busybox foo; echo $?
303 Error: container_linux.go:346: starting container process caused
304 "exec: \"foo\": executable file not found in $PATH": OCI runtime error
305 127
306
307
308 Exit code contained command exit code
309
310
311 $ podman run busybox /bin/sh -c 'exit 3'; echo $?
312 3
313
314
315
317 ┌──────────────────────┬────────────────────────────────┐
318 │Command │ Description │
319 ├──────────────────────┼────────────────────────────────┤
320 │podman-attach(1) │ Attach to a running container. │
321 ├──────────────────────┼────────────────────────────────┤
322 │podman-auto-update(1) │ Auto update containers accord‐ │
323 │ │ ing to their auto-update pol‐ │
324 │ │ icy │
325 ├──────────────────────┼────────────────────────────────┤
326 │podman-build(1) │ Build a container image using │
327 │ │ a Containerfile. │
328 ├──────────────────────┼────────────────────────────────┤
329 │podman-commit(1) │ Create new image based on the │
330 │ │ changed container. │
331 ├──────────────────────┼────────────────────────────────┤
332 │podman-completion(1) │ Generate shell completion │
333 │ │ scripts │
334 ├──────────────────────┼────────────────────────────────┤
335 │podman-container(1) │ Manage containers. │
336 ├──────────────────────┼────────────────────────────────┤
337 │podman-cp(1) │ Copy files/folders between a │
338 │ │ container and the local │
339 │ │ filesystem. │
340 ├──────────────────────┼────────────────────────────────┤
341 │podman-create(1) │ Create a new container. │
342 ├──────────────────────┼────────────────────────────────┤
343 │podman-diff(1) │ Inspect changes on a container │
344 │ │ or image's filesystem. │
345 ├──────────────────────┼────────────────────────────────┤
346 │podman-events(1) │ Monitor Podman events │
347 ├──────────────────────┼────────────────────────────────┤
348 │podman-exec(1) │ Execute a command in a running │
349 │ │ container. │
350 ├──────────────────────┼────────────────────────────────┤
351 │podman-export(1) │ Export a container's filesys‐ │
352 │ │ tem contents as a tar archive. │
353 ├──────────────────────┼────────────────────────────────┤
354 │podman-generate(1) │ Generate structured data based │
355 │ │ on containers, pods or vol‐ │
356 │ │ umes. │
357 ├──────────────────────┼────────────────────────────────┤
358 │podman-healthcheck(1) │ Manage healthchecks for con‐ │
359 │ │ tainers │
360 ├──────────────────────┼────────────────────────────────┤
361 │podman-history(1) │ Show the history of an image. │
362 ├──────────────────────┼────────────────────────────────┤
363 │podman-image(1) │ Manage images. │
364 ├──────────────────────┼────────────────────────────────┤
365 │podman-images(1) │ List images in local storage. │
366 ├──────────────────────┼────────────────────────────────┤
367 │podman-import(1) │ Import a tarball and save it │
368 │ │ as a filesystem image. │
369 ├──────────────────────┼────────────────────────────────┤
370 │podman-info(1) │ Displays Podman related system │
371 │ │ information. │
372 ├──────────────────────┼────────────────────────────────┤
373 │podman-init(1) │ Initialize one or more con‐ │
374 │ │ tainers │
375 ├──────────────────────┼────────────────────────────────┤
376 │podman-inspect(1) │ Display a container, image, │
377 │ │ volume, network, or pod's con‐ │
378 │ │ figuration. │
379 ├──────────────────────┼────────────────────────────────┤
380 │podman-kill(1) │ Kill the main process in one │
381 │ │ or more containers. │
382 ├──────────────────────┼────────────────────────────────┤
383 │podman-load(1) │ Load image(s) from a tar ar‐ │
384 │ │ chive into container storage. │
385 ├──────────────────────┼────────────────────────────────┤
386 │podman-login(1) │ Login to a container registry. │
387 ├──────────────────────┼────────────────────────────────┤
388 │podman-logout(1) │ Logout of a container reg‐ │
389 │ │ istry. │
390 ├──────────────────────┼────────────────────────────────┤
391 │podman-logs(1) │ Display the logs of one or │
392 │ │ more containers. │
393 ├──────────────────────┼────────────────────────────────┤
394 │podman-machine(1) │ Manage Podman's virtual ma‐ │
395 │ │ chine │
396 ├──────────────────────┼────────────────────────────────┤
397 │podman-manifest(1) │ Create and manipulate manifest │
398 │ │ lists and image indexes. │
399 ├──────────────────────┼────────────────────────────────┤
400 │podman-mount(1) │ Mount a working container's │
401 │ │ root filesystem. │
402 ├──────────────────────┼────────────────────────────────┤
403 │podman-network(1) │ Manage Podman CNI networks. │
404 ├──────────────────────┼────────────────────────────────┤
405 │podman-pause(1) │ Pause one or more containers. │
406 ├──────────────────────┼────────────────────────────────┤
407 │podman-play(1) │ Play containers, pods or vol‐ │
408 │ │ umes based on a structured in‐ │
409 │ │ put file. │
410 ├──────────────────────┼────────────────────────────────┤
411 │podman-pod(1) │ Management tool for groups of │
412 │ │ containers, called pods. │
413 ├──────────────────────┼────────────────────────────────┤
414 │podman-port(1) │ List port mappings for a con‐ │
415 │ │ tainer. │
416 ├──────────────────────┼────────────────────────────────┤
417 │podman-ps(1) │ Prints out information about │
418 │ │ containers. │
419 ├──────────────────────┼────────────────────────────────┤
420 │podman-pull(1) │ Pull an image from a registry. │
421 ├──────────────────────┼────────────────────────────────┤
422 │podman-push(1) │ Push an image, manifest list │
423 │ │ or image index from local │
424 │ │ storage to elsewhere. │
425 ├──────────────────────┼────────────────────────────────┤
426 │podman-rename(1) │ Rename an existing container. │
427 ├──────────────────────┼────────────────────────────────┤
428 │podman-restart(1) │ Restart one or more contain‐ │
429 │ │ ers. │
430 ├──────────────────────┼────────────────────────────────┤
431 │podman-rm(1) │ Remove one or more containers. │
432 ├──────────────────────┼────────────────────────────────┤
433 │podman-rmi(1) │ Removes one or more locally │
434 │ │ stored images. │
435 ├──────────────────────┼────────────────────────────────┤
436 │podman-run(1) │ Run a command in a new con‐ │
437 │ │ tainer. │
438 ├──────────────────────┼────────────────────────────────┤
439 │podman-save(1) │ Save image(s) to an archive. │
440 ├──────────────────────┼────────────────────────────────┤
441 │podman-search(1) │ Search a registry for an im‐ │
442 │ │ age. │
443 ├──────────────────────┼────────────────────────────────┤
444 │podman-secret(1) │ Manage podman secrets. │
445 ├──────────────────────┼────────────────────────────────┤
446 │podman-start(1) │ Start one or more containers. │
447 ├──────────────────────┼────────────────────────────────┤
448 │podman-stats(1) │ Display a live stream of one │
449 │ │ or more container's resource │
450 │ │ usage statistics. │
451 ├──────────────────────┼────────────────────────────────┤
452 │podman-stop(1) │ Stop one or more running con‐ │
453 │ │ tainers. │
454 ├──────────────────────┼────────────────────────────────┤
455 │podman-system(1) │ Manage podman. │
456 ├──────────────────────┼────────────────────────────────┤
457 │podman-tag(1) │ Add an additional name to a │
458 │ │ local image. │
459 ├──────────────────────┼────────────────────────────────┤
460 │podman-top(1) │ Display the running processes │
461 │ │ of a container. │
462 ├──────────────────────┼────────────────────────────────┤
463 │podman-unmount(1) │ Unmount a working container's │
464 │ │ root filesystem. │
465 ├──────────────────────┼────────────────────────────────┤
466 │podman-unpause(1) │ Unpause one or more contain‐ │
467 │ │ ers. │
468 ├──────────────────────┼────────────────────────────────┤
469 │podman-unshare(1) │ Run a command inside of a mod‐ │
470 │ │ ified user namespace. │
471 ├──────────────────────┼────────────────────────────────┤
472 │podman-untag(1) │ Removes one or more names from │
473 │ │ a locally-stored image. │
474 ├──────────────────────┼────────────────────────────────┤
475 │podman-version(1) │ Display the Podman version in‐ │
476 │ │ formation. │
477 ├──────────────────────┼────────────────────────────────┤
478 │podman-volume(1) │ Simple management tool for │
479 │ │ volumes. │
480 ├──────────────────────┼────────────────────────────────┤
481 │podman-wait(1) │ Wait on one or more containers │
482 │ │ to stop and print their exit │
483 │ │ codes. │
484 ├──────────────────────┼────────────────────────────────┤
485 │ │ │
486 └──────────────────────┴────────────────────────────────┘
487
489 containers.conf (/usr/share/containers/containers.conf, /etc/contain‐
490 ers/containers.conf, $HOME/.config/containers/containers.conf)
491
492
493 Podman has builtin defaults for command line options. These defaults can be overridden using the containers.conf configuration files.
494
495
496
497 Distributions ship the /usr/share/containers/containers.conf file with
498 their default settings. Administrators can override fields in this file
499 by creating the /etc/containers/containers.conf file. Users can fur‐
500 ther modify defaults by creating the $HOME/.config/containers/contain‐
501 ers.conf file. Podman merges its builtin defaults with the specified
502 fields from these files, if they exist. Fields specified in the users
503 file override the administrator's file, which overrides the distribu‐
504 tion's file, which override the built-in defaults.
505
506
507 Podman uses builtin defaults if no containers.conf file is found.
508
509
510 If the CONTAINERS_CONF environment variable is set, then its value is
511 used for the containers.conf file rather than the default.
512
513
514 mounts.conf (/usr/share/containers/mounts.conf)
515
516
517 The mounts.conf file specifies volume mount directories that are automatically mounted inside containers when executing the `podman run` or `podman start` commands. Administrators can override the defaults file by creating `/etc/containers/mounts.conf`.
518
519
520
521 When Podman runs in rootless mode, the file $HOME/.config/contain‐
522 ers/mounts.conf will override the default if it exists. Please refer to
523 containers-mounts.conf(5) for further details.
524
525
526 policy.json (/etc/containers/policy.json)
527
528
529 Signature verification policy files are used to specify policy, e.g. trusted keys, applicable when deciding whether to accept an image, or individual signatures of that image, as valid.
530
531
532
533 registries.conf (/etc/containers/registries.conf, $HOME/.config/con‐
534 tainers/registries.conf)
535
536
537 registries.conf is the configuration file which specifies which container registries should be consulted when completing image names which do not include a registry or domain portion.
538
539 Non root users of Podman can create the `$HOME/.config/containers/registries.conf` file to be used instead of the system defaults.
540
541 If the **CONTAINERS_REGISTRIES_CONF** environment variable is set, then its value is used for the registries.conf file rather than the default.
542
543
544
545 storage.conf (/etc/containers/storage.conf, $HOME/.config/contain‐
546 ers/storage.conf)
547
548
549 storage.conf is the storage configuration file for all tools using containers/storage
550
551 The storage configuration file specifies all of the available container storage options for tools using shared container storage.
552
553 When Podman runs in rootless mode, the file `$HOME/.config/containers/storage.conf` is used instead of the system defaults.
554
555 If the **CONTAINERS_STORAGE_CONF** environment variable is set, the its value is used for the storage.conf file rather than the default.
556
557
558
560 Podman can also be used as non-root user. When podman runs in rootless
561 mode, a user namespace is automatically created for the user, defined
562 in /etc/subuid and /etc/subgid.
563
564
565 Containers created by a non-root user are not visible to other users
566 and are not seen or managed by Podman running as root.
567
568
569 It is required to have multiple uids/gids set for an user. Be sure the
570 user is present in the files /etc/subuid and /etc/subgid.
571
572
573 If you have a recent version of usermod, you can execute the following
574 commands to add the ranges to the files
575
576
577 $ sudo usermod --add-subuids 10000-75535 USERNAME
578 $ sudo usermod --add-subgids 10000-75535 USERNAME
579
580
581
582 Or just add the content manually.
583
584
585 $ echo USERNAME:10000:65536 >> /etc/subuid
586 $ echo USERNAME:10000:65536 >> /etc/subgid
587
588
589
590 See the subuid(5) and subgid(5) man pages for more information.
591
592
593 Images are pulled under XDG_DATA_HOME when specified, otherwise in the
594 home directory of the user under .local/share/containers/storage.
595
596
597 Currently the slirp4netns package is required to be installed to create
598 a network device, otherwise rootless containers need to run in the net‐
599 work namespace of the host.
600
601
602 NOTE: Unsupported file systems in rootless mode
603 The Overlay file system (OverlayFS) is not supported in rootless mode.
604 The fuse-overlayfs package is a tool that provides the functionality of
605 OverlayFS in user namespace that allows mounting file systems in root‐
606 less environments. It is recommended to install the fuse-overlayfs
607 package. In rootless mode Podman will automatically use the fuse-over‐
608 lafs program as the mount_program if installed, as long as the
609 $HOME/.config/containers/storage.conf file was not previously created.
610 If storage.conf exists in the homedir, add mount_program =
611 "/usr/bin/fuse-overlayfs" under [storage.options.overlay] to enable
612 this feature.
613
614
615 The Network File System (NFS) and other distributed file systems (for
616 example: Lustre, Spectrum Scale, the General Parallel File System
617 (GPFS)) are not supported when running in rootless mode as these file
618 systems do not understand user namespace. However, rootless Podman can
619 make use of an NFS Homedir by modifying the $HOME/.config/contain‐
620 ers/storage.conf to have the graphroot option point to a directory
621 stored on local (Non NFS) storage.
622
623
624 For more information, please refer to the Podman Troubleshooting Page
625 ⟨https://github.com/containers/podman/blob/master/troubleshooting.md⟩.
626
627
629 containers-mounts.conf(5), containers-registries.conf(5), contain‐
630 ers-storage.conf(5), buildah(1), containers.conf(5), oci-hooks(5), con‐
631 tainers-policy.json(5), crun(8), runc(8), subuid(5), subgid(5),
632 slirp4netns(1), conmon(8).
633
634
636 Dec 2016, Originally compiled by Dan Walsh dwalsh@redhat.com
637 ⟨mailto:dwalsh@redhat.com⟩
638
639
640
641 podman(1)()