When trying to use basic implementation of super-linter, action fails due to missing command. I tried various workarounds and I did try the solution mentioned in the pinned issue.
[lint/LINT TESTING] 🐳 docker pull github/super-linter:v2.2.0
DEBU[0002] Image exists? true
[lint/LINT TESTING] 🐳 docker create image=github/super-linter:v2.2.0 entrypoint=[] cmd=[]
DEBU[0002] Error response from daemon: No command specified
To repoduce
#lint.yml
name: superlinter
on: [push]
jobs:
lint:
name: Lint Code Base
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v2
- name: Lint Code Base
uses: docker://github/super-linter:v2.2.0
env:
VALIDATE_ALL_CODEBASE: true
act -j lint -P ubuntu-latest=nektos/act-environments-ubuntu:18.04
Results in
act -j lint -P ubuntu-latest=nektos/act-environments-ubuntu:18.04
[lint/LINT TESTING] 🚀 Start image=nektos/act-environments-ubuntu:18.04
[lint/LINT TESTING] 🐳 docker run image=nektos/act-environments-ubuntu:18.04 entrypoint=["/usr/bin/tail" "-f" "/dev/null"] cmd=[]
[lint/LINT TESTING] 🐳 docker cp src=***. dst=/github/workspace
[lint/LINT TESTING] ⭐ Run Checkout Code
[lint/LINT TESTING] ✅ Success - Checkout Code
[lint/LINT TESTING] ⭐ Run Lint Code Base
[lint/LINT TESTING] ❌ Failure - Lint Code Base
Error: Error response from daemon: No command specified
Stack Trace
[lint/LINT TESTING] ⭐ Run Lint Code Base
DEBU[0002] Loading slug from git directory '***'
DEBU[0002] Found revision: 44906d929be63b6dee1da1787f8e4efa237f89cf
DEBU[0002] Loading revision from git directory '***'
DEBU[0002] Found revision: 44906d929be63b6dee1da1787f8e4efa237f89cf
DEBU[0002] HEAD points to '44906d929be63b6dee1da1787f8e4efa237f89cf'
DEBU[0002] HEAD matches refs/heads/master
DEBU[0002] using github ref: refs/heads/master
DEBU[0002] context env => map[]
DEBU[0002] context env => map[GITHUB_ACTION:1 GITHUB_ACTIONS:true GITHUB_ACTOR:nektos/act GITHUB_EVENT_NAME:push GITHUB_EVENT_PATH:/github/workflow/event.json GITHUB_REF:refs/heads/master GITHUB_REPOSITORY:***/*** GITHUB_RUN_ID:1 GITHUB_RUN_NUMBER:1 GITHUB_SHA:44906d929be63b6dee1da1787f8e4efa237f89cf GITHUB_TOKEN: GITHUB_WORKFLOW:lint GITHUB_WORKSPACE:/github/workspace HOME:/github/home VALIDATE_ALL_CODEBASE:true]
[lint/LINT TESTING] 🐳 docker pull github/super-linter:v2.2.0
DEBU[0002] Image exists? true
[lint/LINT TESTING] 🐳 docker create image=github/super-linter:v2.2.0 entrypoint=[] cmd=[]
DEBU[0002] Error response from daemon: No command specified
github.com/nektos/act/pkg/container.(*containerReference).create.func1
/home/runner/work/act/act/pkg/container/docker_run.go:266
github.com/nektos/act/pkg/common.Executor.Then.func1
/home/runner/work/act/act/pkg/common/executor.go:146
github.com/nektos/act/pkg/common.Executor.IfNot.func1
/home/runner/work/act/act/pkg/common/executor.go:164
github.com/nektos/act/pkg/common.Executor.Then.func1
/home/runner/work/act/act/pkg/common/executor.go:146
github.com/nektos/act/pkg/common.Executor.Then.func1
/home/runner/work/act/act/pkg/common/executor.go:146
github.com/nektos/act/pkg/common.Executor.Then.func1
/home/runner/work/act/act/pkg/common/executor.go:133
github.com/nektos/act/pkg/common.Executor.Finally.func1
/home/runner/work/act/act/pkg/common/executor.go:180
github.com/nektos/act/pkg/runner.(*StepContext).runUsesContainer.func1
/home/runner/work/act/act/pkg/runner/step_context.go:213
github.com/nektos/act/pkg/runner.(*RunContext).newStepExecutor.func1
/home/runner/work/act/act/pkg/runner/run_context.go:208
github.com/nektos/act/pkg/common.Executor.Then.func1
/home/runner/work/act/act/pkg/common/executor.go:146
github.com/nektos/act/pkg/common.Executor.Then.func1
/home/runner/work/act/act/pkg/common/executor.go:133
github.com/nektos/act/pkg/common.Executor.If.func1
/home/runner/work/act/act/pkg/common/executor.go:154
github.com/nektos/act/pkg/runner.(*runnerImpl).NewPlanExecutor.func1
/home/runner/work/act/act/pkg/runner/runner.go:76
github.com/nektos/act/pkg/common.Executor.ChannelError.func1
/home/runner/work/act/act/pkg/common/executor.go:125
github.com/nektos/act/pkg/common.NewParallelExecutor.func1.1
/home/runner/work/act/act/pkg/common/executor.go:101
runtime.goexit
/opt/hostedtoolcache/go/1.14.4/x64/src/runtime/asm_amd64.s:1373
[lint/LINT TESTING] ❌ Failure - Lint Code Base
DEBU[0002] Error response from daemon: No command specified
github.com/nektos/act/pkg/container.(*containerReference).create.func1
/home/runner/work/act/act/pkg/container/docker_run.go:266
github.com/nektos/act/pkg/common.Executor.Then.func1
/home/runner/work/act/act/pkg/common/executor.go:146
github.com/nektos/act/pkg/common.Executor.IfNot.func1
/home/runner/work/act/act/pkg/common/executor.go:164
github.com/nektos/act/pkg/common.Executor.Then.func1
/home/runner/work/act/act/pkg/common/executor.go:146
github.com/nektos/act/pkg/common.Executor.Then.func1
/home/runner/work/act/act/pkg/common/executor.go:146
github.com/nektos/act/pkg/common.Executor.Then.func1
/home/runner/work/act/act/pkg/common/executor.go:133
github.com/nektos/act/pkg/common.Executor.Finally.func1
/home/runner/work/act/act/pkg/common/executor.go:180
github.com/nektos/act/pkg/runner.(*StepContext).runUsesContainer.func1
/home/runner/work/act/act/pkg/runner/step_context.go:213
github.com/nektos/act/pkg/runner.(*RunContext).newStepExecutor.func1
/home/runner/work/act/act/pkg/runner/run_context.go:208
github.com/nektos/act/pkg/common.Executor.Then.func1
/home/runner/work/act/act/pkg/common/executor.go:146
github.com/nektos/act/pkg/common.Executor.Then.func1
/home/runner/work/act/act/pkg/common/executor.go:133
github.com/nektos/act/pkg/common.Executor.If.func1
/home/runner/work/act/act/pkg/common/executor.go:154
github.com/nektos/act/pkg/runner.(*runnerImpl).NewPlanExecutor.func1
/home/runner/work/act/act/pkg/runner/runner.go:76
github.com/nektos/act/pkg/common.Executor.ChannelError.func1
/home/runner/work/act/act/pkg/common/executor.go:125
github.com/nektos/act/pkg/common.NewParallelExecutor.func1.1
/home/runner/work/act/act/pkg/common/executor.go:101
runtime.goexit
/opt/hostedtoolcache/go/1.14.4/x64/src/runtime/asm_amd64.s:1373
Error: Error response from daemon: No command specified
All my implementations have a lint job using super-linter that is a prerequisite [needs: lint] to jobs such as test and so this is a huge blocker for local testing of actions.
A workaround that I found to help is specifying entrypoint explicitly in the workflow file (same as in super-linter's Docker image):
- name: Lint Code Base
uses: docker://github/super-linter:v3
with:
entrypoint: /action/lib/linter.sh
env:
# VALIDATE_ALL_CODEBASE: false
DEFAULT_BRANCH: master
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@maciejp-ro Awesome! Did you notice any adverse effects while in production Actions?
Issue is stale and will be closed in 7 days unless there is new activity
Most helpful comment
A workaround that I found to help is specifying
entrypointexplicitly in the workflow file (same as in super-linter's Docker image):