-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
podman-remote cannot send tar content with correct dockerfile #8374
Comments
could you show the steps to reproduce it? |
I started a podman system on a linux machine with:
on osx machine I send a build request with:
And after sending context, the returned result is about not finding test.Dockerfile. Dockerfile path is changed. It should be docker/test.Dockerfile. The line
removes directroy name. Probably the aim is always sending dockerfile if it is also removed by .dockerignore. And also I reading/testing the code, nTar functions parameter sources contains docker file at index 0. for loop's first try with filepath.Walk, the line
always returns true. because path and s is both the dockerfile. I found it when I implement .dockerignore when sending context as tar file. The problem occurs when dockerfiles are inside subdirectories. |
@zhangguanzhang Are you opening a PR? |
I open an pr. |
A friendly reminder that this issue had no activity for 30 days. |
I am still working on the pr #8456 |
#8456 merged. |
Hello,
There is a two bug while sending tar to remote with podman-remote.
First one is at: https://github.com/containers/podman/blob/master/pkg/bindings/images/build.go#L143
docker file can be at anywhere so I don't think we set dockerfile parameter as only the file name.
The second one is at: https://github.com/containers/podman/blob/master/pkg/bindings/images/build.go#L219
sources[0] is dockerfile and path==s always will be true. hence dockerfile will not be added to tar.
I use my own fork with tar compression with gzip and dockerignore parsing at https://github.com/kazimsarikaya/podman/tree/fix-send-tar
I didn't create any push request however because I use additional gzip and dockerignore enhancements.
The text was updated successfully, but these errors were encountered: