unpin docker version in pre-commit hook#814
unpin docker version in pre-commit hook#814lorenzo merged 1 commit intohadolint:masterfrom electriquo:patch-1
Conversation
eliminating inconsistency. e.g. for version 2.10.0, pre-commit hooks points to outdated version https://github.com/hadolint/hadolint/blob/47e3022493cb0d51e5af21ee346d4b25bc02bfcd/.pre-commit-hooks.yaml#L7
|
maybe better to commit the file after each release in a github action? |
|
@lorenzo i think it will not solve the issue. pre-commit checkouts the repository at the |
|
@lorenzo any other thoughts? |
|
I’m not familiar with pre-commit hooks. What do you mean by “it checkouts the commit at the rev”? Do you have to keep updating the version locally? |
from pre-commit docs
|
|
@lorenzo did i answer your question? |
|
@foolioo Thanks, I understand what you mean. If this is merged, how do you usually tell docker to update to the latest tag when it is released? Once an image is downloaded to the cache, it will not change anymore |
|
@lorenzo there are 3 ways:
alternatives are enumerated by order of best practice. |
|
Ok, I understand. I think it makes sense to change this. Thanks for your patience |
What I did
eliminating inconsistency. e.g. for version 2.10.0, pre-commit hooks points to outdated version
hadolint/.pre-commit-hooks.yaml
Line 7 in 47e3022
How I did it
unpinning the version from the docker hook, behaves in the same manner as the native hook.
this is not the best approach, since each version will pull the latest docker image but will also run on the latest version that is installed on the operating system. the best way to handle the issue is to pin the exact version with each release.
How to verify it
set
.pre-commit-config.yamlas followsthen execute pre-commit and see whether the latest docker images has been pulled