You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: solr/solr-ref-guide/src/solr-in-docker.adoc
+18-3Lines changed: 18 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -107,6 +107,8 @@ When Solr runs in standalone mode, you create "cores" to store data.
107
107
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.
108
108
With Solr docker you have various options.
109
109
110
+
==== Manually
111
+
110
112
The first is exactly the same: start Solr running in a container, then execute the control script manually in the same container:
This is not very convenient for users, and makes it harder to turn it into configuration for Docker Compose and orchestration tools like Kubernetes.
121
+
122
+
==== Using solr-precreate Command
123
+
119
124
So, typically you will use the `solr-precreate` command which prepares the specified core and then runs Solr:
120
125
121
126
[source,bash]
122
127
----
123
128
docker run -d -p 8983:8983 --name my_solr solr solr-precreate gettingstarted
124
129
----
125
130
126
-
The `solr-precreate` command takes an optional extra argument to specify a configset directory below `/opt/solr/server/solr/configsets/`.
127
-
This allows you to specify your own config.
128
-
See https://github.com/docker-solr/docker-solr-examples/tree/master/custom-configset[this example].
131
+
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:
N.B. When specifying the full path to the configset, the actual core configuration should be located inside that directory in the `conf` directory.
139
+
See <<config-sets.adoc#,Configsets>> for details.
140
+
141
+
==== Using solr-create Command
129
142
130
143
The third option is to use the `solr-create` command.
131
144
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.
0 commit comments