docker run
not working inside a GitHub action
#27209
-
This line
inside a Github action fails with:
It works without a problem locally from the command line. Anything you put as “bash” will not work either. I can’t use the same container as a runner, since its values are defined in some environment variables, so it’s not known at the time of starting the workflow. Alternatively, being able to set some variables (as a matter of fact, they’re contained in an artifact) so that a container runner could be used from the beginning would be nice alternative. |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments
-
Looking at the Dockerfile of that container I’d be extremely surprised if Bash was available. It’s based on an Alpine image, which by default only has the Busybox shell (as Does your build work if you call |
Beta Was this translation helpful? Give feedback.
-
It actually does. Only it was not the first error I obtained, ŧhis one for instance didn’t find |
Beta Was this translation helpful? Give feedback.
-
In the workflow you linked the problem was that the |
Beta Was this translation helpful? Give feedback.
-
Ah, right. Stupid me. Should have eliminated the quotes from the variable. You’re amazing. Thanks! |
Beta Was this translation helpful? Give feedback.
Looking at the Dockerfile of that container I’d be extremely surprised if Bash was available. It’s based on an Alpine image, which by default only has the Busybox shell (as
sh
), and there’s no command in the Dockerfile that looks like it would install Bash. Maybe you have an older version locally that included Bash?Does your build work if you call
sh
instead ofbash
?