Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Starting Hadolint Container Fails with exec: "tail": executable file not found in $PATH: unknown #611

Closed
2 of 3 tasks
atalwar-sephora opened this issue Apr 21, 2021 · 4 comments

Comments

@atalwar-sephora
Copy link

  • This is a bug report
  • This is a feature request
  • I searched existing issues before opening this one

Expected behavior

I am trying to start hadolint container using below command

docker create --name 9a37a772568f45f2ba181180907608fc_hadolinthadolint_6be07c --workdir /__w/docker-base-images/docker-base-image --entrypoint "tail" hadolint/hadolint "-f" "/dev/null"

docker start 9a37a772568f45f2ba181180907608fc_hadolinthadolint_6be07c

But It fails with below error:

Error response from daemon: OCI runtime create failed: container_linux.go:370: starting container process caused: exec: "tail": executable file not found in $PATH: unknown Error: failed to start containers: 9a37a772568f45f2ba181180907608fc_hadolinthadolint_6be07c

Actual behavior

the container should start without showing error on tail not found.

Steps to reproduce the behavior

docker create --name 9a37a772568f45f2ba181180907608fc_hadolinthadolint_6be07c --workdir /__w/docker-base-images/docker-base-image --entrypoint "tail" hadolint/hadolint "-f" "/dev/null"

docker start 9a37a772568f45f2ba181180907608fc_hadolinthadolint_6be07c

Output of hadolint --version or
docker run --rm hadolint/hadolint hadolint --version or
docker run --rm ghcr.io/hadolint/hadolint hadolint --version:

Haskell Dockerfile Linter v2.2.0-0-ga34e5f3

Dockerfile (if relevant)

Dockerfile

Additional environment details (OS, stack version, etc.)
ubuntu-20.04

@lorenzo
Copy link
Member

lorenzo commented Apr 21, 2021

The docker image does not have a shell or any shell tools. Try using the Debian based image instead

@rittneje
Copy link

@lorenzo In my experience such docker images usually include "distroless" in the tag to make it clear (e.g., hadolint/hadolint:v2.3.0-distroless).

@atalwar-sephora
Copy link
Author

@lorenzo Thanks, it works with debian image. I used hadolint/hadolint:latest-debian

@atalwar-sephora
Copy link
Author

Use Debian or alpine base image for shell.

ljesparis added a commit to ljesparis/poetry_on_docker that referenced this issue Apr 1, 2023
last build failed with "tail": executable file not found in $PATH:
hadolint/hadolint#611 (comment)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants