call-of-duty-2-docker-server
call-of-duty-2-docker-server copied to clipboard
Add a healthcheck in the Dockerfile to check the server process
HEALTHCHECK --interval=5s --timeout=3s --retries=7 CMD if [ -z "$(echo -e '\xff\xff\xff\xffgetinfo' | nc -w 1 -u 127.0.0.1 ${CHECK_PORT})" ]; then exit 1; else exit 0; fi