I am new to docker. I have a maven wrapper which build package my application and copy the deployables into new folder and then run it. I am getting this error.
COPY failed: stat /var/lib/docker/tmp/docker-builder102689450/app/q-runner/target/q-runner-0.0.1-runner.jar: no such file or directory
Why should the file searched in above location when I mentioned to copy from /app/.
My docker file is
# docker build -f Dockerfile.build -t abc/notify-build .
FROM adoptopenjdk/openjdk14:ubi
WORKDIR /app
COPY ./ /app
RUN chmod +x ./mvnw && \
./mvnw package
ENV JAVA_OPTIONS=-Dquarkus.http.host=0.0.0.0
COPY /app/target/*-runner.jar /deployments/app.jar
CMD java -jar /deployments/app.jar
docker build <context>
command. You cannot copy anything that is outside of the context. Any source starting with/
in your copy command is searched from the context root. You cannot either navigate out the context by using something like../../../app/
which will fire an error. – Zeitounator