-
Notifications
You must be signed in to change notification settings - Fork 3
/
Dockerfile-solr
36 lines (27 loc) · 1.08 KB
/
Dockerfile-solr
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# Dockerfile for the generating Apache Solr Docker image
#
# To build:
#
# docker build -t docker.lib.umd.edu/aspace-solr:<VERSION> -f Dockerfile-solr .
#
# where <VERSION> is the Docker image version to create.
#
# When updating ArchivesSpace, the expected Solr version can be found in
# "archivesspace/solr/Dockerfile" for the given version. For example, for
# ArchivesSpace v3.3.1:
#
# https://github.com/archivesspace/archivesspace/blob/v3.3.1/solr/Dockerfile
FROM solr:8.10-slim
# Create Solr core for ArchivesSpace
ARG SOLR_DIR=/opt/solr
ENV SOLR_DIR=${SOLR_DIR}
USER root
RUN cp -pr ${SOLR_DIR}/server/solr/configsets/_default ${SOLR_DIR}/server/solr/configsets/archivesspace && \
rm ${SOLR_DIR}/server/solr/configsets/archivesspace/conf/managed-schema
USER solr
COPY docker_config/solr/conf/* ${SOLR_DIR}/server/solr/configsets/archivesspace/conf/
RUN ${SOLR_DIR}/bin/solr start && \
${SOLR_DIR}/bin/solr create -c archivesspace -d ${SOLR_DIR}/server/solr/configsets/archivesspace/conf/ &&\
${SOLR_DIR}/bin/solr stop
ENTRYPOINT ["docker-entrypoint.sh"]
CMD ["solr-foreground"]