我在 docker 中运行 solr 并尝试了评论中的命令。
docker run --name test -d -p 8983:8983 -t solr
docker exec -it --user=solr test bin/solr create -c techproducts -d sample_techproducts_configs
在最后一个命令之后,我收到以下错误消息:Unrecognized argument: example/exampledocs/*.xml .
If this was intended to be a data file, it does not exist relative to /opt/solr
这是 techproducts.xml 数据的正确位置吗?
最佳答案
我查看了 hub.docker.com 上的官方 solr 图片,发现了这个,
docker run -d -P -v $PWD/myconfig:/myconfig solr solr-create -c mycore -d /myconfig
我想您需要像示例中那样使用绑定(bind)挂载从主机传递核心配置。在这种情况下,它不是 myconfig,而是“sample_techproducts_configs”
关于docker - 如何在 Docker 上启动 Solr techproducts 示例?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47910218/