diff options
author | Nalin Dahyabhai <nalin@redhat.com> | 2021-09-27 09:23:04 -0400 |
---|---|---|
committer | Nalin Dahyabhai <nalin@redhat.com> | 2021-09-27 09:27:06 -0400 |
commit | 464fec260c509f59ecc7ca0b9b498f392f34958b (patch) | |
tree | 1c2526da1c612bbea8ad23a6fe0f7d93823a9a30 /pkg | |
parent | 800d594afa160353cc7134ef912bf82f266a122c (diff) | |
download | podman-464fec260c509f59ecc7ca0b9b498f392f34958b.tar.gz podman-464fec260c509f59ecc7ca0b9b498f392f34958b.tar.bz2 podman-464fec260c509f59ecc7ca0b9b498f392f34958b.zip |
remote build: EvalSymlinks() the context directory
Use EvalSymlinks() to find the context directory, in case there's
shenanigans.
Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
Diffstat (limited to 'pkg')
-rw-r--r-- | pkg/bindings/images/build.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/pkg/bindings/images/build.go b/pkg/bindings/images/build.go index ded97d8d6..8cf4532d0 100644 --- a/pkg/bindings/images/build.go +++ b/pkg/bindings/images/build.go @@ -230,6 +230,9 @@ func Build(ctx context.Context, containerFiles []string, options entities.BuildO params.Add("platform", platform) } } + if contextDir, err := filepath.EvalSymlinks(options.ContextDirectory); err == nil { + options.ContextDirectory = contextDir + } params.Set("pullpolicy", options.PullPolicy.String()) |