From 67ec4e1d272d20610f885f91cc322edf57a13f45 Mon Sep 17 00:00:00 2001 From: Matthew Heon Date: Mon, 27 Apr 2020 11:46:28 -0400 Subject: Improve Entrypoint and Command support We should not be overwriting the Specgen's Command and Entrypoint when building the final command to pass in the OCI spec. Both of these will be provided to Libpod for use in `podman inspect` and committing containers, and both must be set to the user's input, not overwritten by the image if unset. Fix this by moving command generation into OCI spec generation and not modifying the SpecGenerator when we do so. Signed-off-by: Matthew Heon --- pkg/specgen/generate/container_create.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'pkg/specgen/generate/container_create.go') diff --git a/pkg/specgen/generate/container_create.go b/pkg/specgen/generate/container_create.go index 7de47988d..bb84f0618 100644 --- a/pkg/specgen/generate/container_create.go +++ b/pkg/specgen/generate/container_create.go @@ -108,7 +108,7 @@ func MakeContainer(ctx context.Context, rt *libpod.Runtime, s *specgen.SpecGener } options = append(options, createExitCommandOption(s, rt.StorageConfig(), rtc, podmanPath)) - runtimeSpec, err := SpecGenToOCI(s, rt, rtc, newImage, finalMounts) + runtimeSpec, err := SpecGenToOCI(ctx, s, rt, rtc, newImage, finalMounts) if err != nil { return nil, err } -- cgit v1.2.3-54-g00ecf