1podman-stop(1)              General Commands Manual             podman-stop(1)
2
3
4

NAME

6       podman-stop - Stop one or more running containers
7
8

SYNOPSIS

10       podman stop [options] container ...
11
12
13       podman container stop [options] container ...
14
15

DESCRIPTION

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

OPTIONS

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       ┌─────────┬───────────────────────────────┐
50Filter   Description                   
51       ├─────────┼───────────────────────────────┤
52id       │ [ID] Container's ID (CID pre‐ │
53       │         │ fix match by default; accepts │
54       │         │ regex)                        │
55       ├─────────┼───────────────────────────────┤
56name     │ [Name]  Container's name (ac‐ │
57       │         │ cepts regex)                  │
58       ├─────────┼───────────────────────────────┤
59label    │ [Key]  or  [Key=Value]  Label │
60       │         │ assigned to a container       │
61       ├─────────┼───────────────────────────────┤
62exited   [Int] Container's exit code   
63       ├─────────┼───────────────────────────────┤
64status   │ [Status]  Container's status: │
65       │         │ 'created',          'exited', │
66       │         │ 'paused',   'running',   'un‐ │
67       │         │ known'                        │
68       ├─────────┼───────────────────────────────┤
69ancestor │ [ImageName] Image or  descen‐ │
70       │         │ dant used to create container │
71       ├─────────┼───────────────────────────────┤
72before   │ [ID]   or  [Name]  Containers │
73       │         │ created before this container │
74       ├─────────┼───────────────────────────────┤
75since    │ [ID]  or  [Name]   Containers │
76       │         │ created since this container  │
77       ├─────────┼───────────────────────────────┤
78volume   │ [VolumeName]  or [Mountpoint‐ │
79       │         │ Destination]  Volume  mounted │
80       │         │ in container                  │
81       ├─────────┼───────────────────────────────┤
82health   [Status] healthy or unhealthy 
83       ├─────────┼───────────────────────────────┤
84pod      │ [Pod] name or full or partial │
85       │         │ ID of pod                     │
86       ├─────────┼───────────────────────────────┤
87network  │ [Network] name or full ID  of │
88       │         │ network                       │
89       ├─────────┼───────────────────────────────┤
90until    │ [DateTime] Containers created │
91       │         │ before the given duration  or │
92       │         │ time.                         │
93       └─────────┴───────────────────────────────┘
94
95   --ignore, -i
96       Ignore errors when specified containers are not in the container store.
97       A user might have decided to manually remove a container which leads to
98       a  failure during the ExecStop directive of a systemd service referenc‐
99       ing that container.
100
101
102   --latest, -l
103       Instead of providing the container name or ID,  use  the  last  created
104       container.  Note: the last started container can be from other users of
105       Podman on the host machine.  (This option is not available with the re‐
106       mote  Podman  client,  including  Mac  and Windows (excluding WSL2) ma‐
107       chines)
108
109
110   --time, -t=seconds
111       Seconds to wait before forcibly stopping the container.  Use -1 for in‐
112       finite wait.
113
114

EXAMPLES

116       $ podman stop mywebserver
117
118
119       $ podman stop 860a4b235279
120
121
122       $ podman stop mywebserver 860a4b235279
123
124
125       $ podman stop --cidfile /home/user/cidfile-1
126
127
128       $ podman stop --cidfile /home/user/cidfile-1 --cidfile ./cidfile-2
129
130
131       $ podman stop --time 2 860a4b235279
132
133
134       $ podman stop -a
135
136
137       $ podman stop --latest
138
139

SEE ALSO

141       podman(1), podman-rm(1)
142
143

HISTORY

145       September  2018,  Originally  compiled by Brent Baude bbaude@redhat.com
146       ⟨mailto:bbaude@redhat.com⟩
147
148
149
150                                                                podman-stop(1)
Impressum