In bitbucket-pipelines.yml
After mvn build the Jar file is saved to /opt/atlassian/pipelines/agent/build/target/ directory as per pipeline logs.
How do I use this location in the Dockerfile when building the image? Or set the location in pipelines?
Currently I get error:
ADD failed: stat /var/lib/docker/165536.165536/tmp/docker-builder912665471/target/app-0.0.1-SNAPSHOT.jar: no such file or directory.
Dockerfile:
FROM openjdk:8-jdk-alpine
ADD ./target/app-0.0.1-SNAPSHOT.jar app.jar
EXPOSE 8081
ENTRYPOINT ["java","-Djava.security.egd=file:/dev/./urandom","-jar","/app.jar"]