podman/pkg/spec
Matthew Heon c4627b5846 Fix container and pod create commands for remote create
In `podman inspect` output for containers and pods, we include
the command that was used to create the container. This is also
used by `podman generate systemd --new` to generate unit files.

With remote podman, the generated create commands were incorrect
since we sourced directly from os.Args on the server side, which
was guaranteed to be `podman system service` (or some variant
thereof). The solution is to pass the command along in the
Specgen or PodSpecgen, where we can source it from the client's
os.Args.

This will still be VERY iffy for mixed local/remote use (doing a
`podman --remote run ...` on a remote client then a
`podman generate systemd --new` on the server on the same
container will not work, because the `--remote` flag will slip
in) but at the very least the output of `podman inspect` will be
correct. We can look into properly handling `--remote` (parsing
it out would be a little iffy) in a future PR.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2020-07-10 11:22:23 -04:00
..
config_linux.go Vendor in new version of Buildah 2020-07-09 11:02:28 -04:00
config_linux_cgo.go move go module to v2 2020-07-06 15:50:12 +02:00
config_linux_nocgo.go Split up create config handling of namespaces and security 2019-11-07 21:23:23 -05:00
config_unsupported.go apiv2 container create using specgen 2020-02-19 15:20:15 -06:00
containerconfig.go move go module to v2 2020-07-06 15:50:12 +02:00
createconfig.go Fix container and pod create commands for remote create 2020-07-10 11:22:23 -04:00
namespaces.go move go module to v2 2020-07-06 15:50:12 +02:00
parse.go apiv2 container create using specgen 2020-02-19 15:20:15 -06:00
ports.go Spell check strings and comments 2018-05-25 08:45:15 +00:00
security.go move go module to v2 2020-07-06 15:50:12 +02:00
spec.go move go module to v2 2020-07-06 15:50:12 +02:00
spec_test.go move go module to v2 2020-07-06 15:50:12 +02:00
storage.go move go module to v2 2020-07-06 15:50:12 +02:00
storage_test.go Use EqualValues instead of reflect equality 2019-05-01 10:19:05 -04:00