2018-03-30 21:58:04 +02:00
|
|
|
FROM java
|
2017-12-13 10:18:38 +01:00
|
|
|
MAINTAINER Disassembler <disassembler@dasm.cz>
|
|
|
|
|
2017-12-21 10:39:07 +01:00
|
|
|
RUN \
|
|
|
|
# Install runtime dependencies
|
2018-01-08 21:04:35 +01:00
|
|
|
apk --no-cache add bash lsof
|
|
|
|
|
|
|
|
RUN \
|
2017-12-21 10:39:07 +01:00
|
|
|
# Download and install Solr
|
2018-01-08 21:04:35 +01:00
|
|
|
wget http://archive.apache.org/dist/lucene/solr/6.5.1/solr-6.5.1.tgz -O /tmp/solr-6.5.1.tgz \
|
2017-12-13 15:58:29 +01:00
|
|
|
&& mkdir /opt \
|
|
|
|
&& tar xzf /tmp/solr-6.5.1.tgz -C /opt/ \
|
|
|
|
&& mv /opt/solr-6.5.1 /opt/solr \
|
2017-12-13 10:18:38 +01:00
|
|
|
&& rm -f /tmp/solr-6.5.1.tgz \
|
2017-12-21 10:39:07 +01:00
|
|
|
# Create OS user
|
2017-12-13 15:58:29 +01:00
|
|
|
&& addgroup -S -g 8983 solr \
|
2017-12-13 16:06:31 +01:00
|
|
|
&& adduser -S -u 8983 -h /var/lib/solr -s /bin/false -g solr -G solr solr \
|
2017-12-13 15:58:29 +01:00
|
|
|
&& chown -R solr:solr /opt/solr/ \
|
2017-12-21 10:39:07 +01:00
|
|
|
# Copy basic configuration file to data location
|
2017-12-13 15:58:29 +01:00
|
|
|
&& cp -p /opt/solr/server/solr/solr.xml /var/lib/solr/solr.xml \
|
2017-12-21 10:39:07 +01:00
|
|
|
# Make start/stop script visible globally
|
2017-12-13 15:58:29 +01:00
|
|
|
&& ln -s /opt/solr/bin/solr /usr/local/bin/solr
|
2017-12-13 10:18:38 +01:00
|
|
|
|
2017-12-13 15:58:29 +01:00
|
|
|
VOLUME ["/var/lib/solr"]
|
2017-12-13 10:18:38 +01:00
|
|
|
EXPOSE 8983
|
|
|
|
|
|
|
|
USER solr
|
2017-12-20 09:40:01 +01:00
|
|
|
CMD ["solr", "start", "-f"]
|