[GH-ISSUE #1937] DOCKER_HOST env variable is not considered when storing in .env file #928

Closed
opened 2026-03-01 21:47:30 +03:00 by kerem · 1 comment
Owner

Originally created by @Sunyue on GitHub (Aug 1, 2023).
Original GitHub issue: https://github.com/nektos/act/issues/1937

Bug report info

act version:            0.2.48
GOOS:                   darwin
GOARCH:                 amd64
NumCPU:                 16
Docker host:            DOCKER_HOST environment variable is empty.
Sockets found:
        $HOME/.docker/run/docker.sock
Config files:           
        .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
                -P self-hosted=catthehacker/ubuntu:act-22.04
                --env https_proxy=http://proxy.sin.sap.corp:8080
Build info:
        Go version:            go1.18.10
        Module path:           github.com/nektos/act
        Main version:          (devel)
        Main path:             github.com/nektos/act
        Main checksum:         
        Build settings:
                -compiler:            gc
                CGO_ENABLED:          0
                GOARCH:               amd64
                GOOS:                 darwin
                GOAMD64:              v1
                vcs:                  git
                vcs.revision:         65088b8f28d44da128b95ec194a04277b8856be9
                vcs.time:             2023-01-20T18:39:07Z
                vcs.modified:         true

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

Command used with act

gh extension exec act --bug-report

Describe issue

Following https://github.com/nektos/act#docker-context-support, if I manually export DOCKER_HOST before executing gh extension exec act, it works fine. If I store DOCKER_HOST in the .env file, then above error shows.

No response

Workflow content

any

Relevant log output

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

Additional information

No response

Originally created by @Sunyue on GitHub (Aug 1, 2023). Original GitHub issue: https://github.com/nektos/act/issues/1937 ### Bug report info ```plain text act version: 0.2.48 GOOS: darwin GOARCH: amd64 NumCPU: 16 Docker host: DOCKER_HOST environment variable is empty. Sockets found: $HOME/.docker/run/docker.sock Config files: .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 -P self-hosted=catthehacker/ubuntu:act-22.04 --env https_proxy=http://proxy.sin.sap.corp:8080 Build info: Go version: go1.18.10 Module path: github.com/nektos/act Main version: (devel) Main path: github.com/nektos/act Main checksum: Build settings: -compiler: gc CGO_ENABLED: 0 GOARCH: amd64 GOOS: darwin GOAMD64: v1 vcs: git vcs.revision: 65088b8f28d44da128b95ec194a04277b8856be9 vcs.time: 2023-01-20T18:39:07Z vcs.modified: true Error: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running? exit status 1 ``` ### Command used with act ```sh gh extension exec act --bug-report ``` ### Describe issue Following https://github.com/nektos/act#docker-context-support, if I manually export `DOCKER_HOST` before executing `gh extension exec act`, it works fine. If I store `DOCKER_HOST` in the `.env` file, then above error shows. ### Link to GitHub repository _No response_ ### Workflow content ```yml any ``` ### Relevant log output ```sh Error: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running? ``` ### Additional information _No response_
kerem 2026-03-01 21:47:30 +03:00
Author
Owner

@github-actions[bot] commented on GitHub (Jan 29, 2024):

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

<!-- gh-comment-id:1913772543 --> @github-actions[bot] commented on GitHub (Jan 29, 2024): 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#928
No description provided.