Closed steschwa closed 9 months ago
What's the use case for this one? Is a
Dockerfile
not correctly applying somewhere?
If you want to build multiple docker images using the same context. Here's an example:
I am building an API that is distributed as a docker image. I therefore have a Dockerfile
. To run database migrations i build another docker image. Because Dockerfile
is already used i need a different filename migrations.Dockerfile
. There is no official recommendation (as far as i am concerned) what naming convention to use to name multiple Dockerfiles. I found this SO https://stackoverflow.com/questions/26077543/how-to-name-dockerfiles that suggests naming them with the .Dockerfile
extension.
Because
Dockerfile
is already used i need a different filenamemigrations.Dockerfile
.
I understand. I did not note that it's an extension rather than a name.
We could also handle the case of Dockerfile.foo
which is a pattern used in the wild.
dockerfile
Dockerfile
dockerfile.bar
Dockerfile.bar
foo.dockerfile
foo.Dockerfile
foo.dockerfile.bar
foo.Dockerfile.bar
Of the additional ones, only Dockerfile.bar
is recognised by nvim as ft=dockerfile
foo.dockerfile
is picked up by filename.
This change is Good Enough.
Icon for
*.Dockerfile
files