I have a microservice that use JDBC. After many discussion here Add JDBC driver to image build - #13 by Robert_Neale I make it running. For this I need a docker file:
FROM openjdk:17-jdk-slim
COPY etc/ /etc/service-request-mgmt/
ADD resources/* /data/
COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
ENV JAVA_OPTS="--add-opens java.base/java.nio=ALL-UNNAMED --add-opens java.base/jdk.internal.misc=ALL-UNNAMED"
ENTRYPOINT ["/entrypoint.sh"]
With this as entry point in same directory as the docker file is:
#!/bin/sh
echo "Starting the Java application with the following JAVA_OPTS: $JAVA_OPTS"
java $JAVA_OPTS -jar /data/@package.name@.jar
For long time everything. But today something went wrong for no reason. When I now upload the image to cumulocity I get this error:
"entrypoint.sh": executable file not found
Currently no error is shown up anymore but the microservice is not running.
I imported the image.tar local into my docker and try to run it and get this error message:
docker: Error response from daemon: failed to create task for container: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: exec: "entrypoint.sh": executable file not found in $PATH: unknown.
I don’t change anything on this part. I only implement more features into my microservice.
I also try to delete the microservice and create them new but this doesn’t help.
What could be the problem? How to fix it?