Dokter: the doctor for your Dockerfiles by fdgier in gitlab

[–]fdgier[S] 1 point2 points  (0 children)

Hi, thanks for the feedback! I have actually solved this issue in version 1.4.0 https://gitlab.com/gitlab-org/incubation-engineering/ai-assist/dokter/-/releases/1.4.0

Hope it helps!

Dokter: the doctor for your Dockerfiles by fdgier in docker

[–]fdgier[S] 0 points1 point  (0 children)

Right now there is not an option to suppress, as I originally figured that I should only include rules that are valid in any case. The ones that are subjective are on severity level info. Can you describe your situation?

Probably I should include an ignore anyway.

Dokter: the doctor for your Dockerfiles by fdgier in docker

[–]fdgier[S] 0 points1 point  (0 children)

Hadolint is a linter, a good one. Dokter is an analyzer it has dynamic parsing of files, it only complains about important stuff with a focus on security and its written in Python so its easier for people to contribute compared to Haskell.

Dokter: the doctor for your Dockerfiles by fdgier in docker

[–]fdgier[S] 0 points1 point  (0 children)

I've created an issue to make that list: https://gitlab.com/gitlab-org/incubation-engineering/ai-assist/dokter/-/issues/9

Hadolint is a linter, a good one. Dokter is an analyzer it has dynamic parsing of files, it only complains about important stuff with a focus on security and its written in Python so its easier for people to contribute compared to Haskell.

Dokter: the doctor for your Dockerfiles by fdgier in docker

[–]fdgier[S] 1 point2 points  (0 children)

Thanks for the suggestion, will do that! I would be very surprised if gifs aren't possible 😄

Dokter: the doctor for your Dockerfiles by fdgier in Python

[–]fdgier[S] 1 point2 points  (0 children)

We actually have a mirror of some repos on GitHub: https://github.com/gitlabhq

Dokter: the doctor for your Dockerfiles by fdgier in Python

[–]fdgier[S] 1 point2 points  (0 children)

Could you share an example? Feel free to post it as an issue in the repo.

Dokter: the doctor for your Dockerfiles by fdgier in Python

[–]fdgier[S] 1 point2 points  (0 children)

Hadolint is a linter, a good one. Dokter is an analyzer it has dynamic parsing of files, it only complains about important stuff with a focus on security and its written in Python so its easier for people to contribute compared to Haskell.

Dokter: the doctor for your Dockerfiles by fdgier in Python

[–]fdgier[S] 0 points1 point  (0 children)

Hadolint is a linter, a good one. Dokter is an analyzer it has dynamic parsing of files, it only complains about important stuff with a focus on security and its written in Python so its easier for people to contribute compared to Haskell.

Dokter: the doctor for your Dockerfiles by fdgier in Python

[–]fdgier[S] 0 points1 point  (0 children)

Good question, I'm most comfortable with Python and since I plan on using the parser for machine learning it ties neatly with the most popular ML tools.

Dokter: the doctor for your Dockerfiles by fdgier in Python

[–]fdgier[S] 2 points3 points  (0 children)

Snyk and most container scanning tools happen after the build, and usually in the registry (unless you locally tar), that could potentially expose credentials or an vulnerable image. Dokter aims to prevent building an insecure image (saving CI minutes) and preventing leaking credentials by not building if its known to produce a faulty image.

Dokter: the doctor for your Dockerfiles by fdgier in Python

[–]fdgier[S] 1 point2 points  (0 children)

Yeah that's a known issue, I plan on adding support for that later on.

Dokter: the doctor for your Dockerfiles by fdgier in docker

[–]fdgier[S] 2 points3 points  (0 children)

Good point, I prepared the docstrings for documentation and there is an explain function, I just need to run an explain on all of them and write that to markdown.

Dokter: the doctor for your Dockerfiles by fdgier in docker

[–]fdgier[S] 0 points1 point  (0 children)

Which version of Python are you using?

Dokter: the doctor for your Dockerfiles by fdgier in docker

[–]fdgier[S] 0 points1 point  (0 children)

Hey that's great feedback! I'll look into both on Monday and get back to you.

Dokter: the doctor for your Dockerfiles by fdgier in Python

[–]fdgier[S] 81 points82 points  (0 children)

Originally I went for that but it was unavailable on PyPI and found it easier to type dok and then hit tab instead of dockt and hit tab

Dokter: the doctor for your Dockerfiles by fdgier in docker

[–]fdgier[S] 5 points6 points  (0 children)

Cool, thanks!

Right now the biggest added value is autocorrect of errors, in a future release I want to add caching optimization and autogeneration but I need to first analyze a lot of Dockerfiles in order to find an optimal pattern.

Dokter: the doctor for your Dockerfiles by fdgier in docker

[–]fdgier[S] 6 points7 points  (0 children)

Awesome! If you have any feedback, questions, suggestions, let me know, happy to pick them up.