Github Actions - Docker in Docker

Trying to run the container and services pipeline as it’s described on github documentation and getting the follow error

Run npm ci

npm ci

shell: sh -e {0}

sh: 0: Can't open /__w/_temp/a3b0b565-535f-4d98-aacc-3cbe831b1a92.sh

Error: Process completed with exit code 127.

The yaml workflow file is the following:

# This is a basic workflow to help you get started with Actions

name: Main


# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
on: [push, pull_request]        
        
jobs:
  # Label of the container job
  container-job:
    # Containers must run in Linux based operating systems
    runs-on: [ self-hosted ]
    # Docker Hub image that `container-job` executes in
    container: node:10.18-jessie
    name: true
    # Service containers to run with `container-job`
    services:
      # Label used to access the service container
      postgres:
        # Docker Hub image
        image: postgres
        # Provide the password for postgres
        env:
          POSTGRES_PASSWORD: postgres
        # Set health checks to wait until postgres has started
        options: >-
          --health-cmd pg_isready
          --health-interval 10s
          --health-timeout 5s
          --health-retries 5

    steps:

      # Performs a clean installation of all dependencies in the `package.json` file
      # For more information, see https://docs.npmjs.com/cli/ci.html
      - name: Install dependencies
        run: npm ci

      - name: Connect to PostgreSQL
        # Runs a script that creates a PostgreSQL client, populates
        # the client with data, and retrieves data
        run: node client.js
        # Environment variable used by the `client.js` script to create a new PostgreSQL client.
        env:
          # The hostname used to communicate with the PostgreSQL service container
          POSTGRES_HOST: postgres
          # The default PostgreSQL port
          POSTGRES_PORT: 5432

Trying to make this example run as it’s described on the documentation so i can start use my custom docker images to have app-server and database system as pretended.

The self hosted agent is deployed on kubernetes on aks.

Do you have a link to the documentation you are using?

  • Are you running on a LInux machine as your self-hosted runner? and is Docker installed on that Linux machine?

I unfortunately am NOT a container expert. I will try and walk through the docs and see if I can get the example working though, or if I encounter the same issues you have.