79552944

Date: 2025-04-03 12:41:17
Score: 1
Natty:
Report link

Turns out it was just a matter of waiting for the containers to finish starting up before attempting the tests. Using docker as hostname and adding a repeated health check to make sure the tests only begin when the container is ready solved the issue.

Example command in before_script that accomplishes this:

    - > 
      i=1; while [ $i -le 15 ]; do
        curl -v http://docker:8000/health && break || sleep 1;
        if [ $i -eq 15 ]; then exit 1; fi;
        i=$((i + 1));
      done
Reasons:
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: tabeqc