how do i get dockerfile to return a specific exit code from my program? I have a python program and would like to return a code of 2 under certain conditions.
Simply using return 2 does not work.
Any suggestions?
how do i get dockerfile to return a specific exit code from my program? I have a python program and would like to return a code of 2 under certain conditions.
Simply using return 2 does not work.
Any suggestions?
If you want to receive exit code from your program that runs in container you could use docker inspect command:
docker inspect --format='{{.State.ExitCode}}' $INSTANCE_ID