diff --git a/integration/dockerfiles/Dockerfile_test_hardlink b/integration/dockerfiles/Dockerfile_test_hardlink index fd2968ee85..9e55854e56 100644 --- a/integration/dockerfiles/Dockerfile_test_hardlink +++ b/integration/dockerfiles/Dockerfile_test_hardlink @@ -3,3 +3,14 @@ RUN ls -al /usr/libexec/git-core/git /usr/bin/git /usr/libexec/git-core/git-diff RUN stat /usr/bin/git RUN stat /usr/libexec/git-core/git RUN git --version > /git-version + +FROM composer@sha256:5c4bd89217b50125f28e08d9f16414ecb75f90ce9b773605472b35cd55f3e5c0 AS composer +FROM php@sha256:9fe20c8003a12f5907ffdc1d7ec435b4ca4226fa4342b94cec4d66189a439f17 +COPY --from=composer /usr/bin/composer /usr/bin/composer + +COPY ./ /app +WORKDIR /app + +RUN ls -l + +FROM jboss/base-jdk@sha256:138591422fdab93a5844c13f6cbcc685631b37a16503675e9f340d2503617a41 diff --git a/pkg/util/fs_util.go b/pkg/util/fs_util.go index 526ac5f50b..0f5cdc843c 100644 --- a/pkg/util/fs_util.go +++ b/pkg/util/fs_util.go @@ -245,8 +245,8 @@ func extractFile(dest string, hdr *tar.Header, tr io.Reader) error { return errors.Wrapf(err, "error removing %s to make way for new link", hdr.Name) } } - - if err := os.Link(filepath.Clean(filepath.Join("/", hdr.Linkname)), path); err != nil { + link := filepath.Join(dest, hdr.Linkname) + if err := os.Link(filepath.Clean(filepath.Join("/", link)), path); err != nil { return err }