The Dockerfile supports two build options for downloading Solr:
- Purpose: Reduces build time by using a local Solr archive already present in your project directory
- Use case: Ideal for CI/CD pipelines or when you want faster, offline builds
- How to switch:
- Download Solr slim archive:
wget https://archive.apache.org/dist/solr/solr/9.8.1/solr-9.8.1-slim.tgz - Extract it in your project root:
tar xzf solr-9.8.1-slim.tgz - In
Dockerfile, uncomment Option A lines (around line 33-35):COPY solr-${SOLR_VERSION}-slim/. /opt/solr-${SOLR_VERSION}-slim RUN mv solr-${SOLR_VERSION}-slim ${SOLR_INSTALL_DIR}
- Comment out Option B lines (around line 40-43):
# RUN curl -fSL "https://archive.apache.org/dist/solr/solr/${SOLR_VERSION}/solr-${SOLR_VERSION}-slim.tgz" -o solr-${SOLR_VERSION}-slim.tgz # RUN tar xzf solr-${SOLR_VERSION}-slim.tgz && ...
- Download Solr slim archive:
- Purpose: Automatically downloads Solr from Apache archive during build
- Use case: Cleaner project structure, no large files in version control
- Advantage: Works out-of-the-box without pre-downloading files
docker build -t local:solr-9.8.1-slim .docker run -d --name solr-local -p 8983:8983 local:solr-9.8.1-slimdocker exec -ti solr-local bash
bin/solr create_core -c collection1 -d /opt/solr/server/ibexa/template