Docker Community Forums

Share and learn in the Docker community.

Docker CI /CD pipeline

Hi everyone

According with the page 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