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

NAME

6       podman-restart - Restart one or more containers
7
8

SYNOPSIS

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

DESCRIPTION

17       The restart command allows containers to be restarted using their ID or
18       name.  Running containers are stopped and restarted. Stopped containers
19       are started.
20
21

OPTIONS

23   --all, -a
24       Restart all containers regardless of their current state.
25
26
27   --cidfile
28       Read  container  ID  from the specified file and restart the container.
29       Can be specified multiple times.
30
31
32   --filter, -f=filter
33       Filter what containers restart.  Multiple filters  can  be  given  with
34       multiple uses of the --filter flag.  Filters with the same key work in‐
35       clusive with the only exception being label which is exclusive. Filters
36       with different keys always work exclusive.
37
38
39       Valid filters are listed below:
40
41
42       ┌─────────┬───────────────────────────────┐
43Filter   Description                   
44       ├─────────┼───────────────────────────────┤
45id       │ [ID] Container's ID (CID pre‐ │
46       │         │ fix match by default; accepts │
47       │         │ regex)                        │
48       ├─────────┼───────────────────────────────┤
49name     │ [Name]  Container's name (ac‐ │
50       │         │ cepts regex)                  │
51       ├─────────┼───────────────────────────────┤
52label    │ [Key]  or  [Key=Value]  Label │
53       │         │ assigned to a container       │
54       ├─────────┼───────────────────────────────┤
55exited   [Int] Container's exit code   
56       ├─────────┼───────────────────────────────┤
57status   │ [Status]  Container's status: │
58       │         │ 'created',          'exited', │
59       │         │ 'paused',   'running',   'un‐ │
60       │         │ known'                        │
61       ├─────────┼───────────────────────────────┤
62ancestor │ [ImageName] Image or  descen‐ │
63       │         │ dant used to create container │
64       ├─────────┼───────────────────────────────┤
65before   │ [ID]   or  [Name]  Containers │
66       │         │ created before this container │
67       ├─────────┼───────────────────────────────┤
68since    │ [ID]  or  [Name]   Containers │
69       │         │ created since this container  │
70       ├─────────┼───────────────────────────────┤
71volume   │ [VolumeName]  or [Mountpoint‐ │
72       │         │ Destination]  Volume  mounted │
73       │         │ in container                  │
74       ├─────────┼───────────────────────────────┤
75health   [Status] healthy or unhealthy 
76       ├─────────┼───────────────────────────────┤
77pod      │ [Pod] name or full or partial │
78       │         │ ID of pod                     │
79       ├─────────┼───────────────────────────────┤
80network  │ [Network] name or full ID  of │
81       │         │ network                       │
82       ├─────────┼───────────────────────────────┤
83until    │ [DateTime] Containers created │
84       │         │ before the given duration  or │
85       │         │ time.                         │
86       └─────────┴───────────────────────────────┘
87
88   --latest, -l
89       Instead  of  providing  the  container name or ID, use the last created
90       container.  Note: the last started container can be from other users of
91       Podman on the host machine.  (This option is not available with the re‐
92       mote Podman client, including Mac  and  Windows  (excluding  WSL2)  ma‐
93       chines)
94
95
96   --running
97       Restart all containers that are already in the running state.
98
99
100   --time, -t=seconds
101       Seconds to wait before forcibly stopping the container.  Use -1 for in‐
102       finite wait.
103
104

EXAMPLES

106       Restart the latest container
107
108       $ podman restart -l
109       ec588fc80b05e19d3006bf2e8aa325f0a2e2ff1f609b7afb39176ca8e3e13467
110
111
112
113       Restart a specific container by partial container ID
114
115       $ podman restart ff6cf1
116       ff6cf1e5e77e6dba1efc7f3fcdb20e8b89ad8947bc0518be1fcb2c78681f226f
117
118
119
120       Restart two containers by name with a timeout of 4 seconds
121
122       $ podman restart --time 4 test1 test2
123       c3bb026838c30e5097f079fa365c9a4769d52e1017588278fa00d5c68ebc1502
124       17e13a63081a995136f907024bcfe50ff532917988a152da229db9d894c5a9ec
125
126
127
128       Restart all running containers
129
130       $ podman restart --running
131
132
133
134       Restart all containers
135
136       $ podman restart --all
137
138
139
140       Restart container using ID specified in a given files.
141
142       $ podman restart --cidfile /home/user/cidfile-1
143       $ podman restart --cidfile /home/user/cidfile-1 --cidfile ./cidfile-2
144
145
146

SEE ALSO

148       podman(1)
149
150

HISTORY

152       March  2018,  Originally  compiled  by   Matt   Heon   mheon@redhat.com
153       ⟨mailto:mheon@redhat.com⟩
154
155
156
157                                                             podman-restart(1)
Impressum