Ad

Why I Can Run Docker-compose In Github Action Without Install It

- 1 answer

I make a copy/paste from the link here. I am confused about why I can run docker-compose without installing it. When I test locally using "act", it will give me an error about docker-compose command not found.

name: CI-dev-pipeline
on:
  push:
    branches: [ develop ]
  pull_request:
    branches: [ develop ]
jobs:
  build:
    runs-on: ubuntu-latest
    container:
      image: lucasalt/act_base:latest
    steps:
      - uses: actions/[email protected]
        with:
          path: "<INSERT_NAME_OF_REPOSITORY>"

    - name: Build docker
      run: | 
        docker-compose -f ./<REPO_NAME>/docker-compose.test.yml -p testing up -d
Ad

Answer

You are using a docker-image from "lucasalt/act_base". If you look at the description of the images it states:

act_base is a custom runner for the act project. This image contain Node, npm, yarn, docker and docker-compose.

Meaning that it already downloads docker-compose etc. for you.

Ad
source: stackoverflow.com
Ad