[GH-ISSUE #1756] Failed to bind docker socket #859

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

Originally created by @KnisterPeter on GitHub (Apr 24, 2023).
Original GitHub issue: https://github.com/nektos/act/issues/1756

Bug report info

act version:            0.2.44-27-g2ea7891
GOOS:                   linux
GOARCH:                 amd64
NumCPU:                 12
Docker host:            DOCKER_HOST environment variable is not set
Sockets found:
        /var/run/docker.sock
Config files:
        /home/markusw/.actrc:
                -P ubuntu-latest=node:16-buster-slim
                -P ubuntu-22.04=node:16-bullseye-slim
                -P ubuntu-20.04=node:16-buster-slim
                -P ubuntu-18.04=node:16-buster-slim
Build info:
        Go version:            go1.18.10
        Module path:           command-line-arguments
        Main version:
        Main path:
        Main checksum:
        Build settings:
                -compiler:            gc
                -ldflags:             -X main.version=0.2.44-27-g2ea7891
                CGO_ENABLED:          1
                CGO_CFLAGS:
                CGO_CPPFLAGS:
                CGO_CXXFLAGS:
                CGO_LDFLAGS:
                GOARCH:               amd64
                GOOS:                 linux
                GOAMD64:              v1
Docker Engine:
        Engine version:        23.0.3
        Engine runtime:        runc
        Cgroup version:        2
        Cgroup driver:         cgroupfs
        Storage driver:        overlay2
        Registry URI:          https://index.docker.io/v1/
        OS:                    Debian GNU/Linux 11 (bullseye)
        OS type:               linux
        OS version:            11
        OS arch:               x86_64
        OS kernel:             5.15.90.1-microsoft-standard-WSL2
        OS CPU:                12
        OS memory:             15891 MB
        Security options:
                name=seccomp,profile=builtin
                name=cgroupns


INFO    ️📣 A newer version of 'act' is available - consider ugrading to 0.2.44.

Command used with act

./dist/local/act --verbose --rm --rebuild --pull=false -C ./pkg/runner/testdata/ -W ./basic/push.yml

Describe issue

Since https://github.com/nektos/act/pull/1745 the binding of the docker socket fails (at least in some cases).
We did saw this on a linux host as well as on a host running in WSL2 on windows (with docker installed inside WSL).

No response

Workflow content

The basic push workflow from our testdata (see cli above).

Relevant log output

markusw@LAPTOP-EH2EG37O:~/source/act (master)$ ./dist/local/act --verbose --rm --rebuild --pull=false -C ./pkg/runner/testdata/ -W ./basic/push.yml
DEBU[0000] Loading environment from /home/markusw/source/act/pkg/runner/testdata/.env
DEBU[0000] Loading action inputs from /home/markusw/source/act/pkg/runner/testdata/.input
DEBU[0000] Loading secrets from /home/markusw/source/act/pkg/runner/testdata/.secrets
DEBU[0000] Evaluated matrix inclusions: map[]
DEBU[0000] Loading workflow '/home/markusw/source/act/pkg/runner/testdata/basic/push.yml'
DEBU[0000] Reading workflow '/home/markusw/source/act/pkg/runner/testdata/basic/push.yml'
DEBU[0000] Preparing plan with all jobs
DEBU[0000] Using the only detected workflow event: push
DEBU[0000] Planning jobs for event: push
DEBU[0000] Final matrix after applying user inclusions '[map[]]'
DEBU[0000] Loading revision from git directory
DEBU[0000] Conditional GET for notices etag=2a9d7b27-ff27-4599-8ecc-d96460734d6b
DEBU[0000] Found revision: 2ea78917879854128154124d3b7c8fa8d552e6e8
DEBU[0000] HEAD points to '2ea78917879854128154124d3b7c8fa8d552e6e8'
DEBU[0000] using github ref: refs/heads/master
DEBU[0000] Found revision: 2ea78917879854128154124d3b7c8fa8d552e6e8
[basic/check] [DEBUG] evaluating expression 'success()'
[basic/check] [DEBUG] expression 'success()' evaluated to 'true'
[basic/check] 🚀  Start image=node:16-buster-slim
[basic/check]   🐳  docker pull image=node:16-buster-slim platform= username= forcePull=false
[basic/check] [DEBUG]   🐳  docker pull node:16-buster-slim
[basic/check] [DEBUG] Image exists? true
[basic/check]   🐳  docker create image=node:16-buster-slim platform= entrypoint=["tail" "-f" "/dev/null"] cmd=[]
[basic/check] [DEBUG] Common container.Config ==> &{Hostname: Domainname: User: AttachStdin:false AttachStdout:false AttachStderr:false ExposedPorts:map[] Tty:true OpenStdin:false StdinOnce:false Env:[RUNNER_TOOL_CACHE=/opt/hostedtoolcache RUNNER_OS=Linux RUNNER_ARCH=X64 RUNNER_TEMP=/tmp LANG=C.UTF-8] Cmd:[] Healthcheck:<nil> ArgsEscaped:false Image:node:16-buster-slim Volumes:map[] WorkingDir:/home/markusw/source/act/pkg/runner/testdata Entrypoint:[] NetworkDisabled:false MacAddress: OnBuild:[] Labels:map[] StopSignal: StopTimeout:<nil> Shell:[]}
[basic/check] [DEBUG] Common container.HostConfig ==> &{Binds:[unix:///var/run/docker.sock:/var/run/docker.sock] ContainerIDFile: LogConfig:{Type: Config:map[]} NetworkMode:host PortBindings:map[] RestartPolicy:{Name: MaximumRetryCount:0} AutoRemove:false VolumeDriver: VolumesFrom:[] ConsoleSize:[0 0] CapAdd:[] CapDrop:[] CgroupnsMode: DNS:[] DNSOptions:[] DNSSearch:[] ExtraHosts:[] GroupAdd:[] IpcMode: Cgroup: Links:[] OomScoreAdj:0 PidMode: Privileged:false PublishAllPorts:false ReadonlyRootfs:false SecurityOpt:[] StorageOpt:map[] Tmpfs:map[] UTSMode: UsernsMode: ShmSize:0 Sysctls:map[] Runtime: Isolation: Resources:{CPUShares:0 Memory:0 NanoCPUs:0 CgroupParent: BlkioWeight:0 BlkioWeightDevice:[] BlkioDeviceReadBps:[] BlkioDeviceWriteBps:[] BlkioDeviceReadIOps:[] BlkioDeviceWriteIOps:[] CPUPeriod:0 CPUQuota:0 CPURealtimePeriod:0 CPURealtimeRuntime:0 CpusetCpus: CpusetMems: Devices:[] DeviceCgroupRules:[] DeviceRequests:[] KernelMemory:0 KernelMemoryTCP:0 MemoryReservation:0 MemorySwap:0 MemorySwappiness:<nil> OomKillDisable:<nil> PidsLimit:<nil> Ulimits:[] CPUCount:0 CPUPercent:0 IOMaximumIOps:0 IOMaximumBandwidth:0} Mounts:[{Type:volume Source:act-toolcache Target:/toolcache ReadOnly:false Consistency: BindOptions:<nil> VolumeOptions:<nil> TmpfsOptions:<nil> ClusterOptions:<nil>} {Type:volume Source:act-basic-check-bb36c003e32982766f5ff374ce2226fb9fba55ad3019f2386b4fb3b3c39afce9-env Target:/var/run/act ReadOnly:false Consistency: BindOptions:<nil> VolumeOptions:<nil> TmpfsOptions:<nil> ClusterOptions:<nil>} {Type:volume Source:act-basic-check-bb36c003e32982766f5ff374ce2226fb9fba55ad3019f2386b4fb3b3c39afce9 Target:/home/markusw/source/act/pkg/runner/testdata ReadOnly:false Consistency: BindOptions:<nil> VolumeOptions:<nil> TmpfsOptions:<nil> ClusterOptions:<nil>}] MaskedPaths:[] ReadonlyPaths:[] Init:<nil>}
Error: failed to create container: 'Error response from daemon: invalid mode: /var/run/docker.sock'

Additional information

No response

Originally created by @KnisterPeter on GitHub (Apr 24, 2023). Original GitHub issue: https://github.com/nektos/act/issues/1756 ### Bug report info ```plain text act version: 0.2.44-27-g2ea7891 GOOS: linux GOARCH: amd64 NumCPU: 12 Docker host: DOCKER_HOST environment variable is not set Sockets found: /var/run/docker.sock Config files: /home/markusw/.actrc: -P ubuntu-latest=node:16-buster-slim -P ubuntu-22.04=node:16-bullseye-slim -P ubuntu-20.04=node:16-buster-slim -P ubuntu-18.04=node:16-buster-slim Build info: Go version: go1.18.10 Module path: command-line-arguments Main version: Main path: Main checksum: Build settings: -compiler: gc -ldflags: -X main.version=0.2.44-27-g2ea7891 CGO_ENABLED: 1 CGO_CFLAGS: CGO_CPPFLAGS: CGO_CXXFLAGS: CGO_LDFLAGS: GOARCH: amd64 GOOS: linux GOAMD64: v1 Docker Engine: Engine version: 23.0.3 Engine runtime: runc Cgroup version: 2 Cgroup driver: cgroupfs Storage driver: overlay2 Registry URI: https://index.docker.io/v1/ OS: Debian GNU/Linux 11 (bullseye) OS type: linux OS version: 11 OS arch: x86_64 OS kernel: 5.15.90.1-microsoft-standard-WSL2 OS CPU: 12 OS memory: 15891 MB Security options: name=seccomp,profile=builtin name=cgroupns INFO ️📣 A newer version of 'act' is available - consider ugrading to 0.2.44. ``` ### Command used with act ```sh ./dist/local/act --verbose --rm --rebuild --pull=false -C ./pkg/runner/testdata/ -W ./basic/push.yml ``` ### Describe issue Since https://github.com/nektos/act/pull/1745 the binding of the docker socket fails (at least in some cases). We did saw this on a linux host as well as on a host running in WSL2 on windows (with docker installed inside WSL). ### Link to GitHub repository _No response_ ### Workflow content ```yml The basic push workflow from our testdata (see cli above). ``` ### Relevant log output ```sh markusw@LAPTOP-EH2EG37O:~/source/act (master)$ ./dist/local/act --verbose --rm --rebuild --pull=false -C ./pkg/runner/testdata/ -W ./basic/push.yml DEBU[0000] Loading environment from /home/markusw/source/act/pkg/runner/testdata/.env DEBU[0000] Loading action inputs from /home/markusw/source/act/pkg/runner/testdata/.input DEBU[0000] Loading secrets from /home/markusw/source/act/pkg/runner/testdata/.secrets DEBU[0000] Evaluated matrix inclusions: map[] DEBU[0000] Loading workflow '/home/markusw/source/act/pkg/runner/testdata/basic/push.yml' DEBU[0000] Reading workflow '/home/markusw/source/act/pkg/runner/testdata/basic/push.yml' DEBU[0000] Preparing plan with all jobs DEBU[0000] Using the only detected workflow event: push DEBU[0000] Planning jobs for event: push DEBU[0000] Final matrix after applying user inclusions '[map[]]' DEBU[0000] Loading revision from git directory DEBU[0000] Conditional GET for notices etag=2a9d7b27-ff27-4599-8ecc-d96460734d6b DEBU[0000] Found revision: 2ea78917879854128154124d3b7c8fa8d552e6e8 DEBU[0000] HEAD points to '2ea78917879854128154124d3b7c8fa8d552e6e8' DEBU[0000] using github ref: refs/heads/master DEBU[0000] Found revision: 2ea78917879854128154124d3b7c8fa8d552e6e8 [basic/check] [DEBUG] evaluating expression 'success()' [basic/check] [DEBUG] expression 'success()' evaluated to 'true' [basic/check] 🚀 Start image=node:16-buster-slim [basic/check] 🐳 docker pull image=node:16-buster-slim platform= username= forcePull=false [basic/check] [DEBUG] 🐳 docker pull node:16-buster-slim [basic/check] [DEBUG] Image exists? true [basic/check] 🐳 docker create image=node:16-buster-slim platform= entrypoint=["tail" "-f" "/dev/null"] cmd=[] [basic/check] [DEBUG] Common container.Config ==> &{Hostname: Domainname: User: AttachStdin:false AttachStdout:false AttachStderr:false ExposedPorts:map[] Tty:true OpenStdin:false StdinOnce:false Env:[RUNNER_TOOL_CACHE=/opt/hostedtoolcache RUNNER_OS=Linux RUNNER_ARCH=X64 RUNNER_TEMP=/tmp LANG=C.UTF-8] Cmd:[] Healthcheck:<nil> ArgsEscaped:false Image:node:16-buster-slim Volumes:map[] WorkingDir:/home/markusw/source/act/pkg/runner/testdata Entrypoint:[] NetworkDisabled:false MacAddress: OnBuild:[] Labels:map[] StopSignal: StopTimeout:<nil> Shell:[]} [basic/check] [DEBUG] Common container.HostConfig ==> &{Binds:[unix:///var/run/docker.sock:/var/run/docker.sock] ContainerIDFile: LogConfig:{Type: Config:map[]} NetworkMode:host PortBindings:map[] RestartPolicy:{Name: MaximumRetryCount:0} AutoRemove:false VolumeDriver: VolumesFrom:[] ConsoleSize:[0 0] CapAdd:[] CapDrop:[] CgroupnsMode: DNS:[] DNSOptions:[] DNSSearch:[] ExtraHosts:[] GroupAdd:[] IpcMode: Cgroup: Links:[] OomScoreAdj:0 PidMode: Privileged:false PublishAllPorts:false ReadonlyRootfs:false SecurityOpt:[] StorageOpt:map[] Tmpfs:map[] UTSMode: UsernsMode: ShmSize:0 Sysctls:map[] Runtime: Isolation: Resources:{CPUShares:0 Memory:0 NanoCPUs:0 CgroupParent: BlkioWeight:0 BlkioWeightDevice:[] BlkioDeviceReadBps:[] BlkioDeviceWriteBps:[] BlkioDeviceReadIOps:[] BlkioDeviceWriteIOps:[] CPUPeriod:0 CPUQuota:0 CPURealtimePeriod:0 CPURealtimeRuntime:0 CpusetCpus: CpusetMems: Devices:[] DeviceCgroupRules:[] DeviceRequests:[] KernelMemory:0 KernelMemoryTCP:0 MemoryReservation:0 MemorySwap:0 MemorySwappiness:<nil> OomKillDisable:<nil> PidsLimit:<nil> Ulimits:[] CPUCount:0 CPUPercent:0 IOMaximumIOps:0 IOMaximumBandwidth:0} Mounts:[{Type:volume Source:act-toolcache Target:/toolcache ReadOnly:false Consistency: BindOptions:<nil> VolumeOptions:<nil> TmpfsOptions:<nil> ClusterOptions:<nil>} {Type:volume Source:act-basic-check-bb36c003e32982766f5ff374ce2226fb9fba55ad3019f2386b4fb3b3c39afce9-env Target:/var/run/act ReadOnly:false Consistency: BindOptions:<nil> VolumeOptions:<nil> TmpfsOptions:<nil> ClusterOptions:<nil>} {Type:volume Source:act-basic-check-bb36c003e32982766f5ff374ce2226fb9fba55ad3019f2386b4fb3b3c39afce9 Target:/home/markusw/source/act/pkg/runner/testdata ReadOnly:false Consistency: BindOptions:<nil> VolumeOptions:<nil> TmpfsOptions:<nil> ClusterOptions:<nil>}] MaskedPaths:[] ReadonlyPaths:[] Init:<nil>} Error: failed to create container: 'Error response from daemon: invalid mode: /var/run/docker.sock' ``` ### Additional information _No response_
kerem 2026-03-01 21:46:57 +03:00
  • closed this issue
  • added the
    kind/bug
    label
Author
Owner

@ChristopherHX commented on GitHub (Apr 24, 2023):

Binds:[unix:///var/run/docker.sock:/var/run/docker.sock]

Hmm, this is the bug... docker -v unix:///var/run/docker.sock:/var/run/docker.sock is invalid mount syntax.

<!-- gh-comment-id:1519633982 --> @ChristopherHX commented on GitHub (Apr 24, 2023): > Binds:[unix:///var/run/docker.sock:/var/run/docker.sock] Hmm, this is the bug... `docker -v unix:///var/run/docker.sock:/var/run/docker.sock` is invalid mount syntax.
Author
Owner

@ChristopherHX commented on GitHub (Apr 24, 2023):

More regressions are confirmed on windows
I noticed npipe://\\.\pipe\docker_engine as DOCKER_HOST make windows docker behave weird.

  • no step output
  • exit code not received in act
<!-- gh-comment-id:1520658341 --> @ChristopherHX commented on GitHub (Apr 24, 2023): More regressions are confirmed on windows I noticed `npipe://\\.\pipe\docker_engine` as DOCKER_HOST make windows docker behave weird. - no step output - exit code not received in act
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#859
No description provided.