[GH-ISSUE #1280] Error: Unable to locate executable file: docker. #696

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

Originally created by @thibaultcha on GitHub (Jul 26, 2022).
Original GitHub issue: https://github.com/nektos/act/issues/1280

Bug report info

act version:            0.2.29.r11.g17dd54d
GOOS:                   linux
GOARCH:                 amd64
NumCPU:                 16
Docker host:            DOCKER_HOST environment variable is unset/empty.
Sockets found:
        /var/run/docker.sock
Config files:           
        /home/chasum/.actrc:
                -P ubuntu-latest=catthehacker/ubuntu:act-latest
                -P ubuntu-20.04=catthehacker/ubuntu:act-20.04
                -P ubuntu-18.04=catthehacker/ubuntu:act-18.04
                ubuntu-16.04=catthehacker/ubuntu:act-16.04
        .actrc:
                -P ubuntu-latest=wasmx-build-ubuntu
Build info:
        Go version:            go1.18.4
        Module path:           command-line-arguments
        Main version:          
        Main path:             
        Main checksum:         
        Build settings:
                -compiler:            gc
                -ldflags:             -X main.version=0.2.29.r11.g17dd54d
                CGO_ENABLED:          1
                CGO_CFLAGS:           -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt
                CGO_CPPFLAGS:         -D_FORTIFY_SOURCE=2
                CGO_CXXFLAGS:         -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt
                CGO_LDFLAGS:          -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now
                GOARCH:               amd64
                GOOS:                 linux
                GOAMD64:              v1
Docker Engine:
        Engine version:        20.10.17
        Engine runtime:        runc
        Cgroup version:        2
        Cgroup driver:         systemd
        Storage driver:        btrfs
        Registry URI:          https://index.docker.io/v1/
        OS:                    Manjaro Linux
        OS type:               linux
        OS version:            
        OS arch:               x86_64
        OS kernel:             5.15.55-1-MANJARO
        OS CPU:                16
        OS memory:             32034 MB
        Security options:
                name=apparmor
                name=seccomp,profile=default
                name=cgroupns

Command used with act

act -W .github/workflows/release.yml -P ubuntu-latest=wasmx-build-ubuntu -s GITHUB_TOKEN=... -s TOKEN_GITHUB=...

Describe issue

Attempting to run our GitHub release workflow locally via Act, but it can't seem to be able to execute the docker login step (see Error: Unable to locate executable file: docker. in output logs, with either of GITHUB_TOKEN or TOKEN_GITHUB specified). I can't seem to have a clue what the problem could be.

No response

Workflow content

name: Release

on:
  schedule:
    - cron: '0 6 * * mon' # 6am UTC, 11pm PST
  workflow_dispatch:
    inputs:
      release_name:
        description: 'Release name (e.g. v0.1.0)'
        required: true
  push:
    branches: '_none_'

defaults:
  run:
    shell: bash

env:
  CC: clang
  NGX_VER: 1.23.0
  WASMTIME_VER: 0.38.1
  RETENTION_DAYS: 2

jobs:
  build-images:
    name: Build Docker binary build images
    runs-on: ubuntu-latest
    outputs:
      release_name: ${{ steps.assign-name.outputs.release_name }}
    steps:
      - uses: actions/checkout@v2
      - name: Login to GitHub Container Registry
        uses: docker/login-action@v1
        with:
          registry: ghcr.io
          username: ${{ github.repository_owner }}
          password: ${{ secrets.TOKEN_GITHUB }}
      - name: Set up Docker Buildx
        uses: docker/setup-buildx-action@v1
      - name: "Ubuntu 18.04 build image"
        uses: docker/build-push-action@v2
        with:
          file: ./assets/release/Dockerfiles/Dockerfile.amd64.ubuntu-18.04
          tags: ghcr.io/kong/wasmx-build-ubuntu:18.04
          push: true
      - id: assign-name
        run: |
          if [ "${{ github.event_name }}" = schedule ]; then
            echo "::set-output name=release_name::nightly-$(date -u +%Y%m%d)"
          else
            echo "::set-output name=release_name::${{ github.event.inputs.release_name }}"
          fi

  build-ubuntu-bionic:
    name: "Build Ubuntu 18.04 (bionic) binary"
    needs: build-images
    runs-on: ubuntu-latest
    container:
      image: ghcr.io/kong/wasmx-build-ubuntu:18.04
      credentials:
        username: ${{ github.repository_owner }}
        password: ${{ secrets.TOKEN_GITHUB }}
    steps:
      - uses: actions/checkout@v2
      - name: Build binary
        run: ./util/release.sh ${{ needs.build-images.outputs.release_name }} --bin
      - name: Upload binary
        uses: actions/upload-artifact@v2
        with:
          name: release-artifacts
          path: dist
          retention-days: ${{ env.RETENTION_DAYS }}

  upload-artifacts:
    name: Upload release artifacts
    needs: [build-images, build-ubuntu-bionic]
    runs-on: ubuntu-latest
    steps:
      - name: Retrieve sibling release artifacts
        uses: actions/download-artifact@v2
        with:
          name: release-artifacts
      - uses: marvinpinto/action-automatic-releases@latest
        if: ${{ github.event_name == 'schedule' }}
        with:
          repo_token: ${{ secrets.GITHUB_TOKEN }}
          automatic_release_tag: nightly
          prerelease: true
          title: ${{ needs.build-images.outputs.release_name }}
          files: |
            *.tar.gz
      - uses: marvinpinto/action-automatic-releases@latest
        if: ${{ github.event_name != 'schedule' }}
        with:
          repo_token: ${{ secrets.GITHUB_TOKEN }}
          automatic_release_tag: release-${{ needs.build-images.outputs.release_name }}
          prerelease: true
          title: ${{ needs.build-images.outputs.release_name }}
          files: |
            *.tar.gz

Relevant log output

[Release/Build Docker binary build images] [DEBUG] using github ref: refs/heads/chore/act-release
[Release/Build Docker binary build images] [DEBUG] Found revision: 3bfbb4d7185264ad72e6a1fd4912547bbc122f49
[Release/Build Docker binary build images] [DEBUG] expression '${{ secrets.TOKEN_GITHUB }}' rewritten to 'format('{0}', secrets.TOKEN_GITHUB)'
[Release/Build Docker binary build images] [DEBUG] evaluating expression 'format('{0}', secrets.TOKEN_GITHUB)'
[Release/Build Docker binary build images] [DEBUG] expression 'format('{0}', secrets.TOKEN_GITHUB)' evaluated to '%!t(string=)'
[Release/Build Docker binary build images] [DEBUG] expression '${{ github.repository_owner }}' rewritten to 'format('{0}', github.repository_owner)'
[Release/Build Docker binary build images] [DEBUG] evaluating expression 'format('{0}', github.repository_owner)'
[Release/Build Docker binary build images] [DEBUG] expression 'format('{0}', github.repository_owner)' evaluated to '%!t(string=Kong)'
[Release/Build Docker binary build images] [DEBUG] setupEnv => map[ACT:true CARGO_HOME:/usr/local/cargo CC:clang CI:true GITHUB_ACTION:post-1 GITHUB_ACTIONS:true GITHUB_ACTION_PATH: GITHUB_ACTION_REF: GITHUB_ACTION_REPOSITORY: GITHUB_ACTOR:nektos/act GITHUB_API_URL:https://api.github.com GITHUB_BASE_REF: GITHUB_ENV:/var/run/act/workflow/envs.txt GITHUB_EVENT_NAME:push GITHUB_EVENT_PATH:/var/run/act/workflow/event.json GITHUB_GRAPHQL_URL:https://api.github.com/graphql GITHUB_HEAD_REF: GITHUB_JOB:Build Docker binary build images GITHUB_PATH:/var/run/act/workflow/paths.txt GITHUB_REF:refs/heads/chore/act-release GITHUB_REF_NAME:chore/act-release GITHUB_REF_TYPE:branch GITHUB_REPOSITORY:Kong/ngx_wasm_module GITHUB_REPOSITORY_OWNER:Kong GITHUB_RETENTION_DAYS:0 GITHUB_RUN_ID:1 GITHUB_RUN_NUMBER:1 GITHUB_SERVER_URL:https://github.com GITHUB_SHA:3bfbb4d7185264ad72e6a1fd4912547bbc122f49 GITHUB_TOKEN:*** GITHUB_WORKFLOW:Release GITHUB_WORKSPACE:/home/chasum/code/ngx_wasm_module INPUT_ECR:auto INPUT_LOGOUT:true INPUT_PASSWORD: INPUT_REGISTRY:ghcr.io INPUT_USERNAME:Kong ImageOS:ubuntu20 NGX_VER:1.23.0 PATH:"/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin":/usr/local/cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin RETENTION_DAYS:2 RUNNER_PERFLOG:/dev/null RUNNER_TRACKING_ID: RUSTUP_HOME:/usr/local/rustup V8_VER:10.5.18 WASMER_VER:2.3.0 WASMTIME_VER:0.38.1]
[Release/Build Docker binary build images] [DEBUG] Loading slug from git directory '/home/chasum/code/ngx_wasm_module/.git'
[Release/Build Docker binary build images] [DEBUG] Loading revision from git directory '/home/chasum/code/ngx_wasm_module/.git'
[Release/Build Docker binary build images] [DEBUG] Found revision: 3bfbb4d7185264ad72e6a1fd4912547bbc122f49
[Release/Build Docker binary build images] [DEBUG] HEAD points to '3bfbb4d7185264ad72e6a1fd4912547bbc122f49'
[Release/Build Docker binary build images] [DEBUG] using github ref: refs/heads/chore/act-release
[Release/Build Docker binary build images] [DEBUG] Found revision: 3bfbb4d7185264ad72e6a1fd4912547bbc122f49
[Release/Build Docker binary build images] [DEBUG] evaluating expression 'always()'
[Release/Build Docker binary build images] [DEBUG] expression 'always()' evaluated to 'true'
[Release/Build Docker binary build images] ⭐ Run Post Login to GitHub Container Registry
[Release/Build Docker binary build images] [DEBUG] run post step for 'Login to GitHub Container Registry'
[Release/Build Docker binary build images] [DEBUG] executing remote job container: [node /var/run/act/actions/docker-login-action@v1/dist/index.js]
[Release/Build Docker binary build images]   🐳  docker exec cmd=[node /var/run/act/actions/docker-login-action@v1/dist/index.js] user= workdir=
[Release/Build Docker binary build images] [DEBUG] Exec command '[node /var/run/act/actions/docker-login-action@v1/dist/index.js]'
[Release/Build Docker binary build images] [DEBUG] Working directory '/home/chasum/code/ngx_wasm_module'
| (node:31) UnhandledPromiseRejectionWarning: Error: Unable to locate executable file: docker. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.
|     at Object.<anonymous> (/run/act/actions/docker-login-action@v1/dist/index.js:2809:27)
|     at Generator.next (<anonymous>)
|     at fulfilled (/run/act/actions/docker-login-action@v1/dist/index.js:2620:58)
| (node:31) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
| (node:31) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
[Release/Build Docker binary build images]   ✅  Success - Post Login to GitHub Container Registry
[Release/Build Docker binary build images] [DEBUG] skipping post step for 'actions/checkout@v2': no action model available
[Release/Build Docker binary build images] 🏁  Job failed

Additional information

No response

Originally created by @thibaultcha on GitHub (Jul 26, 2022). Original GitHub issue: https://github.com/nektos/act/issues/1280 ### Bug report info ```plain text act version: 0.2.29.r11.g17dd54d GOOS: linux GOARCH: amd64 NumCPU: 16 Docker host: DOCKER_HOST environment variable is unset/empty. Sockets found: /var/run/docker.sock Config files: /home/chasum/.actrc: -P ubuntu-latest=catthehacker/ubuntu:act-latest -P ubuntu-20.04=catthehacker/ubuntu:act-20.04 -P ubuntu-18.04=catthehacker/ubuntu:act-18.04 ubuntu-16.04=catthehacker/ubuntu:act-16.04 .actrc: -P ubuntu-latest=wasmx-build-ubuntu Build info: Go version: go1.18.4 Module path: command-line-arguments Main version: Main path: Main checksum: Build settings: -compiler: gc -ldflags: -X main.version=0.2.29.r11.g17dd54d CGO_ENABLED: 1 CGO_CFLAGS: -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt CGO_CPPFLAGS: -D_FORTIFY_SOURCE=2 CGO_CXXFLAGS: -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt CGO_LDFLAGS: -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now GOARCH: amd64 GOOS: linux GOAMD64: v1 Docker Engine: Engine version: 20.10.17 Engine runtime: runc Cgroup version: 2 Cgroup driver: systemd Storage driver: btrfs Registry URI: https://index.docker.io/v1/ OS: Manjaro Linux OS type: linux OS version: OS arch: x86_64 OS kernel: 5.15.55-1-MANJARO OS CPU: 16 OS memory: 32034 MB Security options: name=apparmor name=seccomp,profile=default name=cgroupns ``` ### Command used with act ```sh act -W .github/workflows/release.yml -P ubuntu-latest=wasmx-build-ubuntu -s GITHUB_TOKEN=... -s TOKEN_GITHUB=... ``` ### Describe issue Attempting to run our GitHub release workflow locally via Act, but it can't seem to be able to execute the `docker login` step (see `Error: Unable to locate executable file: docker.` in output logs, with either of `GITHUB_TOKEN` or `TOKEN_GITHUB` specified). I can't seem to have a clue what the problem could be. ### Link to GitHub repository _No response_ ### Workflow content ```yml name: Release on: schedule: - cron: '0 6 * * mon' # 6am UTC, 11pm PST workflow_dispatch: inputs: release_name: description: 'Release name (e.g. v0.1.0)' required: true push: branches: '_none_' defaults: run: shell: bash env: CC: clang NGX_VER: 1.23.0 WASMTIME_VER: 0.38.1 RETENTION_DAYS: 2 jobs: build-images: name: Build Docker binary build images runs-on: ubuntu-latest outputs: release_name: ${{ steps.assign-name.outputs.release_name }} steps: - uses: actions/checkout@v2 - name: Login to GitHub Container Registry uses: docker/login-action@v1 with: registry: ghcr.io username: ${{ github.repository_owner }} password: ${{ secrets.TOKEN_GITHUB }} - name: Set up Docker Buildx uses: docker/setup-buildx-action@v1 - name: "Ubuntu 18.04 build image" uses: docker/build-push-action@v2 with: file: ./assets/release/Dockerfiles/Dockerfile.amd64.ubuntu-18.04 tags: ghcr.io/kong/wasmx-build-ubuntu:18.04 push: true - id: assign-name run: | if [ "${{ github.event_name }}" = schedule ]; then echo "::set-output name=release_name::nightly-$(date -u +%Y%m%d)" else echo "::set-output name=release_name::${{ github.event.inputs.release_name }}" fi build-ubuntu-bionic: name: "Build Ubuntu 18.04 (bionic) binary" needs: build-images runs-on: ubuntu-latest container: image: ghcr.io/kong/wasmx-build-ubuntu:18.04 credentials: username: ${{ github.repository_owner }} password: ${{ secrets.TOKEN_GITHUB }} steps: - uses: actions/checkout@v2 - name: Build binary run: ./util/release.sh ${{ needs.build-images.outputs.release_name }} --bin - name: Upload binary uses: actions/upload-artifact@v2 with: name: release-artifacts path: dist retention-days: ${{ env.RETENTION_DAYS }} upload-artifacts: name: Upload release artifacts needs: [build-images, build-ubuntu-bionic] runs-on: ubuntu-latest steps: - name: Retrieve sibling release artifacts uses: actions/download-artifact@v2 with: name: release-artifacts - uses: marvinpinto/action-automatic-releases@latest if: ${{ github.event_name == 'schedule' }} with: repo_token: ${{ secrets.GITHUB_TOKEN }} automatic_release_tag: nightly prerelease: true title: ${{ needs.build-images.outputs.release_name }} files: | *.tar.gz - uses: marvinpinto/action-automatic-releases@latest if: ${{ github.event_name != 'schedule' }} with: repo_token: ${{ secrets.GITHUB_TOKEN }} automatic_release_tag: release-${{ needs.build-images.outputs.release_name }} prerelease: true title: ${{ needs.build-images.outputs.release_name }} files: | *.tar.gz ``` ### Relevant log output ```sh [Release/Build Docker binary build images] [DEBUG] using github ref: refs/heads/chore/act-release [Release/Build Docker binary build images] [DEBUG] Found revision: 3bfbb4d7185264ad72e6a1fd4912547bbc122f49 [Release/Build Docker binary build images] [DEBUG] expression '${{ secrets.TOKEN_GITHUB }}' rewritten to 'format('{0}', secrets.TOKEN_GITHUB)' [Release/Build Docker binary build images] [DEBUG] evaluating expression 'format('{0}', secrets.TOKEN_GITHUB)' [Release/Build Docker binary build images] [DEBUG] expression 'format('{0}', secrets.TOKEN_GITHUB)' evaluated to '%!t(string=)' [Release/Build Docker binary build images] [DEBUG] expression '${{ github.repository_owner }}' rewritten to 'format('{0}', github.repository_owner)' [Release/Build Docker binary build images] [DEBUG] evaluating expression 'format('{0}', github.repository_owner)' [Release/Build Docker binary build images] [DEBUG] expression 'format('{0}', github.repository_owner)' evaluated to '%!t(string=Kong)' [Release/Build Docker binary build images] [DEBUG] setupEnv => map[ACT:true CARGO_HOME:/usr/local/cargo CC:clang CI:true GITHUB_ACTION:post-1 GITHUB_ACTIONS:true GITHUB_ACTION_PATH: GITHUB_ACTION_REF: GITHUB_ACTION_REPOSITORY: GITHUB_ACTOR:nektos/act GITHUB_API_URL:https://api.github.com GITHUB_BASE_REF: GITHUB_ENV:/var/run/act/workflow/envs.txt GITHUB_EVENT_NAME:push GITHUB_EVENT_PATH:/var/run/act/workflow/event.json GITHUB_GRAPHQL_URL:https://api.github.com/graphql GITHUB_HEAD_REF: GITHUB_JOB:Build Docker binary build images GITHUB_PATH:/var/run/act/workflow/paths.txt GITHUB_REF:refs/heads/chore/act-release GITHUB_REF_NAME:chore/act-release GITHUB_REF_TYPE:branch GITHUB_REPOSITORY:Kong/ngx_wasm_module GITHUB_REPOSITORY_OWNER:Kong GITHUB_RETENTION_DAYS:0 GITHUB_RUN_ID:1 GITHUB_RUN_NUMBER:1 GITHUB_SERVER_URL:https://github.com GITHUB_SHA:3bfbb4d7185264ad72e6a1fd4912547bbc122f49 GITHUB_TOKEN:*** GITHUB_WORKFLOW:Release GITHUB_WORKSPACE:/home/chasum/code/ngx_wasm_module INPUT_ECR:auto INPUT_LOGOUT:true INPUT_PASSWORD: INPUT_REGISTRY:ghcr.io INPUT_USERNAME:Kong ImageOS:ubuntu20 NGX_VER:1.23.0 PATH:"/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin":/usr/local/cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin RETENTION_DAYS:2 RUNNER_PERFLOG:/dev/null RUNNER_TRACKING_ID: RUSTUP_HOME:/usr/local/rustup V8_VER:10.5.18 WASMER_VER:2.3.0 WASMTIME_VER:0.38.1] [Release/Build Docker binary build images] [DEBUG] Loading slug from git directory '/home/chasum/code/ngx_wasm_module/.git' [Release/Build Docker binary build images] [DEBUG] Loading revision from git directory '/home/chasum/code/ngx_wasm_module/.git' [Release/Build Docker binary build images] [DEBUG] Found revision: 3bfbb4d7185264ad72e6a1fd4912547bbc122f49 [Release/Build Docker binary build images] [DEBUG] HEAD points to '3bfbb4d7185264ad72e6a1fd4912547bbc122f49' [Release/Build Docker binary build images] [DEBUG] using github ref: refs/heads/chore/act-release [Release/Build Docker binary build images] [DEBUG] Found revision: 3bfbb4d7185264ad72e6a1fd4912547bbc122f49 [Release/Build Docker binary build images] [DEBUG] evaluating expression 'always()' [Release/Build Docker binary build images] [DEBUG] expression 'always()' evaluated to 'true' [Release/Build Docker binary build images] ⭐ Run Post Login to GitHub Container Registry [Release/Build Docker binary build images] [DEBUG] run post step for 'Login to GitHub Container Registry' [Release/Build Docker binary build images] [DEBUG] executing remote job container: [node /var/run/act/actions/docker-login-action@v1/dist/index.js] [Release/Build Docker binary build images] 🐳 docker exec cmd=[node /var/run/act/actions/docker-login-action@v1/dist/index.js] user= workdir= [Release/Build Docker binary build images] [DEBUG] Exec command '[node /var/run/act/actions/docker-login-action@v1/dist/index.js]' [Release/Build Docker binary build images] [DEBUG] Working directory '/home/chasum/code/ngx_wasm_module' | (node:31) UnhandledPromiseRejectionWarning: Error: Unable to locate executable file: docker. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable. | at Object.<anonymous> (/run/act/actions/docker-login-action@v1/dist/index.js:2809:27) | at Generator.next (<anonymous>) | at fulfilled (/run/act/actions/docker-login-action@v1/dist/index.js:2620:58) | (node:31) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1) | (node:31) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code. [Release/Build Docker binary build images] ✅ Success - Post Login to GitHub Container Registry [Release/Build Docker binary build images] [DEBUG] skipping post step for 'actions/checkout@v2': no action model available [Release/Build Docker binary build images] 🏁 Job failed ``` ### Additional information _No response_
kerem 2026-03-01 21:45:35 +03:00
  • closed this issue
  • added the
    kind/bug
    label
Author
Owner

@s33dunda commented on GitHub (Sep 13, 2022):

Hello @thibaultcha How did you fix this? I'm having the same issue with docker/setup-qemu-action and docker/login-action

<!-- gh-comment-id:1245934415 --> @s33dunda commented on GitHub (Sep 13, 2022): Hello @thibaultcha How did you fix this? I'm having the same issue with docker/setup-qemu-action and docker/login-action
Author
Owner

@s33dunda commented on GitHub (Sep 13, 2022):

fixed it using act -P ubuntu-latest=catthehacker/ubuntu:act-latest

<!-- gh-comment-id:1245965252 --> @s33dunda commented on GitHub (Sep 13, 2022): fixed it using `act -P ubuntu-latest=catthehacker/ubuntu:act-latest`
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#696
No description provided.