-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
In container build output is not executable anymore #46036
Comments
@gsmet this is what I mentioned to you on Friday. If you could test it on Linux, it would be super useful. |
/cc @Karm (native-image), @MichalMaler (documentation), @galderz (native-image), @geoand (jib), @ia3andy (codestart), @maxandersen (podman), @quarkusio/devtools (codestart), @rolfedh (documentation), @sheilamjones (documentation), @zakkak (native-image) |
Will check soon. |
spotted this in podman issue db: containers/podman#15299 it talks about windows, but I'm wondering if its a general podman machine issue. @n1hility might know? |
same reported here #28414 |
Yeah might be a Podman issue. It works fine with Docker on Linux. While it should probably get fixed in Podman, I think we also need to fix the Dockerfiles to set the executable bit. Because on Windows, we won't be able to set the executable bit in the file system anyway. |
I agree with @gsmet - we need to fix our dockerfile. |
…n when copied from the host to the container image. Fix quarkusio#46036
I can't reproduce neither on Linux (x86) nor on Mac (M3) using podman 5.3.2 on linux and 5.2.5 on mac |
…n when copied from the host to the container image. Fix quarkusio#46036 (cherry picked from commit d8b58f0)
@zakkak Which Podman Desktop version were you using on Mac? |
v1.16.1 |
Thanks, let me jump to that version and retry. I didn't see anything related in the release notes. |
@zakkak Weird... Still not executable:
Did you change something in your podman machine (like having the same user id on your host and in the machine?) |
Hum, no, because mine matches: Podman Machine:
Host:
|
Mine look similar to yours :/ What's your podman machine version? Mine says 5.1.1 (built 1717459200) |
Oh oh, I'm on Podman v 5.3.2 with GPU enabled (LibKrun) - it could be the difference. |
Describe the bug
Let's imagine I have a Quarkus application (the simplest Hello Quarkus app works for this case).
If I compile it into native with:
The output is not executable:
It's not an issue on my machine, as it's the wrong OS.
The issue starts to be a bit more problematic when you build the container using our provided dockerfile:
It makes sense... as the executable is not executable.
Workaround:
So, to make it work you need to edit the docker file to become:
I don't know what changed (it can be native-image, postman, etc.). Unfortunately, I cannot test with Docker. But we need to edit our documentation to add the
chmod
.Expected behavior
The container should run without error
Actual behavior
How to Reproduce?
Reproducer:
https://code.quarkus.io
mvn clean verify -Dnative -Dquarkus.native.container-build=true -Dquarkus.container-image.build=true -DskipTests
) - Note at that point, you can check the permission of the executable in thetarget
directorypodman build -f src/main/docker/Dockerfile.native -t quarkus/code-with-quarkus .
podman run -i --rm -p 8080:8080 quarkus/code-with-quarkus
Output of
uname -a
orver
Darwin cescoffi-mac 24.2.0 Darwin Kernel Version 24.2.0: Fri Dec 6 19:01:59 PST 2024; root:xnu-11215.61.5~2/RELEASE_ARM64_T6000 arm64
Output of
java -version
openjdk 21.0.5 2024-10-15 LTS OpenJDK Runtime Environment Temurin-21.0.5+11 (build 21.0.5+11-LTS) OpenJDK 64-Bit Server VM Temurin-21.0.5+11 (build 21.0.5+11-LTS, mixed mode, sharing)
Quarkus version or git rev
3.18.1
Build tool (ie. output of
mvnw --version
orgradlew --version
)Apache Maven 3.9.9 (8e8579a9e76f7d015ee5ec7bfcdc97d260186937)
Additional information
No response
The text was updated successfully, but these errors were encountered: