title: Is there a way to share Dockerfile operations across a monorepo
body: <p>So I've got a application that consists of lets say 4 APIs and a Frontend, all saved on a monorepo.
  Everything is setup with docker, every Service has its own Dockerfile.
  The file structure would look something like this:</p>
  <pre><code>project
  │   README.md
  │   docker-compose.yml
  │
  └───api1
  │   │   src
  |   |   ...
  │   │   Dockerfile
  │   
  └───api2
  │   │   src
  │   │   ...
  │   │   Dockerfile
  │   
  └───api3
  |   │   src
  |   │   ...
  ...
  </code></pre>
  <p>And everything works fine. An APIs Dockerfile would look something like this:</p>
  <pre><code>FROM some_image as deployment
  EXPOSE xxxx/tcp
  
  COPY ...
  
  RUN apk add --no-cache curl~7.80 ...
  
  ...
  
  CMD [...]
  </code></pre>
  <p>Now I would have something like curl~7.80 aswell as other packages that would be needed in api 1-3. <br />
  My question is, is there some way to share  this package and/or this whole RUN operation across my services in a way so that i can modify this in one place instead?</p>
  <p>For instance, if there happens to be a hypothetical vulnerability in curl~7.80 that gets fixed in 7.90, I want to be able to modify the version in one place instead of going through all folders and all Dockerfiles to change this.</p>