dockercontinuous-integrationdocker-composecontinuous-deployment

Docker in production


How to create work process for Docker in production. Now it works like this:

  1. Developer commit changes to VCS
  2. CI build Docker container with app
  3. Push to registry with latest tag
  4. docker-compose.yaml placed on server
  5. Pull new images and rerun it

But if we are have only one registry any developer can crash production.

How to create a work process to fix this.


Solution

  • The common way is to create different environment, for example, "dev", "acceptance".

    The flow would be :

    1. A dev finish a feature. He deploys it like he's doing right now but in dev.
    2. If after some testing, and reviewing, the code can go to acceptance, you promote it (The important thing in "promoting" an artifact is to not rebuild it, to avoid last-minute changes that would modify the behaviour).
    3. After some more business testing, when the code can go to production, just repeat the previous step.

    There is lot of resources you can find about making a Deployment Pipeline, and in technology, there is OpenShift and Fabric8, even if it's the big artillery for your case.