如何将参数传递给google cloud build中的docker run

2024-02-28

我正在尝试使用 GCB 运行 cypress 管道,但在 docker 内运行时它崩溃了。

如描述的那样解决此问题here https://github.com/cypress-io/cypress/issues/350,是运行 docker--ipc=host.

但是查看文档,我找不到如何将参数传递给GCB中的docker run。

谁能帮我?

管道是

steps:
# Install node_modules
- name: 'gcr.io/cloud-builders/yarn'
  args: ['install']
# Lint JS
- name: 'gcr.io/cloud-builders/yarn'
  args: ['lint']
# Unit tests
- name: 'gcr.io/cloud-builders/yarn'
  args: ['test:unit', '--coverage']
# E2E tests (cypress dependencies required, see https://github.com/GoogleCloudPlatform/cloud-builders-community/pull/485)
- name: 'gcr.io/$PROJECT_ID/cypress-dependencies'
  args: ['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
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

如何将参数传递给google cloud build中的docker run 的相关文章

随机推荐