[GH-ISSUE #919] Issue: Follow the default context setting in Docker #544

Closed
opened 2026-03-01 21:44:21 +03:00 by kerem · 2 comments
Owner

Originally created by @dictcp on GitHub (Dec 9, 2021).
Original GitHub issue: https://github.com/nektos/act/issues/919

System information

  • Operating System: macOS
  • Architecture: x64 (64-bit)
  • Apple M1: no
  • Docker version: 20.10.11
  • act version: 0.2.25

Expected behaviour

act will use endpoint from docker context

Actual behaviour

act will use DOCKER_HOST or default fallback /var/run/docker.sock

Steps to reproduce and act output

$ docker context inspect colima -f "{{.Endpoints.docker.Host}}"
unix:///Users/dick/.colima/docker.sock
$ docker context use colima
$ act
[docker-utils/buildx] 🚀  Start image=catthehacker/ubuntu:act-latest
[docker-utils/buildx]   🐳  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?
Originally created by @dictcp on GitHub (Dec 9, 2021). Original GitHub issue: https://github.com/nektos/act/issues/919 <!-- - Make sure you are able to reproduce it on the [latest version](https://github.com/nektos/act/releases) - Search the existing issues. - Refer to [README](https://github.com/nektos/act/blob/master/README.md). --> ## System information - Operating System: macOS - Architecture: x64 (64-bit) - Apple M1: no - Docker version: 20.10.11 - `act` version: 0.2.25 ## Expected behaviour act will use endpoint from `docker context` ## Actual behaviour act will use `DOCKER_HOST` or default fallback `/var/run/docker.sock` ## Steps to reproduce and `act` output ``` $ docker context inspect colima -f "{{.Endpoints.docker.Host}}" unix:///Users/dick/.colima/docker.sock $ docker context use colima $ act [docker-utils/buildx] 🚀 Start image=catthehacker/ubuntu:act-latest [docker-utils/buildx] 🐳 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? ```
Author
Owner

@dictcp commented on GitHub (Dec 9, 2021):

workaround:

# a custom defined function in the zsh shell
act () { env DOCKER_HOST="$(docker context inspect -f '{{.Endpoints.docker.Host}}')" /usr/local/bin/act $*}
<!-- gh-comment-id:989715183 --> @dictcp commented on GitHub (Dec 9, 2021): workaround: ``` # a custom defined function in the zsh shell act () { env DOCKER_HOST="$(docker context inspect -f '{{.Endpoints.docker.Host}}')" /usr/local/bin/act $*} ```
Author
Owner

@catthehacker commented on GitHub (Dec 9, 2021):

Duplicate of #583

<!-- gh-comment-id:989730291 --> @catthehacker commented on GitHub (Dec 9, 2021): Duplicate of #583
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/act#544
No description provided.