-
Notifications
You must be signed in to change notification settings - Fork 4
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
can docker-coq-action share a container throughout a multiple-step job? (container: coqorg/coq
, actions/checkout
can't)
#88
Comments
Would it be feasible to change the uid and gid to 1001 and 127 respectively to match github runners? Or at least to make |
See also actions/checkout#1576 |
Thanks @JasonGross
BTW where is documented this GID=127 ? IIRC, the github action workdir has GID=116
↓ Hi @JasonGross !
Yes. But I disagree changing this , notably because:
Not exactly, there is an entrypoint, but you can certainly override it:
Sure, but TTBOMK, installing an opam switch for the root user is somewhat deprecated and would raise warnings. Depending on your needs, you might be able to turn the /home/coq/.opam user switch into a system-wide switch by using
Not sure. If it's possible, I guess it should be documented…
Sure. But just to have more insight:
|
I see
Does this invocation actually work for you? |
I'd like to have a single docker container running in the background that is shared between multiple steps of the same job, much like having Also, I would like to be able to share more code between testing on Docker coq, Alpine, Arch Linux, Debian, etc. If I can set it up so that the only difference between these platforms is
that would be ideal. |
There's a "Detailed Summary" section of actions/checkout#956 that explains why having either |
Yes, but with the
|
OK, good point.
I'm not sure I understand what you mean! the Docker-Coq containers do have a Linux distro by themselves (Debian) |
Hmmm, I'm not sure how to get the entry point working. According to stack overflow, it doesn't seem to be possible to override the entrypoint when specifying a container to use. Maybe I need to create a custom docker image here or something?
I mean that in addition to testing my code against coqorg/coq:dev, I also want to test my code against the system-packaged version of Coq on Debian, Alpine, ArchLinux, etc. It'd be nice to reuse workflow code between these platforms |
Hi!
I don't think so (anyway, that would really look like some over-engineering to me… IMO, a default entrypoint such as the current one should never be a blocker, nor justify creating and maintaining custom images… just for removing the entrypoint; one should either fix the limitation of the platform, or find a good workaround) can you test something like this?
|
Ah OK, I understand better. But IINM, regarding workflow code reuse, I guess you already have a bash script, compatible with both scenarios… |
Yeah, I think that would be ideal, if I can convince GH Actions to support this...
This works locally, at least, thanks!
For workflow code reuse, yes. The main missing feature is not having to reinstall dependencies / set up the container at every job step, and still getting nice top-level grouping. |
Oh, I believe I see what you mean. You'd like to spin successively several docker-coq-actions with the same coq/ocaml, and only pull/setup the docker-coq-action container once. Right? |
AFAICT, currently, the image (not the container) is already reused: thanks to these lines: docker-coq-action/entrypoint.sh Lines 198 to 204 in 1c523ff
the pull of the same I don't know how easy it is to do more reuse… but anyway, I'm interested to discuss this. Cc @Zimmi48 FYI All in all, docker-coq-action is just a GHA version of the Façade pattern, with a syntax à la Travis CI, for Docker containers in general (not limited to Coq). If we can find a nice extension that preserves backwards compatibility, I'm up for adding it. |
I know the pull is already shared, but it's still the case that if I have to, e.g., install 10 minutes worth of Coq dependencies via opam to run my job, I need to do this on every step, or I need to have just one step. |
Hi @JasonGross, Thanks for your feedback. I believe it would be feasible to add some YAML Boolean in docker-coq-action's interface, e.g.: steps:
- uses: actions/checkout@v3
- uses: coq-community/docker-coq-action@v1
with:
opam_file: 'folder/coq-proj.opam'
coq_version: ${{ matrix.coq_version }}
ocaml_version: ${{ matrix.ocaml_version }}
non_ephemeral: true Concretely, this would remove the Questions (Cc @Zimmi48, feel free to react as well if ever you have comments):
Thoughts? other questions? |
I like the direction this goes in, but I think the configuration could be simplified to just having a single
|
Hi @JasonGross, thanks for your update! I agree with your suggestion. |
Meanwhile @JasonGross, feel free to think if you'd like that I put in the README.md documentation (later on) a hyperlink to a project/workflow you maintain where this feature could be useful: indeed that would be a useful, authentic example. |
container: coqorg/coq
, actions/checkout
can't)
Hi @JasonGross, given this issue led to a docker-coq-action wishlist, I'm migrating the issue now. |
Dear @JasonGross, sorry for the lag, but I plan to start implementing it next week… so question for you: will this feature still be useful from you side? as in this case, you'll have the "privilege" to be the first tester ;) Cheers |
Yes, it will still be useful! (Though I won't have time to test this for a bit) |
Any update on this? |
Sorry @JasonGross I didn't work on that lately. I have a pending deadline this week, then |
When running
actions/checking
withcontainer: coqorg/coq:dev
, I seeHow do I get this image working?
The text was updated successfully, but these errors were encountered: