How to deploy custom extension/component to docker version of XWiki

I followed the instructions here to create a custom component and it states to put the jar file into XWIKI_WAR_HOME/WEB-INF/lib. I copied the jar file into the docker container at /usr/local/tomcat/webapps/ROOT/WEB-INF/lib using docker cp and have verified that it’s there, but when I restart the container the file is gone.

Is there a way I could tell XWiki to look for components in a different folder so that I can point it to /usr/local/xwiki/data which is mounted as a docker volume?

That’s not possible… :slight_smile:

Could it be that instead of restarting the container you’re destroying it and recreating it? What commands do you use?

Yes you can use the canonical way to deploy an extension, using the extension manager, see https://www.xwiki.org/xwiki/bin/view/Documentation/DevGuide/Tutorials/WritingComponents/#HUsingtheExtensionManager (extensions are stored in the permanent directory).

You’re right. I’m using docker-compose up but that seems to be resetting the container even though I have not changed the yaml file. I switched to docker-compose restart and the file remains.

I will also try deploying using the extension manager. Thanks.