Plugins/docker: is there a way of only build and not publish


i want only build a docker image with drone and not publish it to any registry. is there a way of doing that? the image would be used on the same box as drone and there is no need for me to publish it somewhere first.

The use case for plugins/docker is to build and publish images. If you do not need to publish images, and just want to build and run images, you do not need the docker plugin. You can just interact directly with the host machine docker daemon:

    image: docker
      - docker build ...
      - docker run ...
      - /var/run/docker.sock:/var/run/docker.sock

Or you can even run a Docker service container in your pipeline as described here

1 Like

perfect. this helped me alot. thanks btw for drone… i love it and it works like a charme.

Also note that we have a dry_run flag which can be used to build the image, without publishing. You should note however that the plugin uses docker-in-docker which means any images you build are only available to the plugin, and are deleted when the plugin terminates.

    image: plugins/docker
    repo: foo/bar
    secrets: [ docker_username, docker_password ]
+   dry_run: true
1 Like