I have to run a maven wrapper command from dockerfile but I don't know how can I do it? When I tried wrote like this:
RUN ./mvnw -s settings.xml clean install
this command not work. I have error mvnw: not found
my dockerfile:
FROM ubuntu
WORKDIR /app
COPY ./ ./
RUN ./mvnw -s .mvn/settings.xml -B -f /app/pom.xml dependency:resolve-plugins dependency:resolve dependency:go-offline
I find the way how to fix this issue. I had just added chnod +x./mvnw
command and final RUN
command looks like this:
RUN chmod +x ./mvnw && \
./mvnw -s .mvn/settings.xml -B -f /app/pom.xml dependency:resolve-plugins dependency:resolve dependency:go-offline
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.