myoung34 / docker-github-actions-runner

This will run the new self-hosted github actions runners with docker-in-docker

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

about the usage of docker-in-docker with github actions

twmht opened this issue · comments

@myoung34

I have successfully run myoung34/github-runner:latest and linked it to GitHub, but how can I start another container within this runner? Here are some examples I've tried, and it seems that GitHub does not support Docker-in-Docker. Or is my understanding of Docker-in-Docker different from the functionality you provide?

---
name: test

on: [pull_request]

concurrency:
  group: ${{ github.workflow }}-${{ github.ref }}
  cancel-in-progress: true

jobs:
  test:
    runs-on: self-hosted
    container:
      image: local:my_local_image
    steps:
      - uses: actions/checkout@v2
      - name: Set up Python 3.8
        uses: actions/setup-python@v2
        with:
          python-version: 3.8

image

Also, I have seen that you have documend here , So, GitHub currently doesn't support this, but the functionality does exist? If I want to use a different image (e.g., an image containing CUDA) as a runner, how can I create it?

It's noted on this project that upstream GitHub actions has not fully supported docker in docker, so any side effects are due to that