# Docker build&test workflow with plugins/docker

**URL:** <https://drone.discourse.group/t/docker-build-test-workflow-with-plugins-docker/7964>\
**Category:** Drone Support\
**Created:** [December 10, 2019, 4:36pm UTC](https://drone.discourse.group/t/docker-build-test-workflow-with-plugins-docker/7964 "2019-12-10T16:36:55Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![hervenicol](https://yyz1.discourse-cdn.com/flex003/user_avatar/drone.discourse.group/hervenicol/32/4701_2.png) [@hervenicol](https://drone.discourse.group/u/hervenicol)\
**Post date:** [December 10, 2019, 4:36pm UTC](https://drone.discourse.group/t/docker-build-test-workflow-with-plugins-docker/7964/1 "2019-12-10T16:36:55Z")

</div>

Hello,

When building docker containers, my first thought is that the easy solution would be to use `plugins/docker`.  
However, I’m a bit lost with its behaviour. It seems it builds / pushes all in one step, while I’d like something like:

- create `myregistry/myapp` image from `Dockerfile`
- create `myapp-tests` from `Dockerfile-tests` (which would `FROM myregistry/myapp` and add my test tools) / run tests in this image.
- run my tests (in some container created from `myapp-tests` image) - can run in several parallel steps.
- if my tests are ok, tag & push `myregistry/myapp`.

As I couldn’t figure how to implement this with `plugins/docker`, I’m running this workflow on the host’s docker, with a socket mount in my runner. But I’m not satisfied with this solution.

Can you share how you do, if I’m wrong with my reasoning, if I missed something ?

Thanks.

---

<div class="post-metadata">

**Author:** ![ashwilliams1](https://yyz1.discourse-cdn.com/flex003/user_avatar/drone.discourse.group/ashwilliams1/32/5549_2.png) [@ashwilliams1](https://drone.discourse.group/u/ashwilliams1)\
**Post date:** [December 10, 2019, 4:46pm UTC](https://drone.discourse.group/t/docker-build-test-workflow-with-plugins-docker/7964/2 "2019-12-10T16:46:40Z")

</div>

> it seems it builds / pushes all in one step, while I’d like something like

this is correct, the plugin builds and publishes the image in a single step by design. you are not required to use this plugin if it does not meet your use case. you can create your own plugins, or you can just execute the necessary shell commands as demonstrated here:

- [Docker (dind) | Drone](https://docs.drone.io/pipeline/docker/examples/services/docker_dind/)
- [Docker | Drone](https://docs.drone.io/pipeline/docker/examples/services/docker)

---

<div class="post-metadata">

**Author:** ![nraw](https://yyz1.discourse-cdn.com/flex003/user_avatar/drone.discourse.group/nraw/32/2886_2.png) [@nraw](https://drone.discourse.group/u/nraw)\
**Post date:** [November 13, 2020, 3:26pm UTC](https://drone.discourse.group/t/docker-build-test-workflow-with-plugins-docker/7964/3 "2020-11-13T15:26:42Z")

</div>

@hervenicol have you managed to create such a pipeline and would be able to share examples? I was pondering on the exact same thing.

---

<div class="post-metadata">

**Author:** ![hervenicol](https://yyz1.discourse-cdn.com/flex003/user_avatar/drone.discourse.group/hervenicol/32/4701_2.png) [@hervenicol](https://drone.discourse.group/u/hervenicol)\
**Post date:** [November 13, 2020, 3:49pm UTC](https://drone.discourse.group/t/docker-build-test-workflow-with-plugins-docker/7964/4 "2020-11-13T15:49:30Z")

</div>

No, I keep using the host’s docker daemon.  
Do you want some info on using the host’s docker daemon?
