GitLab-CI Multi Runner php composer cache(GitLab-CI Multi Runner php 作曲家缓存)
问题描述
我将 gitlab-ci-multi-runner 与 docker 容器一起使用.一切都很顺利,但是 docker 容器不会保留 composer 缓存,因此在每次运行时 composer 都会一次又一次地下载依赖项,这需要很多时间.有没有办法配置 gitlab-ci-runner docker 容器以保持 composer 缓存或在 composer 缓存的每次运行时挂载一个卷保留?
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?
推荐答案
您可以修改 composer 缓存路径并将内容写入 docker 卷.
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.
参考:
- https://gitlab.com/gitlab-org/gitlab-runner/blob/master/docs/configuration/advanced-configuration.md#volumes-in-the-runnersdocker-section
 - https://docs.docker.com/engine/admin/volumes/volumes/
 
这篇关于GitLab-CI Multi Runner php 作曲家缓存的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:GitLab-CI Multi Runner php 作曲家缓存
				
        
 
            
        基础教程推荐
- 将变量从树枝传递给 js 2022-01-01
 - PHPUnit 的 Selenium 2 文档到底在哪里? 2022-01-01
 - php中的PDF导出 2022-01-01
 - php 7.4 在写入变量中的 Twig 问题 2022-01-01
 - 使用 scandir() 在目录中查找文件夹 (PHP) 2022-01-01
 - Yii2 - 在运行时设置邮件传输参数 2022-01-01
 - php中的foreach复选框POST 2021-01-01
 - 如何在数学上评估像“2-1"这样的字符串?产生“1"? 2022-01-01
 - 主题化 Drupal 7 的 Ubercart “/cart"页 2021-01-01
 - Web 服务器如何处理请求? 2021-01-01
 
    	
    	
    	
    	
    	
    	
    	
    	
				
				
				
				