Skip to content

ansmirnov/solr-in-docker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 

Repository files navigation

Running Solr in Docker

Contents

Select the version of the docker image

IMAGE=solr
TAG=8.8.2

Set the container name

NAME=solr

Pull the docker image

docker pull $IMAGE:$TAG

Set the data directory

VOLUMES="`pwd`/data:/var/solr"

Set the port forwarding rules

PORTS="127.0.0.1:8983:8983"

Set the run command

COMMAND="solr-precreate gettingstarted"

Run the Solr container

docker run -d --name $NAME -p "$PORTS" -v "$VOLUMES" $IMAGE:$TAG $COMMAND

Inspect the container

docker inspect $NAME

See the container logs

docker logs $NAME

Kill the container

docker kill $NAME

Remove the container

docker rm $NAME

Remove the data directory

rm -rf data

References

  1. https://hub.docker.com/_/solr/
  2. https://github.com/docker-solr/docker-solr/blob/master/README.md

About

Running Solr in Docker

Topics

Resources

Stars

Watchers

Forks