-
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
Building hangs forever on M1 mac #13535
Comments
Try |
Are you sure it is hanging? Is your context directory very large by any chance? podman-remote has to copy the complete directory into the VM. |
Yes this works for me, but to do this I have to clone a new repo inside the VM
I have thought so, but then after writing a |
You can also pass a tarball instead of a file, if you want to control the size of the build context / troubleshoot. Keeping files cached on the VM is much faster than copying them, though (for large mostly unchanged ones, that is) |
can you please update to 4.0.2? it is in brew. |
FWIW:
|
I tried to reinstall it, the client version stays at 4.0.0-dev with git commit |
I just completely nuked my mac (to be dead sure). Completely clean install, install brew, install podman and the version is 4.0.2.
|
ah I see you installed stable podman, mine was dev version which is installed with |
hard to say, are you seeing any clues in podman --log-level=debug build .... ? |
Here is the log
|
More on the logs, I waited for ~10 mins, it finally built
|
Im not sure what is going on here. Here are some things to try:
|
I think the problem is my context dir is probably too large, I have a Rust project dir which is a workspace, it contains 3 binary crates. After I remove all The .dockerignore is simply like this
|
@jwhonce I think we were doing the filtering on the client side, for just this reason, was that removed? |
@rhatdan Short answer - yes filtering is still there. https://github.com/containers/podman/blame/37bb6aa346e584a37366538b33cd906f4762b5ab/pkg/bindings/images/build.go#L583 |
@rhatdan @hyche I added a test in #13665 to ensure that .containerignore is being honored. @hyche How many files were in the target/ directory? We currently use filepath.Walk() when building the tarball and I suspect filepath.WalkDir() might be faster when there are a lot of files in an ignored directory. |
The target/ dir contains 334 directories, and 3136 files, it's about 2.6GB size.. So it's fairly large. And yeah, I can confirm the |
@jwhonce Are you going to switch to filepath.WalkDir()? |
@rhatdan I am looking into that now |
Ensure a directory added to .containerignore on client is not included in tar sent to remote podman API service * Clean up podman invocations to not include duplicate --remote and --url flags * Use pkill vs. pgrep when cleaning up podman API service in tests * Add exit code when logging error when testing Closes containers#13535 Signed-off-by: Jhon Honce <[email protected]>
Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)
/kind bug
Description
Steps to reproduce the issue:
Install dev podman with
brew install --HEAD podman
Init and start machine
podman machine --init --cpus 2 --disk-size 50 -m 4096 --now
Build any Dockerfile with
podman build -f path/to/Dockerfile .
(with or without Dockerfile)Describe the results you received:
Hanging forever
Describe the results you expected:
Should process building as normal
Additional information you deem important (e.g. issue happens only occasionally):
Output of
podman version
:Output of
podman info --debug
:Package info (e.g. output of
rpm -q podman
orapt list podman
):Output of
brew info podman
Have you tested with the latest version of Podman and have you checked the Podman Troubleshooting Guide? (https://github.com/containers/podman/blob/main/troubleshooting.md)
Yes (no
useradd
as mentioned in point 6)Additional environment details (AWS, VirtualBox, physical, etc.):
The text was updated successfully, but these errors were encountered: