Skip to content
This repository has been archived by the owner on Apr 26, 2023. It is now read-only.

Support OCI Containerfile spec #35

Open
ReDemoNBR opened this issue Feb 19, 2023 · 0 comments
Open

Support OCI Containerfile spec #35

ReDemoNBR opened this issue Feb 19, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@ReDemoNBR
Copy link

Intro

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 run oci 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.

Extra info

Containerfile spec: https://www.mankier.com/5/Containerfile
Buildah on Containerfile vs Dockerfile and preferring Containerfile: containers/buildah#3170

@ReDemoNBR ReDemoNBR added the enhancement New feature or request label Feb 19, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant