fernaspiazu commented 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 thing 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-unsubscr...@solr.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org
For additional commands, e-mail: issues-h...@solr.apache.org

Reply via email to