我正在尝试将无人机与GitLab一起使用。 在将Docker镜像推送到我的私有注册表之前,它会发出错误:
Successfully built 7afb99118ae2
Successfully tagged ae872a846df0d8df884e89bd3a77cacf49b8f7de:latest
+ /usr/local/bin/docker tag ae872a846df0d8df884e89bd3a77cacf49b8f7de :latest
Error parsing reference: ":latest" is not a valid repository/tag: invalid reference format
我的无人机是 drone/drone:1.0.0-rc.3
这是我的 .drone.yml 文件
kind: pipeline
name: default
steps:
- name: build
image: python:3.6
commands:
- pip install -r requirements.txt
- python -m pytest app.py
when:
branch:
- master
event:
- push
- pull_request
- name: publish
image: plugins/docker
registry: registry.cn-beijing.aliyuncs.com
repo: registry.cn-beijing.aliyuncs.com/xxx/xxx
tags: latest
username:
- from_secret: ali_username
password:
- from_secret: ali_password
我的Dockerfile:
FROM python:3.6-alpine
RUN ln -snf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && echo "Asia/Shanghai" > /etc/timezone
COPY requirements.txt /requirements.txt
RUN pip install -r /requirements.txt
ADD . /code
WORKDIR /code
CMD ["python", "app.py"]
我尝试了以下方法:
tags: latest
tags: 1
tags: [1, 1.1]
tags: [1, 1.1, latest]
tags:
- latest
我甚至尝试删除标签
行,但是仍然无效。
这是怎么回事?谢谢任何提示!