【发布时间】:2018-01-18 17:02:43
【问题描述】:
我正在尝试使用 Drone 和 docker 插件部署 Web 服务。由于大量的依赖关系,我的图像需要大约一个小时来构建。 为了加快构建时间,我想将一些服务的依赖项(不会经常更改)放在基础映像中,并在部署时在此基础上构建我的实际代码(python 烧瓶应用程序) .
我将基本映像托管在一个私有存储库中,在我的 Dockerfile 中有以下行:
FROM: my_private_repo.com/my_base_image:latest
但我不确定如何正确授予 Drone 访问此 repo 的权限。
我目前在构建作业中遇到以下错误:
Step 1/11 : FROM:xxx
pull access denied for xxx, repository does not exist or may require 'docker login'
time="2018-01-17T13:13:33Z" level=fatal msg="exit status 1"
有没有办法让我将 docker 插件配置为自动登录。
对于上下文,我的 YAML 类似于:
push-feature:
image: plugins/docker
secrets: [docker_username, docker_password]
repo: xxx/yyy/zzz
registry: xxx
tags: "feature"
when:
event: push
branch:
exclude: [ dev, master ]
【问题讨论】: