我设置了一个简单的go项目,我希望构建一个简单的docker镜像并将其部署到我的私有注册表中.这是我的.drone.yml:
pipeline:
build:
image: golang
commands:
- go build
docker:
image: plugins/docker
username: xxxxxxxxxxx
password: yyyyyyyyyyy
repo: docker.mycompany.it:5000/drone/test
tags: latest
debug: true
Run Code Online (Sandbox Code Playgroud)
但插件尝试连接并验证docker注册表.
如果您使用的是自定义注册表,则需要registry在插件配置[1]中设置参数.注册表参数提供给docker login命令(例如docker login gcr.io)
自定义注册表的示例配置:
pipeline:
docker:
image: plugins/docker
repo: index.company.com/foo/bar
registry: index.company.com
Run Code Online (Sandbox Code Playgroud)
[1]来源http://plugins.drone.io/drone-plugins/drone-docker/