Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Raul Hidalgo Caballero
committed
May 17, 2016
1 parent
d2de73b
commit ba164ca
Showing
2 changed files
with
1,510 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,28 @@ | ||
FROM ubuntu:14.04 | ||
MAINTAINER Open Knowledge | ||
|
||
# Install Java | ||
RUN apt-get -q -y update | ||
RUN DEBIAN_FRONTEND=noninteractive apt-get -q -y install default-jre-headless | ||
|
||
# Install Solr | ||
ENV SOLR_HOME /opt/solr/example/solr | ||
ENV SOLR_VERSION 4.8.1 | ||
|
||
RUN mkdir -p /opt/solr | ||
ADD https://archive.apache.org/dist/lucene/solr/$SOLR_VERSION/solr-$SOLR_VERSION.tgz /opt/solr-$SOLR_VERSION.tgz | ||
RUN tar zxf /opt/solr-$SOLR_VERSION.tgz -C /opt/solr --strip-components 1 | ||
|
||
# Install CKAN Solr core | ||
RUN cp -R $SOLR_HOME/collection1/ $SOLR_HOME/ckan/ | ||
RUN echo name=ckan > $SOLR_HOME/ckan/core.properties | ||
ADD https://raw.githubusercontent.com/ckan/ckan/master/ckan/config/solr/schema.xml $SOLR_HOME/ckan/conf/schema.xml | ||
|
||
EXPOSE 8983 | ||
WORKDIR /opt/solr/example | ||
CMD ["java", "-jar", "start.jar"] | ||
FROM solr:latest | ||
MAINTAINER Open Knowledge | ||
|
||
# Enviroment | ||
ENV SOLR_CORE ckan | ||
|
||
# User | ||
USER root | ||
|
||
# Create Directories | ||
RUN mkdir -p /opt/solr/server/solr/$SOLR_CORE/conf | ||
RUN mkdir -p /opt/solr/server/solr/$SOLR_CORE/data | ||
|
||
# Adding Files | ||
ADD ./solrconfig.xml \ | ||
https://raw.githubusercontent.com/deinok/ckan/master/ckan/config/solr/schema.xml \ | ||
https://raw.githubusercontent.com/apache/lucene-solr/master/solr/server/solr/configsets/basic_configs/conf/currency.xml \ | ||
https://raw.githubusercontent.com/apache/lucene-solr/master/solr/server/solr/configsets/basic_configs/conf/synonyms.txt \ | ||
https://raw.githubusercontent.com/apache/lucene-solr/master/solr/server/solr/configsets/basic_configs/conf/stopwords.txt \ | ||
https://raw.githubusercontent.com/apache/lucene-solr/master/solr/server/solr/configsets/basic_configs/conf/protwords.txt \ | ||
https://raw.githubusercontent.com/apache/lucene-solr/master/solr/server/solr/configsets/data_driven_schema_configs/conf/elevate.xml \ | ||
/opt/solr/server/solr/$SOLR_CORE/conf/ | ||
|
||
# Create Core.properties | ||
RUN echo name=$SOLR_CORE > /opt/solr/server/solr/$SOLR_CORE/core.properties | ||
|
||
# Giving ownership to Solr | ||
RUN chown -R $SOLR_USER:$SOLR_USER /opt/solr/server/solr/$SOLR_CORE |
Oops, something went wrong.