diff --git a/Dockerfile b/Dockerfile index f02e0c4..7b7ed83 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,13 +7,15 @@ ENV JAVA_OPTS="-Djdk.lang.Process.launchMechanism=vfork" COPY . /workspace/app RUN apt-get -y update && apt-get -y install git RUN ./gradlew clean build -x test -RUN mkdir -p build/dependency && cd build/dependency && jar -xf ../libs/*[^p][^l][^a][^i][^n].jar + +# Copy the non-plain jar into /build/dependency +RUN mkdir -p build/dependency && cd build/dependency && jar -xf $(ls ../libs/*.jar | grep -v "plain.jar") FROM eclipse-temurin:17-jre VOLUME /tmp ARG DEPENDENCY=/workspace/app/build/dependency -COPY --from=build ${DEPENDENCY}/BOOT-INF/lib /app/lib COPY --from=build ${DEPENDENCY}/META-INF /app/META-INF +COPY --from=build ${DEPENDENCY}/BOOT-INF/lib /app/lib COPY --from=build ${DEPENDENCY}/BOOT-INF/classes /app EXPOSE 8080 ENTRYPOINT ["java","-cp","app:app/lib/*","com.aerospike.restclient.AerospikeRestGatewayApplication"]