docker-ckan/solr/Dockerfile

23 lines
560 B
Docker
Raw Normal View History

2023-08-09 12:02:53 +02:00
FROM solr:9
2014-10-26 22:21:58 +01:00
ENV SOLR_PORT=8983
EXPOSE ${SOLR_PORT}
2023-04-02 01:48:24 +02:00
ARG CKAN_BRANCH="dev-v2.10"
ENV SOLR_CONFIG_DIR="/opt/solr/server/solr/configsets"
ENV SOLR_SCHEMA_FILE="$SOLR_CONFIG_DIR/ckan/conf/managed-schema"
2014-10-26 22:21:58 +01:00
USER root
2014-10-26 22:21:58 +01:00
2023-04-02 01:48:24 +02:00
# Create a CKAN configset by copying the default one
RUN cp -R $SOLR_CONFIG_DIR/_default $SOLR_CONFIG_DIR/ckan
# Update the schema
ADD https://raw.githubusercontent.com/ckan/ckan/$CKAN_BRANCH/ckan/config/solr/schema.xml $SOLR_SCHEMA_FILE
RUN chmod 644 $SOLR_SCHEMA_FILE
USER solr
CMD ["sh", "-c", "solr-precreate ckan $SOLR_CONFIG_DIR/ckan"]