[Custom] Dockerfile image
  • Updated on 12 May 2019
  • 1 minute to read
  • Contributors
  • Share
  • Dark
    Light

[Custom] Dockerfile image

  • Share
  • Dark
    Light

This rule enables you to control the docker image and version which will be (not) used across your different repositories.

Mixing and matching your base operating systems for each Docker image can add cognitive load and maintain overhead (e.g. you need to keep track of package managers for different distributions of Linux).

Managing multi Docker images on multi repositories is a tricky task but once accomplished - can reduce the number of production mishaps because it is easier to maintain narrowed distribution of different docker images.

Use case(s)

  • White-listing - create aligment of images and/or their versions across different projects
  • Black-listing - deny the usage of depraceted images (e.g jenkins/jenkins) and/or versions across the entire dev stack

When does this rule fail?

When the Docker image used in the repository doesn't follow the custom rule pattern.

Screen Shot 2019-05-12 at 13.58.08

How to fix?

  1. Change the image type in the dockerfiles according to your org policy
  2. Push the code changes to your branch:
$ git commit -m "Update Docker image according to Datree policy"
$ git push
  1. Datree's policy check automatically ensures the Docker image used in the repository meets the org requirements


What's Next

Activate Docker image custom policy
Was this article helpful?