I have this small build:
FROM eclipse-temurin:17-jdk as build-java
COPY java-project /root/project
WORKDIR /root/project
RUN chmod +x ./gradlew
RUN ls
RUN ./gradlew ...
#9 [build-build-java 5/6] RUN ls
#9 sha256:2d05b1e31ea4eaa8a9343b4f48fadcf7351b9d55dcc9c27e572d7bb32c4d723c
#9 0.194 build
#9 0.194 build.gradle
#9 0.194 docker-compose.yml
#9 0.194 gradle
#9 0.194 gradlew
#9 0.194 gradlew.bat
#9 0.194 HELP.md
#9 0.194 lombok.config
#9 0.194 settings.gradle
#9 0.194 src
#9 DONE 0.2s
#10 [build-build-java 6/6] RUN ./gradlew ...
#10 sha256:62cb4a1a6288008f3faccc3504e63ef87d30c3d7fde904a0576ffcf571e9b310
#10 0.310 /bin/sh: 1: ./gradlew: not found
#10 ERROR: executor failed running [/bin/sh -c ./gradlew ...]: exit code: 127
I've bene stuck on this for a while now.
I've tried using FROM gradle instead and then using gradle ... but then I get this file mount error:
#10 sha256:26de7798a76971c3eb12e6398f830ee487fe41c110d0f8ca6a23a92ee5437267
#10 0.854
#10 0.854 Welcome to Gradle 7.3.3!
#10 0.854
#10 0.854 Here are the highlights of this release:
#10 0.854 - Easily declare new test suites in Java projects
#10 0.855 - Support for Java 17
#10 0.855 - Support for Scala 3
#10 0.855
#10 0.855 For more details see https://docs.gradle.org/7.3.3/release-notes.html
#10 0.855
#10 0.952 Starting a Gradle Daemon (subsequent builds will be faster)
#10 2.153 Unable to list file systems to check whether they can be watched. Assuming all file systems can be watched. Re
ason: Could not query file systems: could not open mount file (errno 2: No such file or directory)