diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2021-08-30 18:12:29 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-08-30 18:12:29 -0400 |
commit | 95ac8f180f26d7ed4cf2945aa206a156b7a169ca (patch) | |
tree | 4e428c0ca8beab10224e9d959aab62d6f6516928 /libpod | |
parent | c97666723104fde9886ba789fe4ac34a4294981b (diff) | |
parent | ec1f350ee5a3776f6fac6e96e1277d0ab36d130a (diff) | |
download | podman-95ac8f180f26d7ed4cf2945aa206a156b7a169ca.tar.gz podman-95ac8f180f26d7ed4cf2945aa206a156b7a169ca.tar.bz2 podman-95ac8f180f26d7ed4cf2945aa206a156b7a169ca.zip |
Merge pull request #11353 from flouthoc/resolve-workdir-after-mounts
container: resolve workdir during initialization after all the mounts are completed.
Diffstat (limited to 'libpod')
-rw-r--r-- | libpod/container_internal.go | 5 | ||||
-rw-r--r-- | libpod/container_internal_linux.go | 5 |
2 files changed, 5 insertions, 5 deletions
diff --git a/libpod/container_internal.go b/libpod/container_internal.go index 6717ada59..9082b136a 100644 --- a/libpod/container_internal.go +++ b/libpod/container_internal.go @@ -1072,6 +1072,11 @@ func (c *Container) init(ctx context.Context, retainRetries bool) error { return err } + // Make sure the workdir exists while initializing container + if err := c.resolveWorkDir(); err != nil { + return err + } + // Save the OCI newSpec to disk if err := c.saveSpec(newSpec); err != nil { return err diff --git a/libpod/container_internal_linux.go b/libpod/container_internal_linux.go index 8b73c82de..b624f44ac 100644 --- a/libpod/container_internal_linux.go +++ b/libpod/container_internal_linux.go @@ -176,11 +176,6 @@ func (c *Container) prepare() error { return err } - // Make sure the workdir exists - if err := c.resolveWorkDir(); err != nil { - return err - } - return nil } |