mirror of
https://github.com/containers/podman.git
synced 2025-08-06 11:32:07 +08:00
Support podman --remote when Containerfile is not in context directory
Fixes: https://github.com/containers/podman/issues/18239 [NO NEW TESTS NEEDED] @test "podman build -f test" in test/system/070-build.bats Will test this. This was passing when run on a local system since the remote end was using the clients path to read the Containerfile The issue is it would not work in a podman machine since the Containerfile would/should be a different path. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
This commit is contained in:
@ -94,6 +94,7 @@ func ParseDockerignore(containerfiles []string, root string) ([]string, string,
|
||||
// so remote must support parsing that.
|
||||
if dockerIgnoreErr != nil {
|
||||
for _, containerfile := range containerfiles {
|
||||
containerfile = strings.TrimPrefix(containerfile, root)
|
||||
if _, err := os.Stat(filepath.Join(root, containerfile+".containerignore")); err == nil {
|
||||
path, symlinkErr = securejoin.SecureJoin(root, containerfile+".containerignore")
|
||||
if symlinkErr == nil {
|
||||
|
Reference in New Issue
Block a user