For some developers, Containerfile is just an alternative name for Dockerfile.
For some others, Containerfile and Dockerfile are used in order to explicitly inform the format (oci vs `docker) of the container.
And there are projects (including some of mine) using Containerfile names. However this plugin doesn't detect the files due to the naming difference.
Differences between OCI and Docker
For the sake of brevity, I won't go fully deep into the topic as this is not the place for discussing it. But there are actually some differences between OCI and Docker specifications, but Docker specification is essentially an extension of OCI specification.
docker format allows HEALTHCHECK and SHELL instructions while oci doesn't
Docker only builds docker format containers
Podman and Buildah build oci and docker containers
Docker is happy to runoci containers as well
Hadolint
Hadolint is able to lint both formats without any problem.
$ hadolint path/to/Containerfile # Works like a charm
Feature request
My request is about detecting Containerfile as an alternative name to Dockerfile and linting them just like it would with Dockerfiles. As Hadolint does that out-of-the-box, this should not require any change to Hadolint.
Intro
For some developers,
Containerfile
is just an alternative name forDockerfile
. For some others,Containerfile
andDockerfile
are used in order to explicitly inform the format (oci
vs `docker) of the container.And there are projects (including some of mine) using
Containerfile
names. However this plugin doesn't detect the files due to the naming difference.Differences between OCI and Docker
For the sake of brevity, I won't go fully deep into the topic as this is not the place for discussing it. But there are actually some differences between OCI and Docker specifications, but Docker specification is essentially an extension of OCI specification.
docker
format allowsHEALTHCHECK
andSHELL
instructions whileoci
doesn'tdocker
format containersoci
anddocker
containersoci
containers as wellHadolint
Hadolint is able to lint both formats without any problem.
Feature request
My request is about detecting
Containerfile
as an alternative name toDockerfile
and linting them just like it would withDockerfile
s. As Hadolint does that out-of-the-box, this should not require any change to Hadolint.Extra info
Containerfile spec: https://www.mankier.com/5/Containerfile Buildah on Containerfile vs Dockerfile and preferring Containerfile: https://github.com/containers/buildah/discussions/3170