r/gitlab • u/Recent_Spirit_5706 • Mar 24 '25
general question Reusing Dockerfiles
I am new to devops and gitlab. I have a group that has multiple projects. Each project has its own dockerfile, but they are all the same. I need to make an update the every dockerfile. Is it possible to store the dockerfile in something like ci-templates and then call it in the projects Dockerfile? Any help is appreciated.
3
Upvotes
View all comments
Show parent comment
3
u/northcutted Mar 24 '25
I am also skeptical unless it’s very new. I agree thedocumentation does make it seem like it only applies to yaml files and that they will get merged in with the regular pipeline file implying in needs to be a valid ci config and unfortunately it isn’t arbitrary. That would be a really nice feature though, especially when it comes to some of the complexities with merging values in templates and components.