4

I'm trying to run my application on AKS with a custom entrypoint script but I received an error:

Error: failed to create containerd task: OCI runtime create failed: container_linux.go:380: starting container process caused: exec: "/docker/run-java.sh": permission denied: unknown

Based on documentation I added entries to the application.properties

quarkus.jib.jvm-entrypoint=/docker/run-java.sh 
quarkus.jib.environment-variables."JAVA_APP_DIR"=/work 

My custom entrypoint script is located in src/main/jib/docker/

In the Maven Jib plugin is an option to setup permission to extra directories but I don't see it in Quarkus extension for Jib.

  • Can you verify that the problem also occurs when building and running the image locally? If so: we could remove the `azure-aks` tag. – Turing85 Nov 04 '21 at 20:43
  • Is `run-java.sh` executable? – geoand Nov 04 '21 at 20:55
  • @Turing85 yes sure, I will check it – Bożek Mariusz Nov 04 '21 at 20:57
  • @geoand should be, probably this is an issue. During the building process run-java.sh should get the right permissions to execute the script. – Bożek Mariusz Nov 04 '21 at 20:59
  • 2
    You can check whether or not it's executable using https://github.com/wagoodman/dive – geoand Nov 04 '21 at 21:18
  • 3
    Assuming that the script is there (verify with `dive` as suggested by @geoand) and the issue is that it doesn't have executable permission bit set, a workaround would be `quarkus.jib.jvm-entrypoint=/bin/sh,/docker/run-java.sh` (also assuming `/bin/sh` exists). – Chanseok Oh Nov 04 '21 at 21:22
  • 1
    run-java.sh is unexecutable (464). @ChanseokOh thanks for the hint, I will check it – Bożek Mariusz Nov 04 '21 at 21:35

1 Answers1

3

Having /bin/sh to run my script solved my issue.

quarkus.jib.jvm-entrypoint=/bin/sh,/docker/run-java.sh
Chanseok Oh
  • 3,920
  • 4
  • 23
  • 63