[GH-ISSUE #2508] container Jobs Fail #1160

Open
opened 2026-03-01 21:49:23 +03:00 by kerem · 1 comment
Owner

Originally created by @afrazkhan on GitHub (Oct 29, 2024).
Original GitHub issue: https://github.com/nektos/act/issues/2508

Bug report info

act version:            0.2.68
GOOS:                   darwin
GOARCH:                 amd64
NumCPU:                 8
Docker host:            unix:///Users/<me>/.docker/run/docker.sock
Sockets found:
        /var/run/docker.sock
        $HOME/.docker/run/docker.sock
Config files:
        /Users/<me>/Library/Application Support/act/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
        /Users/<me>/.actrc:
                --container-daemon-socket -

Build info:
        Go version:            go1.23.1
        Module path:           command-line-arguments
        Main version:
        Main path:
        Main checksum:
        Build settings:
                -buildmode:           exe
                -compiler:            gc
                -ldflags:             -X main.version=0.2.68
                DefaultGODEBUG:       asynctimerchan=1,gotypesalias=0,httplaxcontentlength=1,httpmuxgo121=1,httpservecontentkeepheaders=1,tls10server=1,tls3des=1,tlskyber=0,tlsrsakex=1,tlsunsafeekm=1,winreadlinkvolume=0,winsymlink=0,x509keypairleaf=0,x509negativeserial=1
                CGO_ENABLED:          1
                CGO_CFLAGS:
                CGO_CPPFLAGS:
                CGO_CXXFLAGS:
                CGO_LDFLAGS:
                GOARCH:               amd64
                GOOS:                 darwin
                GOAMD64:              v1
Docker Engine:
        Engine version:        27.2.0
        Engine runtime:        runc
        Cgroup version:        2
        Cgroup driver:         cgroupfs
        Storage driver:        overlayfs
        Registry URI:          https://index.docker.io/v1/
        OS:                    Docker Desktop
        OS type:               linux
        OS version:
        OS arch:               x86_64
        OS kernel:             6.10.4-linuxkit
        OS CPU:                8
        OS memory:             7839 MB
        Security options:
                name=seccomp,profile=unconfined
                name=cgroupns

Command used with act

act

Describe issue

Initially, I got the error:

Error: failed to start container: Error response from daemon: error while creating mount source path '/host_mnt/Users/<me>/.docker/run/docker.sock': mkdir /host_mnt/Users/<me>/.docker/run/docker.sock: operation not supported

After some searching around, I started running act with --container-daemon-socket -, which got past this problem. Unfortunately, it sees to have caused another problem which is that jobs using container have all of their steps run in the specified container image.

For example in this workflow:

jobs:
  artefacts:
    name: Upload artefacts
    runs-on: ubuntu-latest
    container: ghcr.io/guidionops/terraform-cloud-deployer:0.1.2
    steps:
      - name: Checkout code
        uses: actions/checkout@v4
      - name: Zip up the Lambdas
        run: |
          mkdir -p dist
          cp -r lambdas/* dist/
          pip install -r dist/requirements.txt -t dist/
          cd dist
          zip -r ../lambdas.zip *
      - name: Archive artifacts
        uses: actions/upload-artifact@v4
        with:
          name: build-and-terraform
          path: |
            lambdas.zip
            *.tf
          retention-days: 2

the steps "Checkout code" and "Zip up the Lambdas" run fine, but the "Archive artifacts" step fails because node is unavailable in the ghcr.io/guidionops/terraform-cloud-deployer:0.1.2 image. All of these steps work fine in Github Actions, since the actions/upload-artifact@v4 action does not try to run in the container above.

No response

Workflow content

jobs:
  artefacts:
    name: Upload artefacts
    runs-on: ubuntu-latest
    container: ghcr.io/guidionops/terraform-cloud-deployer:0.1.2
    steps:
      - name: Checkout code
        uses: actions/checkout@v4
      - name: Zip up the Lambdas
        run: |
          mkdir -p dist
          cp -r lambdas/* dist/
          pip install -r dist/requirements.txt -t dist/
          cd dist
          zip -r ../lambdas.zip *
      - name: Archive artifacts
        uses: actions/upload-artifact@v4
        with:
          name: build-and-terraform
          path: |
            lambdas.zip
            *.tf
          retention-days: 2

Relevant log output

# Without --container-daemon-socket -:

Error: failed to start container: Error response from daemon: error while creating mount source path '/host_mnt/Users/<me>/.docker/run/docker.sock': mkdir /host_mnt/Users/<me>/.docker/run/docker.sock: operation not supported

# With --container-daemon-socket -:

[Deploy Gatr Lambdas/Upload artefacts]   🐳  docker exec cmd=[node /var/run/act/actions/actions-upload-artifact@v4/dist/upload/index.js] user= workdir=
| OCI runtime exec failed: exec failed: unable to start container process: exec: "node": executable file not found in $PATH: unknown
[Deploy Gatr Lambdas/Upload artefacts]   ❌  Failure - Main Archive artifacts
[Deploy Gatr Lambdas/Upload artefacts] exitcode '126': failure

Additional information

No response

Originally created by @afrazkhan on GitHub (Oct 29, 2024). Original GitHub issue: https://github.com/nektos/act/issues/2508 ### Bug report info ```plain text act version: 0.2.68 GOOS: darwin GOARCH: amd64 NumCPU: 8 Docker host: unix:///Users/<me>/.docker/run/docker.sock Sockets found: /var/run/docker.sock $HOME/.docker/run/docker.sock Config files: /Users/<me>/Library/Application Support/act/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 /Users/<me>/.actrc: --container-daemon-socket - Build info: Go version: go1.23.1 Module path: command-line-arguments Main version: Main path: Main checksum: Build settings: -buildmode: exe -compiler: gc -ldflags: -X main.version=0.2.68 DefaultGODEBUG: asynctimerchan=1,gotypesalias=0,httplaxcontentlength=1,httpmuxgo121=1,httpservecontentkeepheaders=1,tls10server=1,tls3des=1,tlskyber=0,tlsrsakex=1,tlsunsafeekm=1,winreadlinkvolume=0,winsymlink=0,x509keypairleaf=0,x509negativeserial=1 CGO_ENABLED: 1 CGO_CFLAGS: CGO_CPPFLAGS: CGO_CXXFLAGS: CGO_LDFLAGS: GOARCH: amd64 GOOS: darwin GOAMD64: v1 Docker Engine: Engine version: 27.2.0 Engine runtime: runc Cgroup version: 2 Cgroup driver: cgroupfs Storage driver: overlayfs Registry URI: https://index.docker.io/v1/ OS: Docker Desktop OS type: linux OS version: OS arch: x86_64 OS kernel: 6.10.4-linuxkit OS CPU: 8 OS memory: 7839 MB Security options: name=seccomp,profile=unconfined name=cgroupns ``` ### Command used with act ```sh act ``` ### Describe issue Initially, I got the error: ``` Error: failed to start container: Error response from daemon: error while creating mount source path '/host_mnt/Users/<me>/.docker/run/docker.sock': mkdir /host_mnt/Users/<me>/.docker/run/docker.sock: operation not supported ``` After some searching around, I started running act with `--container-daemon-socket -`, which got past this problem. Unfortunately, it sees to have caused another problem which is that jobs using `container` have _all_ of their steps run in the specified container image. For example in this workflow: ``` jobs: artefacts: name: Upload artefacts runs-on: ubuntu-latest container: ghcr.io/guidionops/terraform-cloud-deployer:0.1.2 steps: - name: Checkout code uses: actions/checkout@v4 - name: Zip up the Lambdas run: | mkdir -p dist cp -r lambdas/* dist/ pip install -r dist/requirements.txt -t dist/ cd dist zip -r ../lambdas.zip * - name: Archive artifacts uses: actions/upload-artifact@v4 with: name: build-and-terraform path: | lambdas.zip *.tf retention-days: 2 ``` the steps "Checkout code" and "Zip up the Lambdas" run fine, but the "Archive artifacts" step fails because `node` is unavailable in the `ghcr.io/guidionops/terraform-cloud-deployer:0.1.2` image. All of these steps work fine in Github Actions, since the `actions/upload-artifact@v4` action does not try to run in the container above. ### Link to GitHub repository _No response_ ### Workflow content ```yml jobs: artefacts: name: Upload artefacts runs-on: ubuntu-latest container: ghcr.io/guidionops/terraform-cloud-deployer:0.1.2 steps: - name: Checkout code uses: actions/checkout@v4 - name: Zip up the Lambdas run: | mkdir -p dist cp -r lambdas/* dist/ pip install -r dist/requirements.txt -t dist/ cd dist zip -r ../lambdas.zip * - name: Archive artifacts uses: actions/upload-artifact@v4 with: name: build-and-terraform path: | lambdas.zip *.tf retention-days: 2 ``` ### Relevant log output ```sh # Without --container-daemon-socket -: Error: failed to start container: Error response from daemon: error while creating mount source path '/host_mnt/Users/<me>/.docker/run/docker.sock': mkdir /host_mnt/Users/<me>/.docker/run/docker.sock: operation not supported # With --container-daemon-socket -: [Deploy Gatr Lambdas/Upload artefacts] 🐳 docker exec cmd=[node /var/run/act/actions/actions-upload-artifact@v4/dist/upload/index.js] user= workdir= | OCI runtime exec failed: exec failed: unable to start container process: exec: "node": executable file not found in $PATH: unknown [Deploy Gatr Lambdas/Upload artefacts] ❌ Failure - Main Archive artifacts [Deploy Gatr Lambdas/Upload artefacts] exitcode '126': failure ``` ### Additional information _No response_
Author
Owner

@red-avalanche commented on GitHub (Feb 27, 2025):

Duplicate of https://github.com/nektos/act/issues/973

<!-- gh-comment-id:2689188580 --> @red-avalanche commented on GitHub (Feb 27, 2025): Duplicate of https://github.com/nektos/act/issues/973
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#1160
No description provided.