Search code examples
phpdockercomposer-phpgitlabgitlab-ci-runner

GitLab-CI Multi Runner php composer cache


I'm using gitlab-ci-multi-runner with docker containers. Everything is going fine, but docker containers don't keep the composer cache so in every run composer downloads dependencies again and again, which takes a lot of time. Is there any way to configure gitlab-ci-runner docker container to keep the composer cache or mount a volume on each run where the composer cache is kept?


Solution

  • You could modify the composer cache path and write the stuff to a docker volume.

    That storage is persistent and can be shared across containers.

    Referencing: