-
Notifications
You must be signed in to change notification settings - Fork 41.1k
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
Buildpacks with Podman Desktop on MacOS fail with "failed to export: get run image top layer SHA: image has no layers" #43354
Comments
I don't currently have easy access to an x86 Linux box, but can you double check if following this section of the docs solves things? |
There are instructions in the Spring Boot documentation for configuring Spring Boot's image-building support for Podman. There are also some tips in the Spring Boot wiki that are more prescriptive (and subject to changes that are out of Spring Boot's control) as well as some troubleshooting tips for situations like this. Does any of this information help your situation? |
Thanks for your quick response.
Yes, I've tried before (and now again) the docs you shared. The Packaging OCI Images wasn’t helpful. I tried adding the spring-boot-maven-plugin By the way, I created a symbolic link between Podman and Docker:
This way, I don’t need to change the spring-boot-maven-plugin As for the Building OCI Images with Spring Boot documentation, I’m using Podman Desktop. Podman seems to be configured correctly, with Docker compatibility working as expected. ![]() I also tried the "Testing with the pack CLI" approach. The command I used was:
But I ran into a different error, again during the Thanks! I will keep trying. Worst case, I will move to Jib.
|
This would only make a difference if the Spring Boot plugins were to shell out to a |
I've removed the symbolic link
and added the spring
The
So, if the property
By removing the
I get the same error as the ones in the description:
|
Does
gives you the same as
? And just to make sure I got all the information: You're working on a MacOS x64, and using Podman Desktop (which creates a virtual machine running Linux x64). Correct? |
Hi,
Kind of.
I've used the However, even using the path outputed by
I have the same issue at EXPORTING phase:
Yes Thanks! |
Okay, I think I understand the problem.
With
We now put that into our Spring Boot config: <configuration>
<docker>
<host>/home/mhalbritter/.local/share/containers/podman/machine/podman-machine-default/podman.sock</host>
<bindHostToBuilder>true</bindHostToBuilder>
</docker>
</configuration> Now this fails with:
That's because it now tries to mount
In my case, it's Now we have a problem: outside the virtual machine the socket is To fix that, we can symlink the
And then fix the Spring Boot config:
Now the build works. Caveat: I have no idea if that has any other consequences. The same would work the other way around: create a symlink in the virtual machine from Does that work for you, too? |
Hi @mhalbritter, thanks for the detailed explanation. I've tried the steps. I am having problems to create the symlink.
I do not have the |
My guess is that
and then run
again. |
When I run
I get
I've researched a bit and I got that "This is a common issue because macOS does not use the /run directory in the same way that some Linux distributions do" In my Mac, I have the "run" folder inside "var", so "/var/run" Running
Probably, this symlink was created by Podman Desktop. |
Okay, then my workaround won't work. You can do it the other way around: SSH into the podman machine, then:
and use this config:
But those are just workarounds to hack around the fact that the paths inside the VM are different than on the host system. It seems that using podman machine (which Podman Desktop is using under the hood) just isn't supported. I don't know if we have workarounds for Docker Desktop in place or if they use a completely different approach. |
Huh, interesting. I just created a new podman machine from scratch:
The When doing Then using
without Maybe that works for you? |
I've tried to create the symlink into the Podman machine (as you suggested before), but got "Operation not supported"
|
I've also tried this approach Also, it didn't work. Same error at EXPORTING phase. Here are the steps:
|
Okay, back to square one. Hm. Thanks for giving it a try. |
Thank you, @mhalbritter, for the help so far. |
I can at least reproduce the error on my Mac M1 machine, so it's not something x64 specific. |
More discussion here: https://cloud-native.slack.com/archives/C033DV8D9FB/p1733249093064199 Still no resolution. |
This may be due to the |
Hi, here's an update from my side regarding this issue. When I replaced Docker with Podman, I initially installed Podman using the installer recommended on the Podman website. However, yesterday I removed the Podman installation and installed it this time using Homebrew. Surprisingly, it now works. The Podman version I am currently using is
|
Hi,
I've recently started using Podman instead of Docker.
Since then, I have been unable to build Spring Boot Docker images using Paketo Buildpacks.
I've tried several solutions, but nothing has worked. That's why I am opening this issue for help.
Thanks!
Spring Boot and Java versions
I am using Spring Boot
3.4.0
and Java21
.Podman version
Here is the Podman version I am using
How to reproduce
It's very easy to reproduce:
./mvnw clean -DskipTests spring-boot:build-image
.Logs
The text was updated successfully, but these errors were encountered: