Skip to content
Advertisement

Docker ENV LD_PRELOAD prevent container crash but throw java.io.IOException: Cannot run program “ls”: error=2, No such file or directory

I have a problem while call com.google.firebase.cloud.FirestoreClient.getFirestore() in a Java Application inside a Quarkus Server which is Running on an Alpine 3.15.4 inside a Docker container.

I have created a small demo. The results are:

Configuration 1
Enable in the docker file

JavaScript

Results:
init ok
shell fail

Configuration2
Disable in the docker file

JavaScript

Results:
init fail
shell ok

If init fail this error is logged

JavaScript

If shell fail this error is logged

JavaScript

If found some bug reports e.g.

JavaScript

One workaround would be to create two container with different docker files. But I would prefer one container..

Hope someone can held me!

Here is the code of the demo

JavaScript

Docker file

JavaScript

Advertisement

Answer

I was not able to solve the problem so I found a second “workaround”. Workarounds 1.Use 2 containers with different configuration.2 2.Use an other OS than alpin.

I used debian instead of alpin and the problem disappear.

JavaScript
User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement