-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[feature request]: docker support #11
Comments
I'm not sure how docker support fits into the puzzle unfortunately. it will probably have to be a pro feature, if at all due to needing network at runtime (a risk I'm not currently willing to take) |
I could maybe do some podman-in-podman shenanigans 🤔 |
It would be nice to have a support for docker in pre-commit.ci, some checks are based on docker. Maybe, more general feature would be to support building in the custom docker image, though. |
@mathbunnyru that's already implement, though disabled at the moment. it's unfortunately costly to enable the feature and introduces a lot of unpredictability in the runtime -- it will likely be locked behind hosted / pro-tier due to those reasons that said, there will be add-ons at some point which will make "customizing" the image easier (for example, a "terraform" add-on might put a system |
Thanks, @asottile. |
@asottile, would only supporting rootless Docker with networking disabled be a viable option? Personally, I'm not a huge fan of pre-commit hooks that require runtime network access (beyond setting up the environment of course) in the first place since they can make working offline a hassle. |
For completeness, a few days ago clang-format was released as wheels for all platforms, and that solved my issues; it's now easy to run clang-format instantly anywhere and it's a 1 MB to max 2MB download. That runs conda-forge (~200MB after days of fighting with it, down from 650 MB) in the the ground, and Docker obviously is behind even that. And you can pin 10, 11, or 12. repos:
- repo: https://github.com/ssciwr/clang-format-hook
rev: v12.0.1
hooks:
- id: clang-format This is only a solution for this one specific case, but it's a good one! I've moved all five of my previously docker-using repos to pre-commit.ci now. Pretty sure I wasn't using docker anywhere else for anything else in pre-commit. |
if this gets implemented it'll be rootless networkless podman -- but it's fairly far off, complicated, and low on the priority list at the moment |
I've just released a brand new "lite" version of pre-commit.ci which may be of interest until the full version has |
I tried out the pre-commit ci on CLI11 and immediately ran into the fact that docker is not available. Would it be possible to eventually support the docker pre-commit actions? I use clang-format quite often.
The text was updated successfully, but these errors were encountered: