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.  You may use container IDs or names as
18       input. The --time switch allows you to specify the number of seconds to
19       wait  before  forcibly stopping the container after the stop command is
20       issued to the container. The default is 10 seconds.  By  default,  con‐
21       tainers  are  stopped  with SIGTERM and then SIGKILL after the timeout.
22       The SIGTERM default can be overridden by the image used to  create  the
23       container and also 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   --filter, -f=filter
37       Filter what containers are going to be stopped.  Multiple  filters  can
38       be  given  with  multiple  uses of the --filter flag.  Filters with the
39       same key work inclusive with the only exception being  label  which  is
40       exclusive. Filters with different keys always work exclusive.
41
42
43       Valid filters are listed below:
44
45
46       ┌─────────┬───────────────────────────────┐
47Filter   Description                   
48       ├─────────┼───────────────────────────────┤
49       │id       │ [ID]  Container's ID (accepts │
50       │         │ regex)                        │
51       ├─────────┼───────────────────────────────┤
52       │name     │ [Name] Container's name  (ac‐ │
53       │         │ cepts regex)                  │
54       ├─────────┼───────────────────────────────┤
55       │label    │ [Key]  or  [Key=Value]  Label │
56       │         │ assigned to a container       │
57       ├─────────┼───────────────────────────────┤
58       │exited   │ [Int] Container's exit code   │
59       ├─────────┼───────────────────────────────┤
60       │status   │ [Status] Container's  status: │
61       │         │ 'created',          'exited', │
62       │         │ 'paused',   'running',   'un‐ │
63       │         │ known'                        │
64       ├─────────┼───────────────────────────────┤
65       │ancestor │ [ImageName]  Image or descen‐ │
66       │         │ dant used to create container │
67       ├─────────┼───────────────────────────────┤
68       │before   │ [ID]  or  [Name]   Containers │
69       │         │ created before this container │
70       ├─────────┼───────────────────────────────┤
71       │since    │ [ID]   or  [Name]  Containers │
72       │         │ created since this container  │
73       ├─────────┼───────────────────────────────┤
74       │volume   │ [VolumeName] or  [Mountpoint‐ │
75       │         │ Destination]  Volume  mounted │
76       │         │ in container                  │
77       ├─────────┼───────────────────────────────┤
78       │health   │ [Status] healthy or unhealthy │
79       ├─────────┼───────────────────────────────┤
80       │pod      │ [Pod] name or full or partial │
81       │         │ ID of pod                     │
82       ├─────────┼───────────────────────────────┤
83       │network  │ [Network]  name or full ID of │
84       │         │ network                       │
85       └─────────┴───────────────────────────────┘
86
87   --ignore, -i
88       Ignore errors when specified containers are not in the container store.
89       A  user  might  have decided to manually remove a container which would
90       lead to a failure during the ExecStop directive of  a  systemd  service
91       referencing that container.
92
93
94   --latest, -l
95       Instead  of  providing  the  container name or ID, use the last created
96       container. If you use methods other than Podman to run containers  such
97       as  CRI-O,  the  last  started  container could be from either of those
98       methods. (This option is not available with the remote  Podman  client,
99       including Mac and Windows (excluding WSL2) machines)
100
101
102   --time, -t=seconds
103       Seconds to wait before forcibly stopping the container.
104
105

EXAMPLES

107       $ podman stop mywebserver
108
109
110       $ podman stop 860a4b235279
111
112
113       $ podman stop mywebserver 860a4b235279
114
115
116       $ podman stop --cidfile /home/user/cidfile-1
117
118
119       $ podman stop --cidfile /home/user/cidfile-1 --cidfile ./cidfile-2
120
121
122       $ podman stop --time 2 860a4b235279
123
124
125       $ podman stop -a
126
127
128       $ podman stop --latest
129
130

SEE ALSO

132       podman(1), podman-rm(1)
133
134

HISTORY

136       September  2018,  Originally  compiled by Brent Baude bbaude@redhat.com
137       ⟨mailto:bbaude@redhat.com⟩
138
139
140
141                                                                podman-stop(1)
Impressum