Act: docker-compose: command not found

Created on 28 Feb 2020  ·  13Comments  ·  Source: nektos/act

Hi, this really nice repo for running action in locally.
But I have a problem when running docker-compose in action.

This is output

$ act -j test
[build/test] 🚀  Start image=node:12.6-buster-slim
[build/test]   🐳  docker run image=node:12.6-buster-slim entrypoint=["/usr/bin/tail" "-f" "/dev/null"] cmd=[]
[build/test]   🐳  docker cp src=C:\Users\Liem\docker\wordpress-docker-compose/. dst=/github/workspace
[build/test] ⭐  Run actions/checkout@v2
[build/test]   ✅  Success - actions/checkout@v2
[build/test] ⭐  Run Build service s
[build/test]   | /github/workflow/1: line 2: docker-compose: command not found
[build/test]   ❌  Failure - Build service s
Error: exit with `FAILURE`: 127

This is my workflow config

name: build
on: 
  push:
    branches:
      - master
jobs:
  test:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - name: Build service s
        run: docker-compose up -d
      - name: List container
        run: docker-compose ps
      - name: Test Wordpress container
        run: docker run --rm --network container:wordpress-docker-compose_wordpress_1 appropriate/curl --retry 3 --retry-connrefused http://localhost:8080/
      - name: Test PhpMyAdmin container
        run: docker run --rm --network container:wordpress-docker-compose_phpmyadmin_1 appropriate/curl --retry 3 --retry-connrefused http://localhost:8888/

This is my docker-compose.yml file

version: '3.7'

services:
  wordpress:
    image: wordpress:latest
    depends_on:
      - wordpress_db
    ports:
      - "8080:80"
#    volumes:
#     - type: bind
#       source: ./wp-content
#       target: /var/www/html/wp-content
    restart: always
    environment:
      WORDPRESS_DB_HOST: wordpress_db:3306
      WORDPRESS_DB_USER: wordpress
      WORDPRESS_DB_PASSWORD: secret
      WORDPRESS_DB_NAME: wordpress

  wordpress_db:
    image: mysql:5.7
    volumes:
      - db_data:/var/lib/mysql
    restart: always
    environment:
      MYSQL_ROOT_PASSWORD: secret
      MYSQL_DATABASE: wordpress
      MYSQL_USER: wordpress
      MYSQL_PASSWORD: secret

  phpmyadmin:
    image: phpmyadmin/phpmyadmin
    depends_on:
      - wordpress_db
    restart: always
    ports:
      - "8888:80"
    environment:
      PMA_HOST: wordpress_db
      MYSQL_ROOT_PASSWORDL: secret
    networks:
      - back

networks:
  back:
volumes:
  db_data: {}

My PC:

  • Windows 10. version 1909
  • Docker version 19.03.5, build 633a0ea
arerunner kinquestion metduplicate

Most helpful comment

Using --platform ubuntu-latest=lucasalt/act_base:latest instead of --platform ubuntu-latest=lucasalt/act_base worked for me without docker login. Many thanks!

All 13 comments

Related to #107

See https://github.com/nektos/act#runners.

You can customize the image used for the runs-on. I've created an image that is a match to GitHub runners, but its like 15GB!

Closing this as a duplicate of #107

I create a image with docker and docker-compose.

docker pull echowuhao/act_base:latest

I think it is enough for those who use docker and docker-compose to run tests.

if not, easy to adjust based on the Dockerfile.

https://github.com/swuecho/act_base

When i run with your image i have this erro

Error: Error response from daemon: pull access denied for echowuhao/act_base, repository does not exist or may require 'docker login': denied: requested access to the resource is denied

same here. Any suggestion.

Error: Error response from daemon: pull access denied for echowuhao/act_base, repository does not exist or may require 'docker login': denied: requested access to the resource is denied

The image is private :(

I tried the image nektos/act-environments-ubuntu:18.04. Docker and docker-composer work well but my container dont mount volume inside

I rebuild and republish the new image from @swuecho

docker pull lucasctrl/act_base:latest

https://github.com/lucasctrl/act_base

I rebuild and republish the new image from @swuecho

docker pull lucasctrl/act_base:latest

https://github.com/lucasctrl/act_base

I get the following error:

Error response from daemon: pull access denied for lucasctrl/act_base, repository does not exist or may require 'docker login': denied: requested access to the resource is denied

Did you tried to be logged in before doing

docker pull lucasalt/act_base:latest

by using

docker login -u USERNAME -p PASSWORD

with your docker hub credentials?

Did you tried to be logged in before doing

docker pull lucasalt/act_base:latest

by using

docker login -u USERNAME -p PASSWORD

with your docker hub credentials?

no, I thought I could download it without login - I somehow found another link to your image and that I could download without login (don’t remember the URL though) and it works great

I did not know how I end up delete the image. thanks @LucasCtrl to set it up.

Using --platform ubuntu-latest=lucasalt/act_base:latest instead of --platform ubuntu-latest=lucasalt/act_base worked for me without docker login. Many thanks!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

justincy picture justincy  ·  3Comments

seed-of-apricot picture seed-of-apricot  ·  6Comments

quisse picture quisse  ·  3Comments

Applelo picture Applelo  ·  5Comments

lwille picture lwille  ·  4Comments