GithubHelp home page GithubHelp logo

Comments (2)

myoung34 avatar myoung34 commented on June 15, 2024 1

I'm not sure honestly. If I had to guess either the module isnt loaded or virtualization isnt enabled, but this is a bit outside the scope of the docker runner itself

from docker-github-actions-runner.

fabifont avatar fabifont commented on June 15, 2024

I've managed to resolve the problem by creating a custom image with qemu-kvm and dependencies, as well as updating the docker-compose.yaml file.

Here is the Dockerfile:

FROM myoung34/github-runner:latest

# Update packages and install qemu-kvm and dependencies
RUN apt-get update -y && \
    apt-get upgrade -y && \
    apt-get install -y qemu-kvm libvirt-daemon-system libvirt-clients bridge-utils && \
    apt-get clean && \
    rm -rf /var/lib/apt/lists/*

And here is the updated docker-compose.yaml:

version: "3.9"

services:
  my-worker:
    build:
      context: .
      dockerfile: Dockerfile
    privileged: true
    devices:
      - "/dev/kvm:/dev/kvm"
    environment:
      REPO_URL: https://github.com/my-user/my-repo
      RUNNER_NAME: my-runner
      RUNNER_TOKEN: ${RUNNER_TOKEN}
      RUNNER_WORKDIR: /tmp/runner/work
      RUNNER_SCOPE: "repo"
      LABELS: linux,x64,gpu
    security_opt:
      # needed on SELinux systems to allow docker container to manage other docker containers
      - label:disable
    volumes:
      - "/var/run/docker.sock:/var/run/docker.sock"
      - "/tmp/my-runner:/tmp/runner"
      # note: a quirk of docker-in-docker is that this path
      # needs to be the same path on host and inside the container,
      # docker mgmt cmds run outside of docker but expect the paths from within

Please note that while this solution worked in this particular instance, it may not be the most optimal depending on the specifics of your setup and needs.

from docker-github-actions-runner.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.