I've been getting up-to-speed on using Docker within GitHub Actions, and I keep running across code like this:
docker run --rm -t \
-v "/home/runner":"/home/runner" \
-v "/home/runner/work/_temp/_github_home":"/github/home" \
-v "/home/runner/work/_temp/_github_workflow":"/github/workflow" \
-v "${{ github.workspace }}":"/github/workspace" \
...
I'm curious what the motivation for mounting all these volumes is. I get the /github/workspace
one, to access all of your repository files within the Docker container, but what are these ones for?
/home/runner
/home/runner/work/_temp/_github_home
/home/runner/work/_temp/_github_workflow
"What are you talking about, where did you see this?"
- https://github.community/t/self-hosted-runner-cant-mount-workspace-correctly/17242
- In the accepted answer here: GitHub Action I wrote doesn't have access to repo's files that is calling the action
- https://giters.com/actions/runner/issues/965
- Multiple other locations
And yet, I can find no documentation about why you might want to do this.