Can't seem to create a solr core in my Docker Image
Summary
I'm not sure if this is really a bug. I'm pretty sure I'm doing something wrong.
I'm trying to create an image based on the Ironbank image with a default core for my project. I can see the core created during the build, but then when I start the container the core isn't there.
Steps to reproduce
My docker file:
ARG DOCKER_REGISTRY
ARG DOCKER_IMAGE_PREFIX
FROM {DOCKER_REGISTRY}/{DOCKER_IMAGE_PREFIX}/solr-8:8.8.1
RUN /opt/docker-solr/scripts/precreate-core mycorename
My commands docker-compose build docker-compose up solr
What is the current bug behavior?
During the docker-compose build, I see the core created. However, when I start the container the core isn't there.
What is the expected correct behavior?
When I start the container, solr has one core of name "mycorename".
Relevant logs and/or screenshots
I tried changing the Dockerfile RUN command to use solr-create, which starts solr after creating the core. I was able to verify that during the docker build, the core IS created and does exist. But when starting the container afterwards, the core is gone. I used SSH to verify the directories no longer existed.
Possible fixes
I think I'm using the script wrong in the Dockerfile and need to do some other approach.
Defintion of Done
-
Solr container starts with my core
/cc @ironbank-notifications/bug