aquasecurity / aquasecurity/cloudsploit

Docker setup fails with "executable file not found in $PATH: unknown."

Open
#2,131 2 comments 1 reaction 0 assignees View on GitHub
Dominant language
JavaScript
Stars
3.8k
Forks
751
Avg merge
11d 9h
Merged PRs (30d)
3

Description

I've seen this issue reported before and closed again, but I'm facing the problem.
NPM/Node is hell to maintain, if you're not a developer and well versed with the JavaScript package managers, so I'd always prefer Docker.

I'm following the Docker setup guide:

```
$ git clone https://github.com/aquasecurity/cloudsploit.git
$ cd cloudsploit
$ docker build . -t cloudsploit:0.0.1
$ docker run cloudsploit:0.0.1 -h
$ docker run -e AWS_ACCESS_KEY_ID=XX -e AWS_SECRET_ACCESS_KEY=YY cloudsploit:0.0.1 --compliance=pci
```

---

```
$ docker build . -t cloudsploit:0.0.1
Sending build context to Docker daemon 20.64MB
Step 1/7 : FROM node:lts-alpine3.12
---> 7ae9aa692723
Step 2/7 : ARG PACKAGENAME=cloudsploit
---> Using cache
---> 947b6a7c54ce
Step 3/7 : COPY . /var/scan/cloudsploit/
---> Using cache
---> b1acb18b9432
Step 4/7 : RUN cd /var/scan && npm init --yes && npm install ${PACKAGENAME} && npm link /var/scan/cloudsploit
---> Using cache
---> 731f1d6839e4
Step 5/7 : ENV PATH "$PATH:/var/scan/node_modules/.bin"
---> Using cache
---> 396bde21e4ef
Step 6/7 : ENTRYPOINT ["cloudsploitscan"]
---> Using cache
---> 2522adda6a98
Step 7/7 : CMD []
---> Using cache
---> b4d40a09f3ec
Successfully built b4d40a09f3ec
Successfully tagged cloudsploit:0.0.1
```

The following step fails for me with:

```
$ docker run cloudsploit:0.0.1 -h
docker: Error response from daemon: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: exec: "cloudsploitscan": executable file not found in $PATH: unknown.
ERRO[0001] error waiting for container: context canceled
```

I've also tried to add the trailing slash, as suggested here: https://github.com/aquasecurity/cloudsploit/issues/1118#issuecomment-1117654018, but that didn't work for me.

On Debian 12, `docker --version #Docker version 20.10.24+dfsg1, build 297e128`.

Contributor guide

Open the contributing guide

Research direction

Start by inspecting the Docker setup used by `docker build`, especially the `ENTRYPOINT ["cloudsploitscan"]` and the npm install/link step shown in the report. Reproduce the failure with `docker run cloudsploit:0.0.1 -h` and compare the installed executable path with the image PATH. Done means the documented Docker commands start the scan successfully.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, javascript, node.js
Domain
cli, devops
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.