-
Notifications
You must be signed in to change notification settings - Fork 893
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
Error docker build /bin/sh: 1: ./gradlew: not found The command '/bin/sh -c ./gradlew shadowJar' returned a non-zero code: 127 #74
Comments
I was able to check out and build cleanly.
My build logs are here:
https://gist.github.com/sriramnrn/ccdcfc020fed714432bd9f7cfd156832
…On Sun, Feb 14, 2021 at 5:36 PM vvp83 ***@***.***> wrote:
I added to Dockerfile command before run gradlew.
RUN find / -name gradlew ---> Running in f57b1d6121ed
/usr/repos/tsunami-security-scanner/repos/tsunami-security-scanner-plugins/google/fingerprinters/web/gradlew
/usr/repos/tsunami-security-scanner/repos/tsunami-security-scanner-plugins/google/portscan/nmap/gradlew
/usr/repos/tsunami-security-scanner/repos/tsunami-security-scanner-plugins/google/detectors/exposedui/wordpress/gradlew
/usr/repos/tsunami-security-scanner/repos/tsunami-security-scanner-plugins/google/detectors/exposedui/jenkins/gradlew
/usr/repos/tsunami-security-scanner/repos/tsunami-security-scanner-plugins/google/detectors/exposedui/hadoop/yarn/gradlew
/usr/repos/tsunami-security-scanner/repos/tsunami-security-scanner-plugins/google/detectors/exposedui/spring/gradlew
/usr/repos/tsunami-security-scanner/repos/tsunami-security-scanner-plugins/google/detectors/exposedui/elasticsearch/gradlew
/usr/repos/tsunami-security-scanner/repos/tsunami-security-scanner-plugins/google/detectors/exposedui/jupyter/gradlew
/usr/repos/tsunami-security-scanner/repos/tsunami-security-scanner-plugins/google/detectors/exposedui/phpunit/gradlew
/usr/repos/tsunami-security-scanner/repos/tsunami-security-scanner-plugins/google/detectors/exposedui/kubernetes/gradlew
/usr/repos/tsunami-security-scanner/repos/tsunami-security-scanner-plugins/google/detectors/credentials/ncrack/gradlew
/usr/repos/tsunami-security-scanner/repos/tsunami-security-scanner-plugins/google/detectors/credentials/cve20177615/gradlew
/usr/repos/tsunami-security-scanner/repos/tsunami-security-scanner-plugins/google/detectors/rce/java_jmx/gradlew
/usr/repos/tsunami-security-scanner/repos/tsunami-security-scanner-plugins/google/detectors/rce/solr_cve201917558/gradlew
/usr/repos/tsunami-security-scanner/repos/tsunami-security-scanner-plugins/google/detectors/rce/vbulletin/cve201916759/gradlew
/usr/repos/tsunami-security-scanner/repos/tsunami-security-scanner-plugins/google/detectors/rce/cve20179805/gradlew
/usr/repos/tsunami-security-scanner/repos/tsunami-security-scanner-plugins/google/detectors/rce/liferay_portal/cve20207961/gradlew
/usr/repos/tsunami-security-scanner/repos/tsunami-security-scanner-plugins/google/detectors/rce/cve20175638/gradlew
/usr/repos/tsunami-security-scanner/repos/tsunami-security-scanner-plugins/google/detectors/rce/joomla/cve20158562/gradlew
/usr/repos/tsunami-security-scanner/repos/tsunami-security-scanner-plugins/google/detectors/rce/joomla/rusty_rce/gradlew
/usr/repos/tsunami-security-scanner/repos/tsunami-security-scanner-plugins/google/detectors/rce/tomcat/ghostcat/gradlew
/usr/repos/tsunami-security-scanner/repos/tsunami-security-scanner-plugins/google/detectors/rce/cve201811776/gradlew
/usr/repos/tsunami-security-scanner/repos/tsunami-security-scanner-plugins/google/detectors/rce/cve20121823/gradlew
/usr/repos/tsunami-security-scanner/repos/tsunami-security-scanner-plugins/google/detectors/rce/cve20171000353/gradlew
/usr/repos/tsunami-security-scanner/repos/tsunami-security-scanner-plugins/examples/example_vuln_detector/gradlew
/usr/repos/tsunami-security-scanner/repos/tsunami-security-scanner-plugins/examples/example_calling_command/gradlew
/usr/repos/tsunami-security-scanner/repos/tsunami-security-scanner-plugins/govtech/detectors/cves/cve_2020_3452/gradlew
/usr/repos/tsunami-security-scanner/repos/tsunami-security-scanner/gradlew
/usr/tsunami/repos/tsunami-security-scanner-plugins/google/fingerprinters/web/gradlew
/usr/tsunami/repos/tsunami-security-scanner-plugins/google/portscan/nmap/gradlew
/usr/tsunami/repos/tsunami-security-scanner-plugins/google/detectors/exposedui/wordpress/gradlew
/usr/tsunami/repos/tsunami-security-scanner-plugins/google/detectors/exposedui/jenkins/gradlew
/usr/tsunami/repos/tsunami-security-scanner-plugins/google/detectors/exposedui/hadoop/yarn/gradlew
/usr/tsunami/repos/tsunami-security-scanner-plugins/google/detectors/exposedui/spring/gradlew
/usr/tsunami/repos/tsunami-security-scanner-plugins/google/detectors/exposedui/elasticsearch/gradlew
/usr/tsunami/repos/tsunami-security-scanner-plugins/google/detectors/exposedui/jupyter/gradlew
/usr/tsunami/repos/tsunami-security-scanner-plugins/google/detectors/exposedui/phpunit/gradlew
/usr/tsunami/repos/tsunami-security-scanner-plugins/google/detectors/exposedui/kubernetes/gradlew
/usr/tsunami/repos/tsunami-security-scanner-plugins/google/detectors/credentials/ncrack/gradlew
/usr/tsunami/repos/tsunami-security-scanner-plugins/google/detectors/credentials/cve20177615/gradlew
/usr/tsunami/repos/tsunami-security-scanner-plugins/google/detectors/rce/java_jmx/gradlew
/usr/tsunami/repos/tsunami-security-scanner-plugins/google/detectors/rce/solr_cve201917558/gradlew
/usr/tsunami/repos/tsunami-security-scanner-plugins/google/detectors/rce/vbulletin/cve201916759/gradlew
/usr/tsunami/repos/tsunami-security-scanner-plugins/google/detectors/rce/cve20179805/gradlew
/usr/tsunami/repos/tsunami-security-scanner-plugins/google/detectors/rce/liferay_portal/cve20207961/gradlew
/usr/tsunami/repos/tsunami-security-scanner-plugins/google/detectors/rce/cve20175638/gradlew
/usr/tsunami/repos/tsunami-security-scanner-plugins/google/detectors/rce/joomla/cve20158562/gradlew
/usr/tsunami/repos/tsunami-security-scanner-plugins/google/detectors/rce/joomla/rusty_rce/gradlew
/usr/tsunami/repos/tsunami-security-scanner-plugins/google/detectors/rce/tomcat/ghostcat/gradlew
/usr/tsunami/repos/tsunami-security-scanner-plugins/google/detectors/rce/cve201811776/gradlew
/usr/tsunami/repos/tsunami-security-scanner-plugins/google/detectors/rce/cve20121823/gradlew
/usr/tsunami/repos/tsunami-security-scanner-plugins/google/detectors/rce/cve20171000353/gradlew
/usr/tsunami/repos/tsunami-security-scanner-plugins/examples/example_vuln_detector/gradlew
/usr/tsunami/repos/tsunami-security-scanner-plugins/examples/example_calling_command/gradlew
/usr/tsunami/repos/tsunami-security-scanner-plugins/govtech/detectors/cves/cve_2020_3452/gradlew
Removing intermediate container f57b1d6121ed
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#74 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAF5JGSNDO3LAVNZSA6QHW3S66KQXANCNFSM4XTBNE7Q>
.
|
Sorry we cannot reproduce issue on our local dev environment. Do you mind posting the full build logs from a clean state? In addition, FYI we are working on releasing the docker images to gcr.io so that you can directly fetching the image without building by yourself. |
Just tried to install with the Dockfile and received the same error: BUILD SUCCESSFUL in 9s |
I have the same issue, building on MinGW on Windows. Haven't checked on Linux, yet.
|
On Sat, 6 Jan 2024 at 3:01 PM, Daniel Bunte ***@***.***> wrote:
I have the same issue, building on MinGW on Windows. Haven't checked on
Linux, yet.
This is my build log (with cached dependencies)
#0 building with "default" instance using docker driver
#1 [internal] load build definition from Dockerfile
#1 transferring dockerfile: 1.39kB 0.0s done
#1 DONE 0.0s
#2 [internal] load .dockerignore
#2 transferring context: 266B done
#2 DONE 0.1s
#3 [internal] load metadata for docker.io/adoptopenjdk/openjdk13:debianslim-jre
#3 <http://docker.io/adoptopenjdk/openjdk13:debianslim-jre#3> DONE 1.7s
#4 [internal] load metadata for docker.io/adoptopenjdk/openjdk13:debianslim
#4 <http://docker.io/adoptopenjdk/openjdk13:debianslim#4> DONE 1.7s
#5 [stage-0 1/10] FROM ***@***.***:442a10b6f318bd6a11f81c6f0f0de90cc0870a4421ab0eba875ef3680220a542
#5 ***@***.***:442a10b6f318bd6a11f81c6f0f0de90cc0870a4421ab0eba875ef3680220a542#5> DONE 0.0s
#6 [stage-1 1/4] FROM ***@***.***:a193ed5ea489b5ac33777010d7f12009ef9c0e0fc172181ab0365f07d4086137
#6 ***@***.***:a193ed5ea489b5ac33777010d7f12009ef9c0e0fc172181ab0365f07d4086137#6> DONE 0.0s
#7 [stage-1 2/4] RUN apt-get update && apt-get install -y --no-install-recommends nmap ncrack ca-certificates && apt-get clean && mkdir logs/
#7 CACHED
#8 [stage-1 3/4] WORKDIR /usr/tsunami
#8 CACHED
#9 [internal] load build context
#9 transferring context: 29.72kB 0.0s done
#9 DONE 0.1s
#10 [stage-0 8/10] WORKDIR /usr/repos/tsunami-security-scanner
#10 CACHED
#11 [stage-0 7/10] RUN mkdir /usr/tsunami/plugins && cp build/plugins/*.jar /usr/tsunami/plugins
#11 CACHED
#12 [stage-0 5/10] WORKDIR /usr/tsunami/repos/tsunami-security-scanner-plugins/google
#12 CACHED
#13 [stage-0 6/10] RUN chmod +x build_all.sh && ./build_all.sh
#13 CACHED
#14 [stage-0 2/10] RUN apt-get update && apt-get install -y --no-install-recommends git ca-certificates
#14 CACHED
#15 [stage-0 4/10] RUN git clone --depth 1 "https://github.com/google/tsunami-security-scanner-plugins"
#15 CACHED
#16 [stage-0 3/10] WORKDIR /usr/tsunami/repos
#16 CACHED
#17 [stage-0 9/10] COPY . .
#17 CACHED
#18 [stage-0 10/10] RUN ./gradlew shadowJar && cp $(find "./" -name 'tsunami-main-*-cli.jar') /usr/tsunami/tsunami.jar && cp ./tsunami.yaml /usr/tsunami
#18 0.400 /usr/bin/env: ‘sh\r’: No such file or directory
#18 ERROR: process "/bin/sh -c ./gradlew shadowJar && cp $(find \"./\" -name 'tsunami-main-*-cli.jar') /usr/tsunami/tsunami.jar && cp ./tsunami.yaml /usr/tsunami" did not complete successfully: exit code: 127
------
> [stage-0 10/10] RUN ./gradlew shadowJar && cp $(find "./" -name 'tsunami-main-*-cli.jar') /usr/tsunami/tsunami.jar && cp ./tsunami.yaml /usr/tsunami:
0.400 /usr/bin/env: ‘sh\r’: No such file or directory
/bin/sh is not found. Looks environment specific.
… ------
Dockerfile:23
--------------------
22 | COPY . .
23 | >>> RUN ./gradlew shadowJar \
24 | >>> && cp $(find "./" -name 'tsunami-main-*-cli.jar') /usr/tsunami/tsunami.jar \
25 | >>> && cp ./tsunami.yaml /usr/tsunami
26 |
--------------------
ERROR: failed to solve: process "/bin/sh -c ./gradlew shadowJar && cp $(find \"./\" -name 'tsunami-main-*-cli.jar') /usr/tsunami/tsunami.jar && cp ./tsunami.yaml /usr/tsunami" did not complete successfully: exit code: 127
—
Reply to this email directly, view it on GitHub
<#74 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAF5JGWBUYTMUMLI7IC4B5DYNEKXHAVCNFSM4XTBNE72U5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TCOBXHE3DAOJTGM2Q>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
I have found a solution - it was Windows vs. Unix line endings. Running It looks like this might help @jsburch83 as well. |
Sending build context to Docker daemon 265.7MB
Step 1/17 : FROM openjdk:13-jdk-slim-buster
---> 5927024fce47
Step 2/17 : RUN apt-get update && apt-get install -y --no-install-recommends nmap ncrack git ca-certificates && rm -rf /var/lib/apt/lists/*
---> Using cache
---> 7797c8a9e0ba
Step 3/17 : WORKDIR /usr/tsunami/repos
---> Using cache
---> 472724b42a15
Step 4/17 : RUN git clone --depth 1 "https://github.com/google/tsunami-security-scanner-plugins"
---> Using cache
---> 951a2e324a9a
Step 5/17 : WORKDIR /usr/tsunami/repos/tsunami-security-scanner-plugins/google
---> Using cache
---> 18a9e784b75e
Step 6/17 : RUN chmod +x build_all.sh && ./build_all.sh
---> Using cache
---> 97e45dbca963
Step 7/17 : RUN mkdir /usr/tsunami/plugins
---> Using cache
---> 3a22d9b0cc92
Step 8/17 : RUN cp build/plugins/*.jar /usr/tsunami/plugins
---> Using cache
---> a09d4e602f62
Step 9/17 : WORKDIR /usr/repos/tsunami-security-scanner
---> Using cache
---> fbc8c9d682ec
Step 10/17 : COPY . .
---> 7fe628c935e8
Step 11/17 : RUN ./gradlew shadowJar
---> Running in d753c1459783
/bin/sh: 1: ./gradlew: not found
The command '/bin/sh -c ./gradlew shadowJar' returned a non-zero code: 127
Update: Run docker build after bash -c "$(curl -sfL https://raw.githubusercontent.com/google/tsunami-security-scanner/master/quick_start.sh)" comand.
The text was updated successfully, but these errors were encountered: