You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@solr.apache.org by GitBox <gi...@apache.org> on 2021/11/09 13:36:38 UTC
[GitHub] [solr-operator] fernaspiazu edited a comment on issue #364: JTS and Polygons jar file
fernaspiazu edited a comment on issue #364:
URL: https://github.com/apache/solr-operator/issues/364#issuecomment-964156262
Hi @HoustonPutman,
Thank you very much for your answer.
I have recently found a solution that may not be elegant, but works well in any version of Solr image, below a configuration example:
```yaml
podOptions:
initContainers:
- name: "install-jts-lib"
image: solr:8.9.0
command:
- 'sh'
- '-c'
- |
wget -O /tmp-webinf-lib/jts-core-1.15.1.jar https://repo1.maven.org/maven2/org/locationtech/jts/jts-core/1.15.1/jts-core-1.15.1.jar
cp -R /opt/solr/server/solr-webapp/webapp/WEB-INF/lib/* /tmp-webinf-lib
volumeMounts:
- mountPath: /tmp-webinf-lib
name: web-inf-lib
volumes:
- name: web-inf-lib
source:
emptyDir: {}
defaultContainerMount:
name: web-inf-lib
mountPath: /opt/solr/server/solr-webapp/webapp/WEB-INF/lib
```
In this example, I create an `emptyDir` volume, attach it in any directory of the `initContainer`, but in the `target directory` of the final Solr image, this will empty the `WEB-INF/lib` directory, but since I'm using the same Solr image, I can copy the content of `WEB-INF/lib` (jars and folders) at the end.
The effect is that the final container will have all the content it should have had plus the `jts-core-1.15.1.jar` jar.
This works also with other files or libraries you want to bring in the Solr container.
Let me know what do you think of this workaround 👍
Thank you again.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org