at the moment i am trying to develope a microservice which should be deployed on docker and kubernetes. I also got it working. The thing is that my docker image with 126mb is quite large so i wanted to use multi stage build in order to reduce size but i am only getting errors. The working file looks like this
FROM openjdk:8-jdk-alpine
ADD target/nameofjar.jar nameofjar.jar
EXPOSE 8080
ENTRYPOINT [ "java","-jar","nameofjar.jar" ]
I also tried to automate the maven springboot mvn clean and install process but it didnt work. I would appreciate your help.