# Docker CI /CD pipeline

**URL:** <https://forums.docker.com/t/docker-ci-cd-pipeline/88550>\
**Category:** Docker Hub\
**Tags:** ci\_cd\
**Created:** [February 6, 2020, 3:34pm UTC](https://forums.docker.com/t/docker-ci-cd-pipeline/88550 "2020-02-06T15:34:14Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![diegoarpar](https://avatars.discourse-cdn.com/v4/letter/d/6f9a4e/32.png) [@diegoarpar](https://forums.docker.com/u/diegoarpar)\
**Post date:** [February 6, 2020, 3:34pm UTC](https://forums.docker.com/t/docker-ci-cd-pipeline/88550/1 "2020-02-06T15:34:14Z")

</div>

Hi everyone

According with the page [https://success.docker.com/article/dev-pipeline](https://success.docker.com/article/dev-pipeline), in summary, this is the recommendation for every deployment (CASE 1)

In development environment

- Use the version control to develop the application.
- Use a CI tool to build the application/artefact and build the docker image (the application/artifact inside)
- Upload the docker image in the docker registry

In test and production environments

- Use CD tool to run the containers based on the latest and stable docker image (the application/artifact inside)

The mentioned process require continuous image building.

With my team, we are thinking in other strategy (CASE 2). For the first deployment time

In development environment

- Use the version control to develop the application.
- Use a CI tool to build the application/artifact and build the docker stable image (the application is outside using the -v volumen parameter to link the code/artifact with the docker work folder)

In test and production environments

- Use CD tool to run the containers
- Use CD tool to update the code/artifact

for the next developments time assuming that is only necessary update the code/artifact

In development environment

- Use the version control to develop the application.
- Use a CI tool to build the application/artifact

In test and production environments

- Use CD / CD tool to update the code/artifact

In the CASE 2, the docker images and containers are stable (we don’t need libraries system updates)

For the both cases, we have a couple of questions,

Is the CASE 1 (version the docker image (inside the code/artifacts)) a good practice?  
Is the CASE 2 (version the docker image independent of the version of code/artifacts) a good practice?  
What are the recommendations? What are the PROS/CONS of the strategies?

Thanks alot for your opinions
