Skip to content

Commit

Permalink
fix docker build
Browse files Browse the repository at this point in the history
  • Loading branch information
jdogmcsteezy committed Aug 30, 2024
1 parent 7ed3783 commit f49e3dd
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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"]

0 comments on commit f49e3dd

Please sign in to comment.