act
act copied to clipboard
Honor docker context
trafficstars
Act version
act version 0.2.34
Feature description
act does not honor docker context or --container-daemon-socket
❯ docker context use default
default
Current context is now "default"
❯ docker ps
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
❯ docker context use colima-docker
colima-docker
Current context is now "colima-docker"
❯ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
❯ act
ERRO[0000] failed to obtain container engine info: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
[aws-github.yml/Deploy] 🚀 Start image=catthehacker/ubuntu:act-latest
[aws-github.yml/Deploy] 🐳 docker pull image=catthehacker/ubuntu:act-latest platform= username= forcePull=false
Error: unable to determine if image already exists for image 'catthehacker/ubuntu:act-latest' (): Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
❯ act --container-daemon-socket "/Users/maurelio/.colima/docker/docker.sock"
ERRO[0000] failed to obtain container engine info: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
[aws-github.yml/Deploy] 🚀 Start image=catthehacker/ubuntu:act-latest
[aws-github.yml/Deploy] 🐳 docker pull image=catthehacker/ubuntu:act-latest platform= username= forcePull=false
Error: unable to determine if image already exists for image 'catthehacker/ubuntu:act-latest' (): Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
I'm having this same issue. Ubuntu 22.04 Docker Desktop 4.15.0
You can "fake" this until the issue is resolved by symlinking the sock file
sudo ln /Users/adamgilman/.colima/default/docker.sock /var/run/docker.sock
there is no need for symlink, act supports DOCKER_HOST like other docker tools
https://github.com/nektos/act/wiki/Custom-container-engine
You can also run the following command
export DOCKER_HOST=$(docker context inspect --format '{{.Endpoints.docker.Host}}')
This is documented here in readme