我已经使用Docker插件设置了Drone。它的构建还不错,但是无法推送到私有Dockerhub存储库。
我已经确认dockerhub_username和dockerhub_password是环境变量。
kind: pipeline
type: exec
name: default
steps:
- name: docker
image: plugins/docker
settings:
repo: jbc22/myrepo
username:
from_secret: dockerhub_username
password:
from_secret: dockerhub_password
publish:
image: jbc22/myrepo
report: jbc22/myrepo
Drone返回:
denied: requested access to the resource is denied
time="2019-09-03T19:34:32Z" level=fatal msg="exit status 1"
我希望看到映像被推送到Dockerhub。
答案 0 :(得分:0)
只需解决相同的问题...下面的代码对我有用!
name: default
kind: pipeline
steps:
- name: backend
image: python:3.7
commands:
- pip3 install -r req.txt
- python manage.py test
- name: publish
image: plugins/docker
settings:
username: dockerhub_username
password: dockerhub_password
repo: user/repo_name