tcardonne / docker-github-runner

Run GitHub Actions on self-hosted runner using Docker.
MIT License
297 stars 124 forks source link

[Question] Using under docker compose #17

Closed pmatos closed 4 years ago

pmatos commented 4 years ago

Hi,

I am slightly confused as to the usage of github-runner with docker compose. I have a custom image for CI. If I specify this image in my workflow and select a self-host with github-runner image running, github actions complains with :

##[error]Container feature is not supported when runner is already running inside container.

https://github.com/pmatos/actions-test/runs/853195338?check_suite_focus=true#step:2:1

I was wondering if this is the use case for docker compose, i.e. allow the github-runner service to use another base image. It might be, but I don't know how to use it. Can you provide further information if this is the use case for docker compose? Thanks.

tcardonne commented 4 years ago

Hello,

By using a GitHub Runner in Docker, you can't use some features of GitHub Actions. For instance, you can't use the container feature in your workflows. This issue is being tracked in https://github.com/actions/runner/issues/406.

This isn't something really related to docker-compose, as compose is more like a shortcut to start the runner.

Hope this helps

pmatos commented 4 years ago

Thanks. Closing then.