1

My self-hosted docker based runner already activated at GitHub organization level. Separately to perform npm build through our private docker image, Trying with below workflow yml code.

name: CI with Docker

on:
  push:
    branches: [ master ]
  pull_request:
    branches: [ master ]

jobs:
  build:
    runs-on: docker-runner # This is our Self-hosted docker runner
    container:
      image: ubuntu:npm-1 # This is our private docker image.

    steps:
    - uses: actions/checkout@v2

    - name: Build
      run: npm install

It fails with Error: docker: command not found this is expected since my docker-runner image doesn't loaded with docker engine package.

With Self-hosted docker runner, How do i call a private docker image and perform the build? Some pointers to achieve would be helpful. Thanks!

user4948798
  • 1,924
  • 4
  • 43
  • 89
  • looks to me like docker isnt installed on your self hosted agent. You should install docker enginer on that host. – The Fool Dec 03 '21 at 10:34
  • Yes, Docker package not installed in our self hosted docker agent. So to get work my workflow to use `private docker image` i need to use my host machine as runner instead of docker agent as runner? – user4948798 Dec 03 '21 at 10:36
  • 1
    I think you should just install docker on your runner. And maybe also log it into your private registry. It looks to me, it wants to do the right thing, but it can't because docker engine isn't available. – The Fool Dec 03 '21 at 10:49
  • Ok, will install `docker engine` on my `docker runner` and try. – user4948798 Dec 03 '21 at 11:10

0 Answers0