You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
Reacted by Ayaz Salikhov, Maxime Brunet, Agriya Khetarpal and Danny Sauer
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)
@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 terraform binary on the PATH) (#13)
@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 terraform binary on the PATH) (#13)
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)
@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.
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.
Activity
asottile commentedon Oct 28, 2020
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)
asottile commentedon Oct 28, 2020
I could maybe do some podman-in-podman shenanigans 🤔
mathbunnyru commentedon May 29, 2021
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.
asottile commentedon May 31, 2021
@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
terraformbinary on thePATH) (#13)mathbunnyru commentedon May 31, 2021
Thanks, @asottile.
Kurt-von-Laven commentedon Oct 1, 2021
@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.
henryiii commentedon Oct 1, 2021
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.
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.
asottile commentedon Oct 1, 2021
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
asottile commentedon Nov 15, 2022
I've just released a brand new "lite" version of pre-commit.ci which may be of interest until the full version has
language: dockersupport. you can read more about it at https://pre-commit.ci/lite -- the tl;dr is adds autofixing to GitHub ActionsUse `shellcheck-py` because `pre-commit.ci` doesn't support Docker
fix: switch to pre-built helm-docs binary