docker - 谷歌云容器注册表错误: “Failed to trigger build: Request contains an invalid argument.”

标签 docker google-cloud-platform google-kubernetes-engine

怎么了?

我使用Google Cloud GUI为我的项目创建了一个容器构建触发器。
触发器链接到我的GC存储库。
它产生了以下内容:

docker build \
    -t gcr.io/myprojectid/$REPO_NAME:$COMMIT_SHA \
    -f Dockerfile \
    .

每当运行此触发器时,我都会收到消息:

"Failed to trigger build: Request contains an invalid argument."



如果我检查构建细节,它会说:

invalid build: invalid image "gcr.io/myprojectid/myreponame:mycommitsha"



日志不可用。
我在单独的存储库中为两个单独的服务尝试了此方法,两者的结果相同。

这是我要构建的dockerfile之一。
它们可以在我的笔记本电脑上正常工作。
FROM python:3.6

WORKDIR /usr/src/app

RUN pip3 install --upgrade pip && \
pip3 install numpy && \
pip3 install pandas && \
pip3 install sqlalchemy && \
pip3 install psycopg2-binary && \
pip3 install sklearn && \
pip3 install tensorflow && \
pip3 install keras 


COPY . .

# Tensorboard
EXPOSE 6006 

CMD python -u ./trainer.py 

最佳答案

我尝试重新配置您的配置,它对我有用。

构建触发器:

enter image description here

我仅出于方便使用源存储库:

enter code here

和:

enter image description here

当我push时,它会正确构建:

enter image description here

我在Container Registry中得到了一个图像:

enter image description here

HTH!

关于docker - 谷歌云容器注册表错误: “Failed to trigger build: Request contains an invalid argument.”,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50562141/

相关文章:

docker - 如何将环境变量传递给gitlab ci cd中的docker run

google-cloud-platform - 谷歌云存储与文件存储有何不同?

node.js - Gaxios上的此文档不支持此操作-NodeJS-Spreadsheet Google

docker:引用格式无效:存储库名称必须小写。见 'docker run --help'

ubuntu - 启用 docker 容器之间的广播

google-cloud-platform - 使用上传云存储操作替换文件夹

kubernetes - 与 etcd 直接通信的 Kubernetes 模块是什么

kubernetes - 与 K8S 服务或其底层端点的云内部 IP 的确定性连接?

kubernetes - 如何为 StatefulSet 静态配置卷?

docker - 是否有真正的配置作为 jupyter notebook/labs 的代码?