Search code examples
dockerdockerfilecloudwebsphere

IBM Code Engine - Docker - 'dependency:go-offline': No such file or directory


I'm trying to get an Hello World app deploy with Code Engine.

I've spend several hours troubleshooting this with no success.

Dockerfile:

FROM eclipse-temurin:17-jdk-focal

WORKDIR /app
RUN ls -la 

COPY . .
RUN ls -la
RUN chmod +x  ./mvnw dependency:go-offline

#COPY src ./src

CMD ["./mvnw", "spring-boot:run"]

My first error message was as follows:

#11 [6/7] RUN ./mvnw dependency:go-offline
#11 0.132 /bin/sh: 1: ./mvnw: Permission denied
#11 ERROR: process "/bin/sh -c ./mvnw dependency:go-offline" did not complete successfully: exit code: 126

The added chmod +x :

#11 [6/7] RUN chmod +x  ./mvnw dependency:go-offline
#0 0.144 chmod: cannot access 'dependency:go-offline': No such file or directory
#11 ERROR: process "/bin/sh -c chmod +x  ./mvnw dependency:go-offline" did not complete successfully: exit code: 1

Could anyone provide me some guidance ?

Thank you Filipe


Solution

  • Issue solved with the precious help of David.

    Working solution:

    RUN chmod +x mvnw
    RUN ./mvnw dependency:go-offline
    

    Thank you