This could be done with https://github.com/hadolint/hadolint, for example.
This could be done with https://github.com/hadolint/hadolint, for example.