Error: Invalid or corrupt jarfile /app.jar Error: Invalid or corrupt jarfile /app.jar kubernetes kubernetes

Error: Invalid or corrupt jarfile /app.jar


Replace in Dockerfile

COPY ${JAR_FILE} app.jar

with

COPY ${JAR_FILE} /app.jar


Rather embarrassingly i hadn't realised that i needed to point towards the right jar file with ${JAR_FILE}. After ensuring it was directed at my app jar it all worked. Thankyou!

Keeping here incase someone needs it.