首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >使用s2i为本地存储库构建映像

使用s2i为本地存储库构建映像
EN

Stack Overflow用户
提问于 2020-10-08 20:10:02
回答 1查看 205关注 0票数 0

根据本文档https://github.com/openshift/source-to-image/blob/master/docs/cli.md,我正在尝试使用s2i本地源代码存储库构建一个映像。到目前为止,我已经成功地创建了映像并使用- s2i create test-image s2i_scripts生成了s2i脚本。在此之后,我尝试使用- s2i build . test-image test-image-app在本地构建映像,我在存储库目录中运行此命令。

我尝试构建后得到的结果是:

代码语言:javascript
复制
pulling image error : Error response from daemon: pull access denied for test-image, repository does not exist or may require 'docker login': denied: requested access to the resource is denied
pulling image error : Error response from daemon: pull access denied for test-image, repository does not exist or may require 'docker login': denied: requested access to the resource is denied
ERROR: An error occurred: unable to get test-image:latest
ERROR: Suggested solution: check image name, or if using a local image set the builder image pull policy to "never"
ERROR: If the problem persists consult the docs at https://github.com/openshift/source-to-image/tree/master/docs. Eventually reach us on freenode #openshift or file an issue at https://github.com/openshift/source-to-image/issues providing us with a log from your build using log output level 3.

我也做了一个docker login,当我再次尝试构建时,它是successful...but,错误是相同的。我遗漏了什么或者做得不对?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2020-10-09 20:10:25

它失败的原因是我没有拉出一个基础图像来使用它作为我的源代码。所以我拉出了centos7基础镜像- podman pull centos/python-36-centos7,然后我尝试重新构建,它起作用了- s2i build . centos/python-36-centos7 test-image-app

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/64262237

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档