Skip to content

ignore/types: add Containerfile#3271

Open
Pashugan wants to merge 1 commit intoBurntSushi:masterfrom
Pashugan:add-filetype-containerfile
Open

ignore/types: add Containerfile#3271
Pashugan wants to merge 1 commit intoBurntSushi:masterfrom
Pashugan:add-filetype-containerfile

Conversation

@Pashugan
Copy link

@Pashugan Pashugan commented Feb 3, 2026

This PR adds Containerfile as a synonym to Dockerfile.

Containerfile is the preferred file name in Podman and Buildah.

In hindsight, docker could be not the best name for the file type, but my thinking is that it's best to leave it as it is than to add a new type, let alone rename it. Also, container would have been too generalized, and containerfile would have been too long to type.

@BurntSushi
Copy link
Owner

This seems a little odd to me. Podman and Buildah aren't Docker though right? So it seems weird for non-Docker things to show up in a search for Docker related files.

I agree the naming here is weird. -t container doesn't feel quite right.

Usually the ignore types are tied to a particular piece of software. Maybe we should just have -t podman and -t buildah?

@Pashugan
Copy link
Author

Pashugan commented Feb 4, 2026

You are completely right that the situation here is a bit odd.

Yes, Podman and Buildah are alternatives to Docker tools, with similar functionality but having nothing to do with Docker Inc. as a vendor. As I understand it, the whole idea of using the name "Containerfile" was to emphasize vendor neutrality. Having that in mind, we can think about software that uses it as "container tools", e.g. Docker itself (though not by default but via -f Containerfile), Podman, Buildah etc.

I do agree that most people who historically used -t docker may not expect to suddenly find Containerfiles in the output. I am just not sure how serious this issue can be for them.

On the other hand, people who want Containerfiles likely expect to find Dockerfiles as well, because they are used interchangeably for backward compatibility with other tools than Docker. It can also be handy for many to have a file type that searches through both file names.

Hence, we perhaps should leave -t docker as it is.

The real question then is how to name the new type. I do not feel that naming after a tool/vendor is a good idea because of the reasons mentioned in the second paragraph. At the moment, I can't come up with a better idea than -t containerfile, so any help from the community is very much appreciated. It is long, but at least it's very specific.

@Pashugan
Copy link
Author

Pashugan commented Feb 4, 2026

To make things more confusing, Apple's container tool defaults to Dockerfile and falls back to Containerfile. Either way, we cannot list all container tools and should go with something neutral.

@BurntSushi
Copy link
Owner

I guess we should probably just call it container. And it should include both Containerfile and Dockerfile, right?

@Pashugan
Copy link
Author

Pashugan commented Feb 4, 2026

I find container a bit odd, but eventually it's your call. We might have containerfile and container as a synonym/shortcut. If you're happy, I can push the updated version. Thanks.

@BurntSushi
Copy link
Owner

BurntSushi commented Feb 4, 2026

I also find it odd. But containerfile is very long and perhaps suggests something more specific IMO that would exclude Dockerfile.

@Pashugan Pashugan force-pushed the add-filetype-containerfile branch from cc2b50e to a50ddc7 Compare February 4, 2026 22:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants