diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2020-05-06 11:27:05 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-06 11:27:05 +0200 |
commit | 0eb905ff2c2f033ee3009d8d374dcd2347ac04d1 (patch) | |
tree | 093276f33e26dcf320f64fb05783ec54e109d698 /pkg/specgen/generate/container_create.go | |
parent | 7885b5cd52e77d16b846f0d6b981995df6072166 (diff) | |
parent | f7c3cfde77a4bc8b241fb36c4d39cbe2fde0c45c (diff) | |
download | podman-0eb905ff2c2f033ee3009d8d374dcd2347ac04d1.tar.gz podman-0eb905ff2c2f033ee3009d8d374dcd2347ac04d1.tar.bz2 podman-0eb905ff2c2f033ee3009d8d374dcd2347ac04d1.zip |
Merge pull request #6096 from mheon/fix_small_issues
Add small fixes for 'podman run' from diffing inspect
Diffstat (limited to 'pkg/specgen/generate/container_create.go')
-rw-r--r-- | pkg/specgen/generate/container_create.go | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/pkg/specgen/generate/container_create.go b/pkg/specgen/generate/container_create.go index be54b60d2..f3aaf96bf 100644 --- a/pkg/specgen/generate/container_create.go +++ b/pkg/specgen/generate/container_create.go @@ -85,7 +85,12 @@ func MakeContainer(ctx context.Context, rt *libpod.Runtime, s *specgen.SpecGener if err != nil { return nil, err } - options = append(options, libpod.WithRootFSFromImage(newImage.ID(), s.Image, s.RawImageName)) + imgName := s.Image + names := newImage.Names() + if len(names) > 0 { + imgName = names[0] + } + options = append(options, libpod.WithRootFSFromImage(newImage.ID(), imgName, s.Image)) } if err := s.Validate(); err != nil { return nil, errors.Wrap(err, "invalid config provided") |