I was trying to build the DockerFile but was unable to do so because the jar file created by the intermediate container could not be copied into the final container.
I was able to resolve this issue by changing COPY instruction from:
COPY --from=build /nexus-repository-composer/target/nexus-repository-composer-${COMPOSER_VERSION}.jar ${TARGET_DIR}
I was trying to build the DockerFile but was unable to do so because the jar file created by the intermediate container could not be copied into the final container.
I was able to resolve this issue by changing COPY instruction from:
COPY --from=build /nexus-repository-composer/target/nexus-repository-composer-${COMPOSER_VERSION}.jar ${TARGET_DIR}
into:
COPY --from=build /nexus-repository-composer/nexus-repository-composer/target/nexus-repository-composer-${COMPOSER_VERSION}.jar ${TARGET_DIR}