不能将码头工人形象推向码头工人从Github行动中心



我在GitHub action中有yaml文件,我已经成功地在其中构建了docker映像,我想推入docker hub,但得到以下错误

Run docker push ***/vampi_docker:latest
docker push ***/vampi_docker:latest
shell: /usr/bin/bash -e {0}
An image does not exist locally with the tag: ***/vampi_docker
The push refers to repository [docker.io/***/vampi_docker]
Error: Process completed with exit code 1.

这是yml文件

name: vampi_docker
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: docker login
env:
DOCKER_USER: ${{secrets.DOCKER_USER}}
DOCKER_PASSWORD: ${{secrets.DOCKER_PASSWORD}}
repository: test/vampi_docker:latest
tags: latest, ${{ secrets.DOCKER_TOKEN }}
run: |
docker login -u $DOCKER_USER -p $DOCKER_PASSWORD

- name: Build the Vampi Docker image
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
docker build . --file Dockerfile --tag vampi_docker:latest

- name: List images
run: docker images    
- name: Docker Push
run: docker push ${{secrets.DOCKER_USER}}/vampi_docker:latest

请让我知道我错在哪里,我错过了什么

根据显示的错误

改变:

docker build . --file Dockerfile --tag vampi_docker:latest

:

docker build . --file Dockerfile --tag test/vampi_docker:latest

并重新运行。

相关内容

  • 没有找到相关文章

最新更新