1podman-stop(1) General Commands Manual podman-stop(1)
2
3
4
6 podman-stop - Stop one or more running containers
7
8
10 podman stop [options] container ...
11
12
13 podman container stop [options] container ...
14
15
17 Stops one or more containers using container IDs or names as input. The
18 --time option specifies the number of seconds to wait before forcibly
19 stopping the container after the stop command is issued to the con‐
20 tainer. The default is 10 seconds. By default, containers are stopped
21 with SIGTERM and then SIGKILL after the timeout. The SIGTERM default
22 can be overridden by the image used to create the container and also
23 via command line when creating the container.
24
25
27 --all, -a
28 Stop all running containers. This does not include paused containers.
29
30
31 --cidfile=file
32 Read container ID from the specified file and stop the container. Can
33 be specified multiple times.
34
35
36 Command does not fail when file is missing and user specified --ignore.
37
38
39 --filter, -f=filter
40 Filter what containers are going to be stopped. Multiple filters can
41 be given with multiple uses of the --filter flag. Filters with the
42 same key work inclusive with the only exception being label which is
43 exclusive. Filters with different keys always work exclusive.
44
45
46 Valid filters are listed below:
47
48
49 ┌─────────┬───────────────────────────────┐
50 │Filter │ Description │
51 ├─────────┼───────────────────────────────┤
52 │id │ [ID] Container's ID (CID pre‐ │
53 │ │ fix match by default; accepts │
54 │ │ regex) │
55 ├─────────┼───────────────────────────────┤
56 │name │ [Name] Container's name (ac‐ │
57 │ │ cepts regex) │
58 ├─────────┼───────────────────────────────┤
59 │label │ [Key] or [Key=Value] Label │
60 │ │ assigned to a container │
61 ├─────────┼───────────────────────────────┤
62 │exited │ [Int] Container's exit code │
63 ├─────────┼───────────────────────────────┤
64 │status │ [Status] Container's status: │
65 │ │ 'created', 'exited', │
66 │ │ 'paused', 'running', 'un‐ │
67 │ │ known' │
68 ├─────────┼───────────────────────────────┤
69 │ancestor │ [ImageName] Image or descen‐ │
70 │ │ dant used to create container │
71 ├─────────┼───────────────────────────────┤
72 │before │ [ID] or [Name] Containers │
73 │ │ created before this container │
74 ├─────────┼───────────────────────────────┤
75 │since │ [ID] or [Name] Containers │
76 │ │ created since this container │
77 ├─────────┼───────────────────────────────┤
78 │volume │ [VolumeName] or [Mountpoint‐ │
79 │ │ Destination] Volume mounted │
80 │ │ in container │
81 ├─────────┼───────────────────────────────┤
82 │health │ [Status] healthy or unhealthy │
83 ├─────────┼───────────────────────────────┤
84 │pod │ [Pod] name or full or partial │
85 │ │ ID of pod │
86 ├─────────┼───────────────────────────────┤
87 │network │ [Network] name or full ID of │
88 │ │ network │
89 └─────────┴───────────────────────────────┘
90
91 --ignore, -i
92 Ignore errors when specified containers are not in the container store.
93 A user might have decided to manually remove a container which leads to
94 a failure during the ExecStop directive of a systemd service referenc‐
95 ing that container.
96
97
98 --latest, -l
99 Instead of providing the container name or ID, use the last created
100 container. Note: the last started container can be from other users of
101 Podman on the host machine. (This option is not available with the re‐
102 mote Podman client, including Mac and Windows (excluding WSL2) ma‐
103 chines)
104
105
106 --time, -t=seconds
107 Seconds to wait before forcibly stopping the container. Use -1 for in‐
108 finite wait.
109
110
112 $ podman stop mywebserver
113
114
115 $ podman stop 860a4b235279
116
117
118 $ podman stop mywebserver 860a4b235279
119
120
121 $ podman stop --cidfile /home/user/cidfile-1
122
123
124 $ podman stop --cidfile /home/user/cidfile-1 --cidfile ./cidfile-2
125
126
127 $ podman stop --time 2 860a4b235279
128
129
130 $ podman stop -a
131
132
133 $ podman stop --latest
134
135
137 podman(1), podman-rm(1)
138
139
141 September 2018, Originally compiled by Brent Baude bbaude@redhat.com
142 ⟨mailto:bbaude@redhat.com⟩
143
144
145
146 podman-stop(1)