如何在google cloud build中将参数传递给docker run
我试图使用GCB运行cypress管道,但在docker内部运行时它崩溃了 如前所述,解决此问题的方法是使用如何在google cloud build中将参数传递给docker run,docker,google-cloud-platform,cypress,google-cloud-build,cloudbuild.yaml,Docker,Google Cloud Platform,Cypress,Google Cloud Build,Cloudbuild.yaml,我试图使用GCB运行cypress管道,但在docker内部运行时它崩溃了 如前所述,解决此问题的方法是使用--ipc=host运行docker 但是查看文档,我找不到如何在GCB中将参数传递给docker run 有人能帮我吗 管道是 步骤: #安装节点单元模块 -名称:“gcr.io/cloud builders/Thread” 参数:['install'] #林特JS -名称:“gcr.io/cloud builders/Thread” 参数:['lint'] #单元测试 -名称:“gcr
--ipc=host
运行docker
但是查看文档,我找不到如何在GCB中将参数传递给docker run
有人能帮我吗
管道是
步骤:
#安装节点单元模块
-名称:“gcr.io/cloud builders/Thread”
参数:['install']
#林特JS
-名称:“gcr.io/cloud builders/Thread”
参数:['lint']
#单元测试
-名称:“gcr.io/cloud builders/Thread”
参数:['test:unit','--coverage']
#E2E测试(需要cypress依赖项,请参阅https://github.com/GoogleCloudPlatform/cloud-builders-community/pull/485)
-名称:“gcr.io/$PROJECT\u ID/cypress依赖项”
参数:['test:e2e','-headless','-config',video=false']
您可以尝试这样做。我不知道它是否会起作用,因为您在一个容器中运行一个容器,但请尝试一下您的最新步骤
- name: gcr.io/cloud-builders/docker
entrypoint: 'bash'
args:
- -c
- |
docker run --ipc=host gcr.io/$PROJECT_ID/cypress-dependencies \
test:e2e --headless --config video=false
请看:你能分享你的管道吗?@guillaumeblaquiere在主帖子中添加