Alpinize Solr
This commit is contained in:
parent
88964e2f7c
commit
8733cb8b30
7
solr.sh
7
solr.sh
@ -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
|
||||
|
@ -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
16
solr/etc/init.d/solr
Normal 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
|
||||
}
|
@ -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
|
Loading…
Reference in New Issue
Block a user