Who should write the dockerfile, SRE or developer?

Viewed 435

We are working through a process internally and are curious about what other groups are doing. Who should "own" the dockerfile, devs or SRE? I can see pros and cons to both - if devs write them, then SRE has to update them, if SRE writes them, devs have to communicate needed changes to them.

From my perspective (basically a Project Manager), I want our developers to be able to deploy and our QA able to test as fast as possible, and I want a process that supports this.

1 Answers

It's debatable. It depends on case to case basis.

On a high level, two skills are required to write a Dockerfile, first what goes inside a Dockerfile, and second how best one can write a Dockerfile.

Key points to note:

  1. Dockerfile should be as light as possible (as images are created in layers, the image should not contain any unnecessary impediments from the above layers).
  2. Most importantly image must be secure. Security is a bigger aspect, which is often overlooked.

To answer who should write Dockerfile, from what I have seen most of the time it's the developer as they have more insight about the application moreover nowadays devs are expected to have Docker knowledge. However, for security and other nitty-gritty of Docker, the involvement of SRE is some time required.

The second part of the question is related to CI. Dockerfile hardly changes in relation to features. In case of Dockerfile change, a review of SRE is recommended as CI may fail if all the pipeline stages of image baking process are not satisfied.

To summarize, a collaboration between dev and SRE is required if the application is complex. Dev and SRE have a different perspective to the same thing, and hence input from both are required when they are defined. In case of simple, anyone can do, it doesn't matter.

Related