5

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?"

And yet, I can find no documentation about why you might want to do this.

Jordan
  • 3,998
  • 9
  • 45
  • 81

0 Answers0