diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2020-06-30 10:22:21 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-30 10:22:21 -0400 |
commit | 1dab8d1e46ba5cec5f4a302ecb38b51f4f229b51 (patch) | |
tree | e9769f8ceb2d95157ed5122949aa3d988b6fab94 /pkg | |
parent | b163ec35d0d42423c274019cb41013d558d6f822 (diff) | |
parent | aa69e68ef7d11faff29e7eaf4d91d4eb97e419e9 (diff) | |
download | podman-1dab8d1e46ba5cec5f4a302ecb38b51f4f229b51.tar.gz podman-1dab8d1e46ba5cec5f4a302ecb38b51f4f229b51.tar.bz2 podman-1dab8d1e46ba5cec5f4a302ecb38b51f4f229b51.zip |
Merge pull request #6817 from maybe-sybr/maybe/entrypoint-nil-means-inherit
fix: Don't override entrypoint if it's `nil`
Diffstat (limited to 'pkg')
-rw-r--r-- | pkg/spec/createconfig.go | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/pkg/spec/createconfig.go b/pkg/spec/createconfig.go index e19c582b5..a04afa00f 100644 --- a/pkg/spec/createconfig.go +++ b/pkg/spec/createconfig.go @@ -287,10 +287,11 @@ func (c *CreateConfig) getContainerCreateOptions(runtime *libpod.Runtime, pod *l options = append(options, libpod.WithCommand(c.UserCommand)) } - // Add entrypoint unconditionally - // If it's empty it's because it was explicitly set to "" or the image - // does not have one - options = append(options, libpod.WithEntrypoint(c.Entrypoint)) + // Add entrypoint if it was set + // If it's empty it's because it was explicitly set to "" + if c.Entrypoint != nil { + options = append(options, libpod.WithEntrypoint(c.Entrypoint)) + } // TODO: MNT, USER, CGROUP options = append(options, libpod.WithStopSignal(c.StopSignal)) |