From 464fec260c509f59ecc7ca0b9b498f392f34958b Mon Sep 17 00:00:00 2001 From: Nalin Dahyabhai Date: Mon, 27 Sep 2021 09:23:04 -0400 Subject: remote build: EvalSymlinks() the context directory Use EvalSymlinks() to find the context directory, in case there's shenanigans. Signed-off-by: Nalin Dahyabhai --- test/system/070-build.bats | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'test/system') diff --git a/test/system/070-build.bats b/test/system/070-build.bats index 0e1396fc6..3faa260e1 100644 --- a/test/system/070-build.bats +++ b/test/system/070-build.bats @@ -956,6 +956,15 @@ EOF run_podman build -t build_test $tmpdir } +@test "podman build build context is a symlink to a directory" { + tmpdir=$PODMAN_TMPDIR/build-test + mkdir -p $tmpdir/target + ln -s target $tmpdir/link + echo FROM alpine > $tmpdir/link/Dockerfile + echo RUN echo hello >> $tmpdir/link/Dockerfile + run_podman build -t build_test $tmpdir/link +} + function teardown() { # A timeout or other error in 'build' can leave behind stale images # that podman can't even see and which will cascade into subsequent -- cgit v1.2.3-54-g00ecf