Docker-plugin and host images cache

Is it possible to have images produced by the docker plugin stored in the host images cache? I mean, I would like to launch a pipeline for testing purposes in my local machine and the instantiate a test container without involving any registry. For instance:

[.drone.yml]

  • name: docker
    image: plugins/docker
    settings:
    repo: foo/bar
    dry_run: true

docker exec --include docker

docker run foo/bar

The idea is to enable a developer to produce an image from a pipeline and being able to test it locally without having to share the credentials of our registry.

Thanks in advance

The goal of the docker plugin mentioned in your post is to provide an isolated option for building images without mutating the host machine cache, for security reasons. This plugin is entirely optional. If this plugin does not meet your needs, you could create or use an alternate plugin or even mount the host machine docker cache directly.

Here are some examples:

1 Like