Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow using Docker actions when running within a Docker container #383

Closed
wants to merge 1 commit into from
Closed

Allow using Docker actions when running within a Docker container #383

wants to merge 1 commit into from

Conversation

jpb
Copy link

@jpb jpb commented Mar 23, 2020

Add --allow-docker-in-docker flag to optionally disable the Container feature is not supported when runner is already running inside container constraint.

This resolves an issue described in #367 (comment).

I am successfully using this change on my self-hosted runner infrastructure which mounts the host's docker socket into the container where the actions runner executes.

@TingluoHuang
Copy link
Member

@jpb thanks for your contribution, do you mind follow contribute.md to create a feature request issue and provide an ADR for the proposed changes.
the main concern I have is around volum mount and network setting, those might become different when the runner is running inside a container. We can discuss more in the Feature request issue. 😆

@jpb
Copy link
Author

jpb commented Apr 3, 2020

Yes – I have created a feature request: #406.

@jpb jpb closed this Apr 3, 2020
@jpb jpb deleted the allow-docker-in-docker branch April 3, 2020 21:19
@DavidGOrtega
Copy link

@jpb I have forked the runner to do a quick implement of labels and support docker in docker. I dont need the flags so I just removed the exception. The final thing does not work.

  runs-on: [gpu]
    container:
      image: docker://davidgortega/gpu:runner
      options: --gpus "device=0" -v "/var/run/docker.sock":"/var/run/docker.sock"

    steps:
      - uses: actions/checkout@v2
      
      - name: run
        run: |
          nvidia-smi

Fails the checkout action
image

Did it work for you or do you have any advice before I get deeper?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants