diff options
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/podman/auto-update.go | 2 | ||||
-rw-r--r-- | cmd/podman/containers/ps.go | 8 | ||||
-rw-r--r-- | cmd/podman/root.go | 15 |
3 files changed, 24 insertions, 1 deletions
diff --git a/cmd/podman/auto-update.go b/cmd/podman/auto-update.go index 11433bc25..eed211ff1 100644 --- a/cmd/podman/auto-update.go +++ b/cmd/podman/auto-update.go @@ -16,6 +16,8 @@ var ( autoUpdateDescription = `Auto update containers according to their auto-update policy. Auto-update policies are specified with the "io.containers.autoupdate" label. + Containers are expected to run in systemd units created with "podman-generate-systemd --new", + or similar units that create new containers in order to run the updated images. Note that this command is experimental. Please refer to the podman-auto-update(1) man page for details.` autoUpdateCommand = &cobra.Command{ Use: "auto-update [flags]", diff --git a/cmd/podman/containers/ps.go b/cmd/podman/containers/ps.go index d10cda609..188a8c03b 100644 --- a/cmd/podman/containers/ps.go +++ b/cmd/podman/containers/ps.go @@ -309,7 +309,13 @@ func (l psReporter) Status() string { // Command returns the container command in string format func (l psReporter) Command() string { - return strings.Join(l.ListContainer.Command, " ") + command := strings.Join(l.ListContainer.Command, " ") + if !noTrunc { + if len(command) > 17 { + return command[0:17] + "..." + } + } + return command } // Size returns the rootfs and virtual sizes in human duration in diff --git a/cmd/podman/root.go b/cmd/podman/root.go index 45ca48c39..3bb45f806 100644 --- a/cmd/podman/root.go +++ b/cmd/podman/root.go @@ -128,6 +128,21 @@ func persistentPreRunE(cmd *cobra.Command, args []string) error { return err } + for _, env := range cfg.Engine.Env { + splitEnv := strings.SplitN(env, "=", 2) + if len(splitEnv) != 2 { + return fmt.Errorf("invalid environment variable for engine %s, valid configuration is KEY=value pair", env) + } + // skip if the env is already defined + if _, ok := os.LookupEnv(splitEnv[0]); ok { + logrus.Debugf("environment variable %s is already defined, skip the settings from containers.conf", splitEnv[0]) + continue + } + if err := os.Setenv(splitEnv[0], splitEnv[1]); err != nil { + return err + } + } + if cmd.Flag("cpu-profile").Changed { f, err := os.Create(cfg.CPUProfile) if err != nil { |