I am using docker command line to execute a java application. My java application returns different exit based based on execution result.
e.g in case of error, my java program exits with 101 In case of success, my java program exits with 0
When I run this application from eclipse, I can see that application exit with code as specified above.
However when I run the same application from docker then I am always getting exit code as 127 in case my program errors. For success scenario, the docker command correctly shows the exit code as 0 (zero)
I googled but could not find a answer. Can anybody tell me why it might be happening and any fix for this.
Below are the details: My docker command:
dzdo docker run myapp:28 java -jar myapp.jar
I use below command to check the exit status code:
echo $?
Thanks,
dzdo?