我们如何拉动和使用elasticsearch的docker图像?
我提取了最新图像并运行<span class="preview">
{% if (file.thumbnailUrl) { %}
<a href="{%=file.url%}" title="{%=file.name%}" download="{%=file.name%}" data-gallery><img src="{%=file.thumbnailUrl%}"></a>
{% } else {
// Display relevant icon
var ext = file.name.substr(file.name.lastIndexOf('.') + 1);
var icon = "icons/generic.png";
if (ext === "pdf") {var icon="icons/pdf.png"};
if (ext === "xls" || ext === "xlsx" || ext === "csv" || ext === "ods" || ext === "xlr") {var icon="icons/excel.png"};
if (ext === "psd" || ext === "psb" || ext === "eps" || ext === "tif" || ext === "tiff" || ext === "indd" || ext === "ind" || ext === "bmp" || ext === "ai") {var icon="icons/graphic.png"};
if (ext === "tar" || ext === "rar" || ext === "tgz" || ext === "gz" || ext === "7z" || ext === "sit" || ext === "sitx" || ext === "cab") {var icon="icons/archive.png"};
if (ext === "docx" || ext ==="doc") {var icon="icons/word.png"};
if (ext === "rtf" || ext === "txt" || ext === "log" || ext === "xml" || ext === "css" || ext === "htm" || ext === "html") {var icon="icons/txt.png"};
if (ext === "zip") {var icon="icons/zip.png"};
if (ext === "mov" || ext === "avi" || ext === "m4v" || ext === "3gp" || ext === "mpeg" || ext === "mkv" || ext === "vob" || ext === "aaf" || ext === "asf" || ext === "wmv" || ext === "flv" || ext === "swf" || ext === "mpg" || ext === "mp4") {var icon="icons/mov.png"};
if (ext === "ppt" || ext === "pptx" || ext === "pps") {var icon="icons/ppt.png"};
if (ext === "pkg" || ext === "rpm") {var icon="icons/pkg.png"};
if (ext === "dmg" || ext === "iso" || ext === "bin" || ext === "toast") {var icon="icons/dmg.png"};
if (ext === "key" || ext === "odp") {var icon="icons/keynote.png"};
if (ext === "pages" || ext === "odt") {var icon="icons/pages.png"};
if (ext === "numbers") {var icon="icons/numbers.png"};
if (ext === "wav" || ext === "aif" || ext === "aiff" || ext === "m4a" || ext === "ogg" || ext === "mp3" || ext === "caf" || ext === "aac") {var icon="icons/wav.png"};
if (ext === "fnt" || ext === "fon" || ext === "otf" || ext === "ttf") {var icon="icons/font.png"};
%}<img src="{%=icon%}">{% } %}
</span>
,但当我访问http://0.0.0.0:9200/连接被拒绝时。同样,当我尝试使用docker run -d elasticsearch -p 9200:9200
命令时,结果是一样的。
我通过curl
命令检查它是否正在运行,并且它的状态正在运行。如何通过此docker ps
图像使用 Kibana 仪表板等图形用户界面(GUI)?
答案 0 :(得分:0)
基于官方dockerhub page for elastic-seacrh。
运行容器:
docker run -d -p 9200:9200 9300:9300 elasticsearch
然后可以在http://localhost:9200
kibana image是一张单独的图片,应该单独启动。检查https://www.elastic.co/guide/en/kibana/current/docker.html以查看如何启动kibana容器并将其连接到elastic-search。