Alpinize Solr

This commit is contained in:
Disassembler 2017-12-19 16:31:35 +01:00
parent 88964e2f7c
commit 8733cb8b30
4 changed files with 23 additions and 16 deletions

View File

@ -11,7 +11,6 @@ cp ${SOURCE_DIR}/srv/solr/data/solr.xml /srv/solr/data/solr.xml
chown -R 8983:8983 /srv/solr/data
# Configure Solr service
cp ${SOURCE_DIR}/lib/systemd/system/solr.service /lib/systemd/system/solr.service
systemctl daemon-reload
systemctl enable solr
systemctl start solr
cp ${SOURCE_DIR}/etc/init.d/solr /etc/init.d/solr
rc-update add solr boot
service solr start

View File

@ -1,7 +1,10 @@
FROM alpine:3.7
MAINTAINER Disassembler <disassembler@dasm.cz>
RUN apk --no-cache add openjdk8-jre-base
RUN apk --no-cache add openjdk8-jre-base paxctl \
&& paxctl -cm /usr/lib/jvm/java-1.8-openjdk/jre/bin/java \
&& paxctl -cm /usr/lib/jvm/java-1.8-openjdk/bin/java \
&& apk del paxctl
RUN apk --no-cache add bash lsof \
&& wget http://archive.apache.org/dist/lucene/solr/6.5.1/solr-6.5.1.tgz -O /tmp/solr-6.5.1.tgz \

16
solr/etc/init.d/solr Normal file
View File

@ -0,0 +1,16 @@
#!/sbin/openrc-run
description="Solr docker container"
depend() {
need docker net
use dns logger netmount
}
start() {
/usr/bin/docker run -d --rm --name solr -v /srv/solr/data:/var/lib/solr solr
}
stop() {
/usr/bin/docker stop solr
}

View File

@ -1,11 +0,0 @@
[Unit]
Description=Solr Docker container
After=network.target
[Service]
Type=simple
ExecStart=/usr/bin/docker run --rm --name solr -v /srv/solr/data:/var/lib/solr solr
ExecStop=/usr/bin/docker stop solr
[Install]
WantedBy=multi-user.target