Add information on --restart

We need to recommend that users use Systemd unit files if they want
the container to restart automatically.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
This commit is contained in:
Daniel J Walsh
2018-12-17 16:14:11 -05:00
parent 3ec11ac77c
commit 59635cd186
4 changed files with 56 additions and 2 deletions

View File

@@ -412,6 +412,10 @@ func parseCreateOpts(ctx context.Context, c *cli.Context, runtime *libpod.Runtim
blkioWeight uint16
namespaces map[string]string
)
if c.IsSet("restart") {
return nil, errors.Errorf("--restart option is not supported.\nUse systemd unit files for restarting containers")
}
idmappings, err := util.ParseIDMapping(c.StringSlice("uidmap"), c.StringSlice("gidmap"), c.String("subuidname"), c.String("subgidname"))
if err != nil {
return nil, err