视图solr如何从docker容器

时间:2018-01-10 10:50:40

标签: docker solr

我想查看日志以检查库是否安装正确。

我在docker容器中使用solr。

我怎么能这样做?

1 个答案:

答案 0 :(得分:0)

所以,如果您正在使用官方图片,请按照以下方式运行:

docker run --name my_solr -d -p 8983:8983 -t solr

您可以使用docker logs

查看日志
docker logs my_solr

这些是我的日志,例如:

Starting Solr 7.2.0
2018-01-10 11:05:29.618 INFO  (main) [   ] o.e.j.s.Server jetty-9.3.20.v20170531
2018-01-10 11:05:30.570 INFO  (main) [   ] o.a.s.s.SolrDispatchFilter  ___      _       Welcome to Apache Solr™ version 7.2.0
2018-01-10 11:05:30.570 INFO  (main) [   ] o.a.s.s.SolrDispatchFilter / __| ___| |_ _   Starting in standalone mode on port 8983
2018-01-10 11:05:30.570 INFO  (main) [   ] o.a.s.s.SolrDispatchFilter \__ \/ _ \ | '_|  Install dir: /opt/solr
2018-01-10 11:05:30.611 INFO  (main) [   ] o.a.s.s.SolrDispatchFilter |___/\___/_|_|    Start time: 2018-01-10T11:05:30.574Z
2018-01-10 11:05:30.662 INFO  (main) [   ] o.a.s.c.SolrResourceLoader Using system property solr.solr.home: /opt/solr/server/solr
2018-01-10 11:05:30.735 INFO  (main) [   ] o.a.s.c.SolrXmlConfig Loading container configuration from /opt/solr/server/solr/solr.xml
2018-01-10 11:05:31.280 INFO  (main) [   ] o.a.s.c.SolrResourceLoader [null] Added 0 libs to classloader, from paths: []
2018-01-10 11:05:32.918 INFO  (main) [   ] o.a.s.c.CorePropertiesLocator Found 0 core definitions underneath /opt/solr/server/solr
2018-01-10 11:05:33.108 INFO  (main) [   ] o.e.j.s.Server Started @5029ms