dockerdocker-composegitlab-cidocker-daemon

How to prevent docker compose from timeout in ci in case of bad network


Motivation
because of reasons my gitlab-ci job times out during / towards the end of a docker compose up, which takes endless time (network, image size ...)

Problem
All the timeout settings don't have an effect; neither gitlab job timeout, nor docker compose timeout setting.


Solution

  • Solution
    configuring the docker daemon helped.
    In a dind scenario it is possible to inject configuration to the entrypoint, especially dramatically increasing the retries helped:

    services:
          - name: docker:20.10.16-dind
            entrypoint: [
              "dockerd-entrypoint.sh", 
              "--max-concurrent-uploads=2",
              "--max-concurrent-downloads=2",
              "--max-download-attempts=20"
            ]