【发布时间】:2018-07-18 03:59:41
【问题描述】:
我有一个容器构建器步骤
steps:
- id: dockerbuild
name: gcr.io/cloud-builders/docker
entrypoint: 'bash'
args:
- -c
- |
docker build . -t test
images: ['gcr.io/project/test']
用于创建此测试映像的 Dockerfile 具有 gsutil 特定命令,例如
FROM gcr.io/cloud-builders/gcloud
RUN gsutil ls
当我使用 docker build 向容器构建器服务提交时
gcloud container builds submit --config cloudbuild.yml
我看到以下错误
You are attempting to perform an operation that requires a project id, with none configured. Please re-run gsutil config and make sure to follow the instructions for finding and entering your default project id.
The command '/bin/sh -c gsutil ls' returned a non-zero code: 1
ERROR
ERROR: build step 0 "gcr.io/cloud-builders/docker" failed: exit status 1
我的问题是,我们如何在 DockerFile 中使用 gcloud/gsutil 命令,以便我可以在 docker build 步骤中运行?
【问题讨论】:
-
不,我试图引用不同的用例。
-
我有一个容器构建器 docker 步骤。在 docker 文件中,我想运行 gcloud/gsutil 命令
标签: google-container-registry google-container-builder