Unable to run './mvnw clean install' when building docker image based on "openjdk:8-jdk-alpine" for Spring Boot app

i can't run anymore
why can't i run long distances
what to do when you can't run outside
in shape but can t run
i can t get into running
am i running wrong
i can't jog for more than a minute
best workout when you can't run

I would like to build a Spring Boot app using the maven wrapper provided by spring.io.starter inside a docker container. My Dockerfile is:

FROM openjdk:8-jdk-alpine
# install bash --> commented because I just need /bin/sh which is already provided by the base image
#RUN apk add --no-cache bash
ENV APP_DIR /app
ENV APP app.jar
WORKDIR ${APP_DIR}
COPY . ${APP_DIR}
# ===> HERE THE PROBLEM
RUN /bin/sh -c "./mvnw clean install"
ENTRYPOINT ["java","-jar","chicowa-app.jar"]
EXPOSE 8080

I have this error:

/bin/sh: ./mvnw: not found

After making some researches I still don't find a solution. My docker version Docker version 18.06.1-ce, build e68fc7a on Windows10 pro

Thanks a lot for your help.

EDIT

A solution would be to install maven directly with a RUN apk add --no-cache maven but I would like to minimize as possible the image' size.

We were experimenting this issue only on Windows 10 and were able to solve this issue on just applying dos2unix

dos2unix mvnw

Why can't I run for at least a minute?, Originally Answered: Why can't I run for at least a min ? I could'nt either in the beginning. My dad used to go to a park near our house and could easily  To Avoid issues, please always run the game directly from the Steam Client without any specific launch parameters unless otherwise stated. Steps to try Note - Windows 64-bit is Required to run the game. - Windows 7 SP1 or higher is required to run the game.

Unless you are running the script in the exact location that the file mvnw is located, it won’t work.

If your PATH is set correct, and Maven was installed in a suitable location, simply removing the "./" in front of the command will suffice.

RUN /bin/sh -c "mvnw clean install"

If mvnw is NOT in your PATH, you can specify the full path in your script (but recognize that Maven is likely to call other things that would want the same PATH changes).

Your Training Options When You Can't Run, Even the most dedicated runner may find there are times when they are unable to run. However, there are ways to maintain your fitness levels. Right click the MediaCreationTool.exe file then click Run as administrator. Note: How to verify if you downloaded or installed the Windows 10 November Update. Select Upgrade this PC now then click Next. Option 2: Upgrade using the Windows 10 ISO file. Pre-requisite Task

if you have already maven configured then you may run the following:-

mvn clean install

It will build the docker image seamlessly.

What to Do When You Can't Run, Running is much more than physical exercise for us. When we can't run, we get grumpy, tired, sluggish, and depressed. Having a negative  Windows 10: Unable to run Programs as Administrator Discus and support Unable to run Programs as Administrator in Windows 10 Customization to solve the problem; I have recently noticed that, although I am shown as Administrator in my Profile and "netplwiz" confirms this, I am unable to run Programs as

I have the same issue when build Dockerfile in Window 10. This because mvnw file contains CRLF (\r\n) at the end of line. I open it with Notepad++ and use Find \r\n and Replace with \n (with Extended (\n, \r, ...) checked). You can use dos2unix tool to convert as @Juanan said above.

After that, the build run with no problem.

But I can't run because, But I can't run because We debunk four of the biggest issues that keep people from running. Unable to run TLS 1.2 Hello, I'm using Cisco AnyConnect Secure Mobility Client for Windows (Windows 10) v 4.8. I'm trying to to connect using it to the server with TLS 1.2 but I failed because the VPN client uses only TLS 1.0. This client doesn't have TLS implementation, it uses Windows one. I did

Literally can't run for 30 seconds : running, So I walk for a few minutes and try running again, same thing. I've "ran" like this so far, about 3-5 miles a day. And there is no difference or improvement in my heart  Dell's Support Assist software fails to run when started from Windows 10 Start Menu unless it is started as by right clicking and running it as an Administrator. If it started from the Desktop shortcut it runs.

Unable to run another step? It could be your brain not your body that , Can't run any further because your legs have turned to jelly? You're not exhausted - it's your brain that's tired, say scientists. By Emma Innes  Before providing you the solution, I would like to point at the case of this problem. Users face this problem when they try to create a 64-bit bootable USB device from a Windows of 32-bit version.

How to Run Longer: 13 Steps (with Pictures), If you want to run greater distances and improve your endurance, you can start right You'll get to the point where you feel like you can't take another step. If I run Set-ExecutionPolicy -ExecutionPolicy Unrestricted -Scope LocalMachine then the local script is still not allowed to execute, which makes sense since the execution policy at the MachinePolicy scope will take precedence. As documented by about_Execution_Policies(current; at time of question), the RemoteSigned policy means: Scripts can run.

Comments
  • Hmm what's the value of ${APP_DIR}
  • ENV APP_DIR /app this is the directory where all files are copied to
  • I removed the ./ but same result. I don't want to install Maven so what do you mean by "If your PATH is set correct, and Maven was installed in a suitable location..."
  • If you haven’t installed Maven, then mvnw does not exist, and there is no solution to your problem, that doesn’t include installing maven.
  • I think you didn't understand my question. Take a look here about the maven wrapper baeldung.com/maven-wrapper
  • I did misunderstand, that said, I’m not sure why that page is claiming you won’t need maven installed. The installation instructions for maven wrapper specifically use Maven. You can’t add it to the project and get the required files downloaded, without it. cd your_project mvn -N io.takari:maven:wrapper Good luck.
  • I did the test on my PC, I removed MAVEN_HOME from the PATH, run the ./mvnw clean install in my project and it worked. So the author of that page is absolutely right.