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.  Containers  will  be  stopped  if  they  are  running  and  then
19       restarted.  Stopped  containers  will  not  be stopped and will only be
20       started.
21
22

OPTIONS

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

EXAMPLES

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

SEE ALSO

149       podman(1)
150
151

HISTORY

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