由于拒绝访问,无人驾驶飞机推到Dockerhub失败

时间:2019-09-03 19:55:43

标签: dockerhub drone

我已经使用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。

1 个答案:

答案 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