Added docker example index profile
Change-Id: Ia371ca3569141ae3c12c16388884db658b8d9eda
diff --git a/Dockerfile b/Dockerfile
index bade66b..35c2c54 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -59,16 +59,30 @@
RUN cat full/src/main/resources/example-users.ldif \
> built/ldap.ldif
-# Cleanup
-RUN rm -r full && \
- rm -r sample-index && \
- rm -r wiki-index
-
RUN apk del git \
maven
RUN cd ${M2_HOME} && rm -r .m2
+# Cleanup
+RUN rm -r full && \
+ rm -r wiki-index
+
+FROM busybox:latest AS example-index
+
+WORKDIR /kustvakt
+
+RUN addgroup -S korap && \
+ adduser -S kustvakt -G korap && \
+ mkdir kustvakt && \
+ chown -R kustvakt.korap /kustvakt
+
+COPY --from=builder /kustvakt/sample-index /kustvakt/index
+
+USER kustvakt
+
+CMD ["sh"]
+
FROM openjdk:19-alpine AS kustvakt-lite
RUN addgroup -S korap && \
@@ -117,3 +131,4 @@
# docker build -f Dockerfile -t korap/kustvakt:{nr}-full --target kustvakt-full .
# docker build -f Dockerfile -t korap/kustvakt:{nr} --target kustvakt-lite .
+# docker build -f Dockerfile -t korap/example-index:{nr} --target example-index .