hi,
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.
hi,
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:
pipeline:
build:
image: docker
commands:
- docker build ...
- docker run ...
volumes:
- /var/run/docker.sock:/var/run/docker.sock
Or you can even run a Docker service container in your pipeline as described here https://stackoverflow.com/questions/46366271/using-dind-on-drone-io
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.
pipeline:
docker-build-publish:
image: plugins/docker
repo: foo/bar
secrets: [ docker_username, docker_password ]
+ dry_run: true