Skip to content
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

Docker containers: use node binary installed inside the container for running actions #2115

Open
bram-perl opened this issue Sep 8, 2022 · 2 comments
Labels
enhancement New feature or request Runner Feature Feature scope to the runner

Comments

@bram-perl
Copy link

bram-perl commented Sep 8, 2022

This feature request is related to:

Context

When using - for example: actions/checkout@v2 - in a workflow then it requires node to run.
The runner does attempt to provide for this and it does this by using a volume mount with target dir /__e/.
This directory contains:

  • node12/bin/node and node16/bin/node; these are 64-bit binaries linked with glibc (or at least that's what I assume, not 100% verified)
  • node12_alpine/bin/node and node16_alpine/bin/node: these are 64-bit binaries linked with musl (or at least that's what I assume, not 100% verified)

This is not always sufficient: when deploying a 32-bit(/i386) docker container then it needs a 32-bit node.
There are only 64 binaries in /__e/ and one of those is used; that does not work and results in a somewhat cryptic error.1

Several solutions are possible:

Describe the enhancement

Today: when an action is run node installed in /__e/ is used, this does not always work (see above).

What I would like: make it possible to use node that is installed inside the container.
This should make it possible to install a 32-bit node inside a 32-bit container and running it - via docker - on a 64-bit host.

Code Snippet

Links to the relevant code:

Additional information

Another nice-to-have (but I suppose that could be a separate feature request): before attempting to run an action that requires node attempt to run node --version inside the container and if that fails provide an error message indicating that node is not usable.

Footnotes

  1. Error in that case: OCI runtime exec failed: exec failed: container_linux.go:380: starting container process caused: no such file or directory: unknown

@bram-perl bram-perl added the enhancement New feature or request label Sep 8, 2022
@nikola-jokic nikola-jokic added the Runner Feature Feature scope to the runner label Oct 7, 2022
iammattcoleman added a commit to iammattcoleman/dracut that referenced this issue Oct 15, 2022
This enables checkout to work in the Gentoo container.

See: actions/runner#2115
Conan-Kudo pushed a commit to dracutdevs/dracut that referenced this issue Oct 15, 2022
This enables checkout to work in the Gentoo container.

See: actions/runner#2115
dscho pushed a commit to dscho/git that referenced this issue Nov 14, 2022
To be up to date with actions/checkout opens the door to use the latest
features if necessary and get the latest security patches.

This also avoids a couple of deprecation warnings in the CI runs.

Note: The `actions/checkout` Action has been known to be broken in i686
containers as of v2, therefore we keep forcing it to v1 there. See
actions/runner#2115 for more details.

Signed-off-by: Oscar Dominguez Celada <dominguez.celada@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
gitster pushed a commit to git/git that referenced this issue Dec 6, 2022
To be up to date with actions/checkout opens the door to use the latest
features if necessary and get the latest security patches.

This also avoids a couple of deprecation warnings in the CI runs.

Note: The `actions/checkout` Action has been known to be broken in i686
containers as of v2, therefore we keep forcing it to v1 there. See
actions/runner#2115 for more details.

Signed-off-by: Oscar Dominguez <dominguez.celada@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
pvalena pushed a commit to pvalena/dracut that referenced this issue Jul 23, 2023
This enables checkout to work in the Gentoo container.

See: actions/runner#2115
@github-actions
Copy link
Contributor

github-actions bot commented Oct 9, 2023

This issue is stale because it has been open 365 days with no activity. Remove stale label or comment or this will be closed in 15 days.

@github-actions github-actions bot added the Stale label Oct 9, 2023
@bram-perl
Copy link
Author

This issue is stale because it has been open 365 days with no activity. Remove stale label or comment or this will be closed in 15 days.

ping.

@github-actions github-actions bot removed the Stale label Oct 16, 2023
gitster added a commit to git/git that referenced this issue Feb 2, 2024
We seem to be getting "Node.js 16 actions are deprecated." warnings
for jobs that use checkout@v3.  Except for the i686 containers job
that is kept at checkout@v1 [*], update to checkout@v4, which is
said to use Node.js 20.

[*] 6cf4d90 (ci(main): upgrade actions/checkout to v3, 2022-12-05)
    refers to actions/runner#2115 and
    explains why container jobs are kept at checkout@v1.  We may
    want to check the current status of the issue and move it to the
    same version as other jobs, but that is outside the scope of
    this step.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Runner Feature Feature scope to the runner
Projects
None yet
Development

No branches or pull requests

3 participants
@nikola-jokic @bram-perl and others