This is an automated email from the ASF dual-hosted git repository.

dsmiley pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/solr.git


The following commit(s) were added to refs/heads/main by this push:
     new df1fd2a  Ref Guide: Docker, add headings (#263)
df1fd2a is described below

commit df1fd2a6ae415749375f324aa92fb50d7450629e
Author: David Smiley <[email protected]>
AuthorDate: Sun Aug 22 01:30:26 2021 -0400

    Ref Guide: Docker, add headings (#263)
    
    * Add sub-headers to "Creating cores" section
    * Add custom configset example to solr-precreate section
    
    https://github.com/docker-solr/docker-solr/pull/383
    
    Co-authored-by: Kirill Roskolii <[email protected]>
    Co-authored-by: Houston Putman <[email protected]>
---
 solr/solr-ref-guide/src/solr-in-docker.adoc | 21 ++++++++++++++++++---
 1 file changed, 18 insertions(+), 3 deletions(-)

diff --git a/solr/solr-ref-guide/src/solr-in-docker.adoc 
b/solr/solr-ref-guide/src/solr-in-docker.adoc
index d4f87a5..4953e4c 100644
--- a/solr/solr-ref-guide/src/solr-in-docker.adoc
+++ b/solr/solr-ref-guide/src/solr-in-docker.adoc
@@ -107,6 +107,8 @@ When Solr runs in standalone mode, you create "cores" to 
store data.
 On a non-Docker Solr, you would run the server in the background, then use the 
<<solr-control-script-reference.adoc#,Solr control script>> to create cores and 
load data.
 With Solr docker you have various options.
 
+==== Manually
+
 The first is exactly the same: start Solr running in a container, then execute 
the control script manually in the same container:
 
 [source,bash]
@@ -116,6 +118,9 @@ docker exec -it my_solr solr create_core -c gettingstarted
 ----
 
 This is not very convenient for users, and makes it harder to turn it into 
configuration for Docker Compose and orchestration tools like Kubernetes.
+
+==== Using solr-precreate Command
+
 So, typically you will use the `solr-precreate` command which prepares the 
specified core and then runs Solr:
 
 [source,bash]
@@ -123,9 +128,17 @@ So, typically you will use the `solr-precreate` command 
which prepares the speci
 docker run -d -p 8983:8983 --name my_solr solr solr-precreate gettingstarted
 ----
 
-The `solr-precreate` command takes an optional extra argument to specify a 
configset directory below `/opt/solr/server/solr/configsets/`.
-This allows you to specify your own config.
-See 
https://github.com/docker-solr/docker-solr-examples/tree/master/custom-configset[this
 example].
+The `solr-precreate` command takes an optional extra argument to specify a 
configset directory below `/opt/solr/server/solr/configsets/` or you can 
specify a full path to a custom configset inside the container:
+
+[source,bash]
+----
+docker run -d -p 8983:8983 --name my_solr -v 
$PWD/config/solr:/my_core_config/conf solr:8 solr-precreate my_core 
/my_core_config
+----
+
+N.B. When specifying the full path to the configset, the actual core 
configuration should be located inside that directory in the `conf` directory.
+See <<config-sets.adoc#,Configsets>> for details.
+
+==== Using solr-create Command
 
 The third option is to use the `solr-create` command.
 This runs a Solr in the background in the container, then uses the Solr 
control script to create the core, then stops the Solr server and restarts it 
in the foreground.
@@ -136,6 +149,8 @@ This method is less popular because the double Solr run can 
be confusing.
 docker run -d -p 8983:8983 --name my_solr solr solr-create -c gettingstarted
 ----
 
+==== Custom Set-Up Scripts
+
 Finally, you can run your own command-line and specify what to do, and even 
invoke mounted scripts.
 For example:
 

Reply via email to