[GH-ISSUE #2314] act not respecting --container-daemon-socket argument #1072

Closed
opened 2026-03-01 21:48:42 +03:00 by kerem · 3 comments
Owner

Originally created by @bretdavi89 on GitHub (May 2, 2024).
Original GitHub issue: https://github.com/nektos/act/issues/2314

Bug report info

act version:            0.2.62
GOOS:                   linux
GOARCH:                 amd64
NumCPU:                 4
Docker host:            DOCKER_HOST environment variable is not set
Sockets found:
        /var/run/docker.sock
        $XDG_RUNTIME_DIR/docker.sock
Config files:           
        /home/bretdavi/.actrc:
                -P ubuntu-latest=catthehacker/ubuntu:act-latest
                -P ubuntu-22.04=catthehacker/ubuntu:act-22.04
                -P ubuntu-20.04=catthehacker/ubuntu:act-20.04
                -P ubuntu-18.04=catthehacker/ubuntu:act-18.04
Build info:
        Go version:            go1.22.2
        Module path:           command-line-arguments
        Main version:          
        Main path:             
        Main checksum:         
        Build settings:
                -buildmode:           exe
                -compiler:            gc
                -ldflags:             -X main.version=0.2.62
                DefaultGODEBUG:       httplaxcontentlength=1,httpmuxgo121=1,tls10server=1,tlsrsakex=1,tlsunsafeekm=1
                CGO_ENABLED:          1
                CGO_CFLAGS:           
                CGO_CPPFLAGS:         
                CGO_CXXFLAGS:         
                CGO_LDFLAGS:          
                GOARCH:               amd64
                GOOS:                 linux
                GOAMD64:              v1

Error: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?

Command used with act

$ act --container-daemon-socket="unix:///run/user/1000/docker.sock"
INFO[0000] Using docker host 'unix:///var/run/docker.sock', and daemon socket 'unix:///run/user/1000/docker.sock'

Describe issue

When passing docker socket on the command line, it gets ignored, and default is used instead.

If set via DOCKER_HOST environment variable, then it is picked up correctly.

I tested this with version 0.2.59 and that one works as expected, and the correct socket is used.

No response

Workflow content

N/A

Relevant log output

N/A

Additional information

No response

Originally created by @bretdavi89 on GitHub (May 2, 2024). Original GitHub issue: https://github.com/nektos/act/issues/2314 ### Bug report info ```plain text act version: 0.2.62 GOOS: linux GOARCH: amd64 NumCPU: 4 Docker host: DOCKER_HOST environment variable is not set Sockets found: /var/run/docker.sock $XDG_RUNTIME_DIR/docker.sock Config files: /home/bretdavi/.actrc: -P ubuntu-latest=catthehacker/ubuntu:act-latest -P ubuntu-22.04=catthehacker/ubuntu:act-22.04 -P ubuntu-20.04=catthehacker/ubuntu:act-20.04 -P ubuntu-18.04=catthehacker/ubuntu:act-18.04 Build info: Go version: go1.22.2 Module path: command-line-arguments Main version: Main path: Main checksum: Build settings: -buildmode: exe -compiler: gc -ldflags: -X main.version=0.2.62 DefaultGODEBUG: httplaxcontentlength=1,httpmuxgo121=1,tls10server=1,tlsrsakex=1,tlsunsafeekm=1 CGO_ENABLED: 1 CGO_CFLAGS: CGO_CPPFLAGS: CGO_CXXFLAGS: CGO_LDFLAGS: GOARCH: amd64 GOOS: linux GOAMD64: v1 Error: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running? ``` ### Command used with act ```sh $ act --container-daemon-socket="unix:///run/user/1000/docker.sock" INFO[0000] Using docker host 'unix:///var/run/docker.sock', and daemon socket 'unix:///run/user/1000/docker.sock' ``` ### Describe issue When passing docker socket on the command line, it gets ignored, and default is used instead. If set via DOCKER_HOST environment variable, then it is picked up correctly. I tested this with version 0.2.59 and that one works as expected, and the correct socket is used. ### Link to GitHub repository _No response_ ### Workflow content ```yml N/A ``` ### Relevant log output ```sh N/A ``` ### Additional information _No response_
kerem 2026-03-01 21:48:42 +03:00
Author
Owner

@bretdavi89 commented on GitHub (May 2, 2024):

Actually just noticing that in newer version, it's treating docker host/socket separately:
Using docker host 'unix:///var/run/docker.sock', and daemon socket 'unix:///run/user/1000/docker.sock'

So it is picking up the socket, but still trying to use the default one as well?

On the older version, simply passing the socket via the command line worked properly. Not sure why there are 2 variables for this

<!-- gh-comment-id:2090291941 --> @bretdavi89 commented on GitHub (May 2, 2024): Actually just noticing that in newer version, it's treating docker host/socket separately: ` Using docker host 'unix:///var/run/docker.sock', and daemon socket 'unix:///run/user/1000/docker.sock'` So it is picking up the socket, but still trying to use the default one as well? On the older version, simply passing the socket via the command line worked properly. Not sure why there are 2 variables for this
Author
Owner

@webjay commented on GitHub (Sep 4, 2024):

Same in act version 0.2.66

<!-- gh-comment-id:2328868467 --> @webjay commented on GitHub (Sep 4, 2024): Same in act version 0.2.66
Author
Owner

@github-actions[bot] commented on GitHub (Mar 4, 2025):

Issue is stale and will be closed in 14 days unless there is new activity

<!-- gh-comment-id:2695860595 --> @github-actions[bot] commented on GitHub (Mar 4, 2025): Issue is stale and will be closed in 14 days unless there is new activity
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#1072
No description provided.