# Docker-plugin and host images cache

**URL:** https://drone.discourse.group/t/docker-plugin-and-host-images-cache/9934
**Category:** Drone Support
**Created:** [September 7, 2020, 6:56pm UTC](https://drone.discourse.group/t/docker-plugin-and-host-images-cache/9934 "2020-09-07T18:56:41Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![mtrivolli](https://yyz1.discourse-cdn.com/flex003/user_avatar/drone.discourse.group/mtrivolli/32/3495_2.png) [@mtrivolli](https://drone.discourse.group/u/mtrivolli)
#### Post date: [September 7, 2020, 6:56pm UTC](https://drone.discourse.group/t/docker-plugin-and-host-images-cache/9934/1 "2020-09-07T18:56:41Z")

</div>

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

---

<div class="post-metadata">

### Author: ![bradrydzewski](https://yyz1.discourse-cdn.com/flex003/user_avatar/drone.discourse.group/bradrydzewski/32/3513_2.png) [@bradrydzewski](https://drone.discourse.group/u/bradrydzewski)
#### Post date: [September 7, 2020, 7:32pm UTC](https://drone.discourse.group/t/docker-plugin-and-host-images-cache/9934/2 "2020-09-07T19:32:59Z")

</div>

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:

- [https://docs.drone.io/pipeline/docker/examples/services/docker/](https://docs.drone.io/pipeline/docker/examples/services/docker/)
- [Build Docker image and re-use in the next step](http://discuss.harness.io/t/build-docker-image-and-re-use-in-the-next-step/6190)
