IssueRaiser

Support Runner inside of Docker Container

**Describe the enhancement** Fully support all features when runner is within a Docker container. Not all features are currently supported when the runner is within a Docker container, [specifically those features that use Docker](https://github.com/actions/runner/blob/f9b5d626c5486d1f02b3bd45879f61834b7aeecc/src/Runner.Worker/ContainerOperationProvider.cs#L68) like Docker-based Actions and `services`. Running self-hosted runners using Docker is an easy way to scale out runners on some sort of Docker-based cluster and an easy way to provide clean workspaces for each run (with `./run.sh --once`). **Code Snippet** [Possible implementation that I am using now](https://github.com/actions/runner/compare/master...unbounce:docker?expand=1). **Additional information** There are a few areas of concern when the runner executes in a Docker container: 1. Filesystem access for other containers needed as part of the job. This can be resolved by using a volume mount from the host which uses a matching host and container path (for example: `docker run -v /home/github:/home/github`, although it doesn't have to be this exact directory) and telling the runner to use a directory within that for the work directory (`./config.sh --work /home/github/work`). This works with the current volume mounting behaviour for containers created by the runner. This would need to be documented as part of the setup process for a Docker-based runner. 1. Network between runner and other containers needed as

Posted by jpb on Apr 3, 2020, 9:18 PM

Tags

Related issues

Raise real-world problems, find people facing the same issue, and discuss solutions.3,500 issues0 comments

support (Network)

Support Runner inside of Docker Container

jpbApr 3, 2020, 9:18 PM

**Describe the enhancement** Fully support all features when runner is within a Docker container. Not all features are currently supported when the runner is within a Docker container, [specifically those features that use Docker](https://github.com/actions/runner/blob/f9b5d626c5486d1f02b3bd45879f61834b7aeecc/src/Runner.Worker/ContainerOperationProvider.cs#L68) like Docker-based Actions and `services`. Running self-hosted runners using Docker is an easy way to scale out runners on some sort of Docker-based cluster and an easy way to provide clean workspaces for each run (with `./run.sh --once`). **Code Snippet** [Possible implementation that I am using now](https://github.com/actions/runner/compare/master...unbounce:docker?expand=1). **Additional information** There are a few areas of concern when the runner executes in a Docker container: 1. Filesystem access for other containers needed as part of the job. This can be resolved by using a volume mount from the host which uses a matching host and container path (for example: `docker run -v /home/github:/home/github`, although it doesn't have to be this exact directory) and telling the runner to use a directory within that for the work directory (`./config.sh --work /home/github/work`). This works with the current volume mounting behaviour for containers created by the runner. This would need to be documented as part of the setup process for a Docker-based runner. 1. Network between runner and other containers needed as

Comments (0)

No comments yet. Start the discussion.

Comment on this issue