bcgsc / orca

:whale: Genomics Research Container Architecture
http://www.bcgsc.ca/services/orca
GNU General Public License v3.0
48 stars 13 forks source link

dockerfile_lint import default rules #52

Closed suujia closed 6 years ago

suujia commented 6 years ago

Relevant previous commit: https://github.com/bcgsc/orca/pull/51 Asked ho to override default rules warning severity: https://github.com/projectatomic/dockerfile_lint/issues/110

Changes to be made specific to ORCA for the CI to pass. (Warnings for sudo does not exist as rule in default file Warnings for :latest should be set to info)

  profile:
    name: "Default"
    description: "Ignores error messages."
  line_rules:
    FROM:
      rules:
        -
          label: "is_latest_tag"
          regex: /latest/
          level: "info"
          message: "base image uses 'latest' tag"
          description: "using the 'latest' tag may cause unpredictable builds. It is recommended that a specific tag is used in the FROM line."
          reference_url:
            - "https://docs.docker.com/engine/reference/builder/"
            - "#from"
    RUN:
      rules:
       -
         label: "sudo_use"
         regex: /sudo/
         level: "info"
         message: "Use Of sudo Is Not Allowed"
         description: "You should avoid installing or using `sudo` since it has unpredictable TTY and signal-forwarding behavior that can cause more problems than it solves."
         reference_url:
            - "https://docs.docker.com/engine/userguide/eng-image/dockerfile_best-practices/"
suujia commented 6 years ago

Oops this is really messy pull request. Let me try again

sjackman commented 6 years ago

For future, you can in fact reuse the same pull request. This PR was based on your branch default. You can force push a new branch also named default to your repo, and this PR will be updated with the new contents of that branch. I can show you in person if you like.

sjackman commented 6 years ago

See at the top of this PR where it says:

suujia wants to merge 28 commits into bcgsc:master from suujia:default

suujia commented 6 years ago

https://github.com/bcgsc/orca/commit/3c9d6bac62fa821870cee01d9fa95e5e1f6b3a7d https://github.com/bcgsc/orca/commit/1a606fa4373616e60d81912604e3171e4aed9a9d

Ok I see. I ended up squashing it and accidentally committing straight to it. :sweat_smile: noted for future, thank you.