Skip to content

Commit

Permalink
Adjust dockerfile to solely rely on full folder
Browse files Browse the repository at this point in the history
Change-Id: I4a429caf829dbac45893e8c572db61f36520d6be
  • Loading branch information
Akron authored and margaretha committed May 19, 2023
1 parent 8571f6a commit d0ca990
Showing 1 changed file with 7 additions and 12 deletions.
19 changes: 7 additions & 12 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -32,20 +32,17 @@ RUN mkdir built && \

RUN rm -r Krill

# Install Kustvakt core
RUN mvn -f core/pom.xml clean install

# Package lite
RUN cd lite && \
mvn clean package && \
RUN cd full && \
mvn clean package -P lite && \
find target/Kustvakt-lite-*.jar -exec mv {} ../built/Kustvakt-lite.jar ';'

RUN sed 's!\(krill\.indexDir\s*=\).\+!\1\/kustvakt\/index!' lite/src/main/resources/kustvakt-lite.conf \
RUN sed 's!\(krill\.indexDir\s*=\).\+!\1\/kustvakt\/index!' full/src/main/resources/kustvakt-lite.conf \
> built/kustvakt-lite.conf

# Package full
RUN cd full && \
mvn clean package && \
mvn clean package -DskipTests=true && \
find target/Kustvakt-full-*.jar -exec mv {} ../built/Kustvakt-full.jar ';'

RUN cat full/src/main/resources/kustvakt.conf | \
Expand All @@ -63,10 +60,9 @@ RUN cat full/src/main/resources/example-users.ldif \
> built/ldap.ldif

# Cleanup
RUN rm -r core && \
rm -r full && \
rm -r lite && \
rm -r sample-index
RUN rm -r full && \
rm -r sample-index && \
rm -r wiki-index

RUN apk del git \
maven
Expand Down Expand Up @@ -94,7 +90,6 @@ ENTRYPOINT [ "java", "-jar" ]

CMD [ "Kustvakt-lite.jar" ]


FROM openjdk:19-alpine AS kustvakt-full

RUN addgroup -S korap && \
Expand Down

0 comments on commit d0ca990

Please sign in to comment.