An question about the Docker plugin build and publish images to the Docker registry

.drone.yml:

kind: pipeline
name: default

steps:

  • name: docker
    image: plugins/docker
    settings:
    repo: tingleiwuyan/drone
    username:
    from_secret: docker_name
    password:
    from_secret: docker_pwd
    tags: test

result:


Why is “:latest” instead of “test”?

try this:

 steps:
    - name: docker-publish
      image: plugins/docker
      settings:
        repo: tingleiwuyan/drone
        tags: test
        dockerfile: Dockerfile
        username:
          from_secret: docker_name
        password:
          from_secret: docker_pwd
1 Like