Error in docker-compose building users-api
Closed this issue · 3 comments
ans-ashkan commented
by running
docker-compose up
i get the following output
Building users-api
Step 1/9 : FROM openjdk:8-alpine
---> a2a00e606b82
Step 2/9 : EXPOSE 8083
---> Using cache
---> a4fe8e84f94c
Step 3/9 : WORKDIR /usr/src/app
---> Using cache
---> b3a70d132712
Step 4/9 : COPY pom.xml mvnw ./
---> Using cache
---> 1169144b318c
Step 5/9 : COPY .mvn/ ./.mvn
---> Using cache
---> b55d1c4b3604
Step 6/9 : RUN ./mvnw dependency:resolve
---> Running in 296a9785149b
/bin/sh: ./mvnw: not found
ERROR: Service 'users-api' failed to build: The command '/bin/sh -c ./mvnw dependency:resolve' returned a non-zero code: 127
elgris commented
@ans-ashkan which OS are you running? Windows? I have a suspicion that RUN ./mvnw dependency:resolve
needs to be changed to RUN chmod +x ./mvnw && ./mvnw install
.
ans-ashkan commented
@elgris running docker on Windows 10, changed to RUN chmod +x ./mvnw && ./mvnw install
but still getting the same error.
ans-ashkan commented
@elgris file endings was changed to CRLF during checkout. changing back to LF fixed it.