Graal: Document what are the requirements for the native image executable

Created on 28 Dec 2019  路  7Comments  路  Source: oracle/graal

It seems to me the executable created by the native image has at least a dependency to a shell. I tried to add the executable to a Docker image FROM scratch and it didn't launch.

Since the native image is a black box, it would be great to explicitly list what requirements are expected - thus we could embed the executable in the smallest Docker image possible.

Most helpful comment

glibc is required.

All 7 comments

To be a bit more precise, this is the message I have when I add the executable in a FROM scratch container and try to launch it:

OCI runtime create failed: container_linux.go:345: starting container process caused "exec: \"/bin/sh\": stat /bin/sh: no such file or directory": unknown

glibc is required.

Correct, I have to use an enhanced version of Alpine that contains glibc.

native-image --static does the trick too.

Might be. But I need a shell and cannot use FROM scratch

I confirm. Changing from ENTRYPOINT operator to ENTRYPOINT ["operator"] allowed me to use FROM scratch.

Thanks for the help @greut

Closing the issue as it's not Graal VM related.

Was this page helpful?
0 / 5 - 0 ratings