Home:ALL Converter>Docker exec command is failing with EXIT CODE 137

Docker exec command is failing with EXIT CODE 137

Ask Time:2022-03-08T07:11:57         Author:user3571643

Json Formatter

I am running a CICD pipeline that runs a test script inside a docker container with docker exec and its failing with a return code of 137 every 3rd or 4th time. Here is the code that's running:

docker-compose -p 1234 -f docker-compose.yml exec -T webapp run_tests.sh
STATUS=$?
...
docker-compose -p 1234 -f docker-compose.yml logs --no-color webapp
...
exit $STATUS

Thing is whenever it fails with EXIT CODE 137, container gets killed immediately and there are no logs available for debugging. I think 137 is caused by some external process but I am not able to trace it. Any insights into this will be very helpful.

Author:user3571643,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/71388292/docker-exec-command-is-failing-with-exit-code-137
vanelo :

Thanks for your question, I experience a related error and it was related to a memory limit, try to increase your swap memory.\nHere a link with someone with similar problem",
2022-05-17T16:32:33
yy