Docker image of a Solr instance ready to be used as an AkSearch Solr backend and MARC data import environment.
As in solr:7 the Solr is installed in /opt/solr/server/solr.
AkSearch repository is cloned into /opt/aksearch.
/opt/aksearch/import/*properties files have Solr port fixed (AkSearch assumes Solr works on port 8080 while by default it works on 8983).
Run with with e.g.:
docker run --name aksearch-solr -d -p 8983:8983 -v aksearch-solrdata:/opt/solr/server/solr/mycores acdhch/aksearch-solr
Enter container, e.g. with docker exec -ti aksearch-solr bash and:
cd /opt/aksearch && ./import-marc.sh pathToTheMarcFile.cd /opt/aksearch && harvest/batch-import-marc.sh -m -d pathToTheMarcDir.batch-import-marc.sh script writes logs into pathToTheMarcDir/log directory by default and fails if it's unable to create/write to this dir. If you run into such trouble consider using the -z switch to turn off logging to files (and you will still get log on the console and you can redirect it to a file).Similarly you can use other import scripts shipped with AkSearch (/opt/aksearch/harvest/batch-import-marc-auth.sh, /opt/aksearch/import-marc-auth.sh and others).
docker exec -ti aksearch-solr bash.curl -L 'https://github.com/acdh-oeaw/AkSearchSolr/blob/main/.github/workflows/marc.xml.gz?raw=true' > /tmp/marc.xml.gz
gunzip /tmp/marc.xml.gz
cd /opt/aksearch && ./import-marc.sh /tmp/marc.xml
rm /tmp/marc.xml
exit.Just mount it into the container and set the VUFIND_LOCAL_DIR environment variable in a way $VUFIND_LOCAL_DIR/import/import.properties points to your MARC import properties file, e.g.:
docker run --name aksearch-solr -d -p 8983:8983 -v aksearch-solrdata:/opt/solr/server/solr/mycores \
-v pathToMyLocalImport.properties:/opt/localcfg/import/import.properties -e VUFIND_LOCAL_DIR=/opt/localcfg \
acdhch/aksearch-solr
Act accordingly for any other configuration file.
import.properties file, you may need to adjust the solr.hosturl configuration property.batch-import-marc-auth.sh gives you
FATAL [main] (Boot.java:215) - ERROR: Error while invoking main method in specified class: org.solrmarc.driver.IndexDriver
java.lang.LinkageError: loader org.solrmarc.driver.Boot @3fee733d attempted duplicate interface definition for org.ini4j.Persistable. (org.ini4j.Persistable is in unnamed module of loader org.solrmarc.driver.Boot @3fee733d, parent loader 'app')
batch-import-marc.sh from the directory where import-marc.sh should solve the issue (see examples above - cd /opt/aksearch and then harvest/batch-import-marc.sh -m -d pathToTheMarcDir).
DEBUG [main] (Boot.java:645) - Number of homeDirStrs: 3
DEBUG [main] (Boot.java:648) - homeDirStrs[0]: /usr/local/vufind/import
DEBUG [main] (Boot.java:652) - homeDirStrs[1]: /opt/aksearch/harvest/../import
import-marc.sh directory and it duplicates with /opt/aksearch/harvest/../import leading to duplicated class imports.Content type
Image
Digest
sha256:d8dccec40…
Size
542.8 MB
Last updated
10 months ago
docker pull acdhch/aksearch-solr