myoung34 / docker-github-actions-runner

This will run the new self-hosted github actions runners with docker-in-docker

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Failures with both /usr/bin/python and /usr/bin/env python

joeyparrish opened this issue · comments

The base image appears to only install python3. I don't disagree with that, but it doesn't get marked as the default version of python, so both /usr/bin/python and /usr/bin/env python fail in the shebang line of scripts used by my workflows.

I considered changing my workflow to explicitly install python2 or to explicitly set the default to python3, but I think it's best to make the runner's image more compatible with the default images used by GitHub.

/usr/bin/python is not "default" python. It's the system default. It's best practice to explicitly use $ python3 to avoid confusion given the amount of things still use python 2

There's a lot of discussion around this:

Since I'm working with tools that I didn't write, but that refer to /usr/bin/env python, I think it would be best if the runner image had something installed for /usr/bin/python. This would also improve compatibility between this environment and the one provided by GitHub, since /usr/bin/python exists there.

If /usr/bin/python shouldn't be python3, I suggest that we should install python2, as well. What do you think?

we can add python2, i dont see a problem there

Thanks! PR ready.