专属域名
文档搜索
轩辕助手
Run助手
邀请有礼
返回顶部
快速返回页面顶部
收起
收起工具栏
轩辕镜像 官方专业版
轩辕镜像 官方专业版轩辕镜像 官方专业版官方专业版
首页个人中心搜索镜像

交易
充值流量我的订单
工具
提交工单镜像收录一键安装
Npm 源Pip 源Homebrew 源
帮助
常见问题
其他
关于我们网站地图

官方QQ群: 1072982923

itzg/elasticsearch Docker 镜像 - 轩辕镜像 | Docker 镜像高效稳定拉取服务

热门搜索:openclaw🔥nginx🔥redis🔥mysqlopenjdkcursorweb2apimemgraphzabbixetcdubuntucorednsjdk
elasticsearch
itzg/elasticsearch
自动构建
itzg
Provides an easily configurable Elasticsearch node.
72 次收藏下载次数: 0状态:自动构建维护者:itzg仓库类型:镜像最近更新:8 年前
轩辕镜像,快一点,稳很多。点击查看
镜像简介版本下载
轩辕镜像,快一点,稳很多。点击查看

This Docker image provides an easily configurable Elasticsearch node. Via port mappings, it is easy to create an arbitrarily sized cluster of nodes. As long as the versions match, you can mix-and-match "real" Elasticsearch nodes with container-ized ones.

NOTE for use on Linux hosts

Elasticsearch 5.x requires that the virtual memory mmap count is set sufficiently for stable, production use. Refer to this guide for more information.

Basic Usage

To start an Elasticsearch data node that listens on the standard ports on your host's network interface:

docker run -d -p 9200:9200 -p 9300:9300 itzg/elasticsearch

You'll then be able to connect to the Elasticsearch HTTP interface to confirm it's alive:

[***]

{
  "status" : 200,
  "name" : "Charon",
  "version" : {
    "number" : "1.3.5",
    "build_hash" : "4a50e7df768fddd572f48830ae9c35e4ded86ac1",
    "build_timestamp" : "2014-11-05T15:21:28Z",
    "build_snapshot" : false,
    "lucene_version" : "4.9"
  },
  "tagline" : "You Know, for Search"
}

Where DOCKERHOST would be the actual hostname of your host running Docker.

Simple, multi-node cluster

To run a multi-node cluster (3-node in this example) on a single Docker machine use:

docker run -d --name es0 -p 9200:9200                    itzg/elasticsearch
docker run -d --name es1 --link es0 -e UNICAST_HOSTS=es0 itzg/elasticsearch
docker run -d --name es2 --link es0 -e UNICAST_HOSTS=es0 itzg/elasticsearch

and then check the cluster health, such as [***]

{
  "cluster_name" : "elasticsearch",
  "status" : "green",
  "timed_out" : false,
  "number_of_nodes" : 3,
  "number_of_data_nodes" : 3,
  "active_primary_shards" : 0,
  "active_shards" : 0,
  "relocating_shards" : 0,
  "initializing_shards" : 0,
  "unassigned_shards" : 0
}

If you have a Docker Swarm cluster already initialized you can download this docker-compose.yml and deploy a cluster using:

docker stack deploy -c docker-compose.yml es

With a docker service ls you can confirm 1 master, 2 data, and 1 gateway nodes are running:

ID            NAME        MODE        REPLICAS  IMAGE
9nwnno8hbqgk  es_kibana   replicated  1/1       kibana:latest
f5x7nipwmvkr  es_gateway  replicated  1/1       es
om8rly2yxylw  es_data     replicated  2/2       es
tdvfilj370yn  es_master   replicated  1/1       es

As you can see, there is also a Kibana instance included and available at port 5601.

Health Checks

This container declares a HEALTHCHECK that queries the _cat/health endpoint for a quick, one-line gauge of health every 30 seconds.

The current health of the container is shown in the STATUS column of docker ps, such as

Up 14 minutes (healthy)

You can also check the history of health checks from inspect, such as:

> docker inspect -f "{{json .State.Health}}" es
{"Status":"healthy","FailingStreak":0,"Log":...

Configuration Summary

Ports

  • 9200 - HTTP REST
  • 9300 - Native transport

Volumes

  • /data - location of path.data
  • /conf - location of path.conf

Configuration Details

The following configuration options are specified using docker run environment variables (-e) like

docker run ... -e NAME=VALUE ... itzg/elasticsearch

Since Docker's -e settings are baked into the container definition, this image provides an extra feature to change any of the settings below for an existing container. Either create/edit the file env in the /conf volume mapping or edit within the running container's context using:

docker exec -it CONTAINER_ID vi /conf/env

replacing CONTAINER_ID with the container's ID or name.

The contents of the /conf/env file are standard shell

NAME=VALUE

entries where NAME is one of the variables described below.

Configuration options not explicitly supported below can be specified via the OPTS environment variable. For example, by default OPTS is set with

OPTS=-Dnetwork.bind_host=_non_loopback_

NOTE: That option is a default since bind_host defaults to localhost as of 2.0, which isn't helpful for port mapping out from the container.

Cluster Name

If joining a pre-existing cluster, then you may need to specify a cluster name different than the default "elasticsearch":

-e CLUSTER=dockers

Zen Unicast Hosts

When joining a multi-physical-host cluster, multicast may not be supported on the physical network. In that case, your node can reference specific one or more hosts in the cluster via the [Zen Unicast Hosts capability as a comma-separated list of HOST:PORT pairs:

-e UNICAST_HOSTS=HOST:PORT[,HOST:PORT]

such as

-e UNICAST_HOSTS=192.168.0.100:9300

Plugins

You can install one or more plugins before startup by passing a comma-separated list of plugins.

-e PLUGINS=ID[,ID]

In this example, it will install the Marvel plugin

-e PLUGINS=elasticsearch/marvel/latest

Many more plugins are available here.

Publish As

Since the container gives the Elasticsearch software an isolated perspective of its networking, it will most likely advertise its published address with a container-internal IP address. This can be overridden with a physical networking name and port using:

-e PUBLISH_AS=DOCKERHOST:9301

Author Note: I have yet to hit a case where this was actually necessary. Other than the cosmetic weirdness in the logs, Elasticsearch seems to be quite tolerant.

Node Name

Rather than use the randomly assigned node name, you can indicate a specific one using:

-e NODE_NAME=Docker

Node Type

If you refer to the Node section of the Elasticsearch reference guide, you'll find that there's three main types of nodes: master-eligible, data, and client.

In larger clusters it is important to dedicate a small number (>= 3) of master nodes. There are also cases where a large cluster may need dedicated gateway nodes that are neither master nor data nodes and purely operate as "smart routers" and have large amounts of CPU and memory to handle client requests and search-reduce.

To simplify all that, this image provides a TYPE variable to let you amongst these combinations. The choices are:

  • (not set, the default) : the default node type which is both master-eligible and a data node
  • MASTER : master-eligible, but holds no data. It is good to have three or more of these in a large cluster
  • DATA (or NON_MASTER) : holds data and serves search/index requests. Scale these out for elastic-y goodness.
  • NON_DATA : performs all duties except holding data
  • GATEWAY (or COORDINATING) : only operates as a client node or a "smart router". These are the ones whose HTTP port 9200 will need to be exposed
  • INGEST : operates only as an ingest node and is not master or data eligible

A Docker Compose file will serve as a good example of these three node types:

version: '3'

services:
  gateway:
    image: itzg/elasticsearch
    environment:
      UNICAST_HOSTS: master
      TYPE: GATEWAY
    ports:
      - "9200:9200"

  master:
    image: itzg/elasticsearch
    environment:
      UNICAST_HOSTS: gateway
      TYPE: MASTER
      MIN_MASTERS: 2

  data:
    image: itzg/elasticsearch
    environment:
      UNICAST_HOSTS: master,gateway
      TYPE: DATA

  kibana:
    image: kibana
    ports:
      - "5601:5601"
    environment:
      ELASTICSEARCH_URL: [***]

Minimum Master Nodes

In combination with the TYPE variable above, you will also want to configure the minimum master nodes to avoid split-brain during network outages.

The minimum, which can be calculated as (master_eligible_nodes / 2) + 1, can be set with the MIN_MASTERS variable.

Using the Docker Compose file above, a value of 2 is appropriate when scaling the cluster to 3 master nodes:

docker-compose scale master=3

Multiple Network Binding, such as Swarm Mode

When using Docker Swarm mode the container is presented with multiple ethernet devices. By default, all global, routable IP addresses are configured for Elasticsearch to use as network.host.

That discovery can be overridden by providing a specific ethernet device name to DISCOVER_TRANSPORT_IP and/or DISCOVER_HTTP_IP, such as

-e DISCOVER_TRANSPORT_IP=eth0
-e DISCOVER_HTTP_IP=eth2

Heap size and other JVM options

By default this image will run Elasticsearch with a Java heap size of 1 GB. If that value or any other JVM options need to be adjusted, then replace the ES_JAVA_OPTS environment variable.

For example, this would allow for the use of 16 GB of heap:

-e ES_JAVA_OPTS="-Xms16g -Xmx16g"

Refer to this page for more information about why both the minimum and maximum sizes were set to the same value.

查看更多 elasticsearch 相关镜像 →
elasticsearch logo
elasticsearch
Docker 官方镜像
Elasticsearch是一款功能强大的开源搜索与分析引擎,它基于Lucene构建,具备分布式、高扩展、实时处理的特性,能够高效存储、检索和分析各类结构化与非结构化数据,广泛应用于日志分析、全文搜索、业务智能等场景,通过简化数据探索流程,帮助用户快速从海量数据中获取有价值的洞察,让复杂数据的分析与利用变得简单高效。
6.6千 次收藏5亿+ 次下载
1 个月前更新
bitnami/elasticsearch logo
bitnami/elasticsearch
bitnami
Bitnami为Elasticsearch提供的安全镜像,是预先配置且经过安全加固的解决方案,集成开源搜索引擎Elasticsearch的核心功能,可支持日志分析、全文搜索、实时数据处理等多种应用场景,通过优化性能、简化部署流程并遵循安全最佳实践,助力用户快速构建安全可靠的Elasticsearch运行环境,适用于开发、测试及生产环境,有效降低配置复杂度与潜在安全风险。
84 次收藏1亿+ 次下载
5 个月前更新
bitnamicharts/elasticsearch logo
bitnamicharts/elasticsearch
bitnamicharts
Bitnami提供的Elasticsearch Helm chart,用于在Kubernetes环境中便捷部署和管理分布式搜索引擎Elasticsearch。
1 次收藏500万+ 次下载
7 个月前更新
demisto/elasticsearch logo
demisto/elasticsearch
demisto
暂无描述
10万+ 次下载
1 个月前更新
mcp/elasticsearch logo
mcp/elasticsearch
mcp
通过自然语言对话与Elasticsearch索引进行交互
15 次收藏1万+ 次下载
8 个月前更新
onlyoffice/elasticsearch logo
onlyoffice/elasticsearch
onlyoffice
暂无描述
2 次收藏5万+ 次下载
3 年前更新

轩辕镜像配置手册

探索更多轩辕镜像的使用方法,找到最适合您系统的配置方式

Docker 配置

登录仓库拉取

通过 Docker 登录认证访问私有仓库

专属域名拉取

无需登录使用专属域名

K8s Containerd

Kubernetes 集群配置 Containerd

K3s

K3s 轻量级 Kubernetes 镜像加速

Dev Containers

VS Code Dev Containers 配置

Podman

Podman 容器引擎配置

Singularity/Apptainer

HPC 科学计算容器配置

其他仓库配置

ghcr、Quay、nvcr 等镜像仓库

系统配置

Linux

在 Linux 系统配置镜像服务

Windows/Mac

在 Docker Desktop 配置镜像

MacOS OrbStack

MacOS OrbStack 容器配置

Docker Compose

Docker Compose 项目配置

NAS 设备

群晖

Synology 群晖 NAS 配置

飞牛

飞牛 fnOS 系统配置镜像

绿联

绿联 NAS 系统配置镜像

威联通

QNAP 威联通 NAS 配置

极空间

极空间 NAS 系统配置服务

网络设备

爱快路由

爱快 iKuai 路由系统配置

宝塔面板

在宝塔面板一键配置镜像

需要其他帮助?请查看我们的 常见问题Docker 镜像访问常见问题解答 或 提交工单

镜像拉取常见问题

使用与功能问题

docker search 报错:专属域名下仅支持 Docker Hub 查询

docker search 报错问题

网页搜不到镜像:Docker Hub 有但轩辕镜像搜索无结果

镜像搜索不到

离线传输镜像:无法直连时用 docker save/load 迁移

离线传输镜像

Docker 插件安装错误:application/vnd.docker.plugin.v1+json

Docker 插件安装错误

WSL 下 Docker 拉取慢:网络与挂载目录影响及优化

WSL 拉取镜像慢

轩辕镜像是否安全?镜像完整性校验(digest)说明

镜像安全性

如何用轩辕镜像拉取镜像?登录方式与专属域名配置

如何拉取镜像

错误码与失败问题

manifest unknown 错误:镜像不存在或标签错误

manifest unknown 错误

TLS/SSL 证书验证失败:Docker pull 时 HTTPS 证书错误

TLS 证书验证失败

DNS 解析超时:无法解析镜像仓库地址或连接超时

DNS 解析超时

410 Gone 错误:Docker 版本过低导致协议不兼容

410 错误:版本过低

402 Payment Required 错误:流量耗尽错误提示

402 错误:流量耗尽

401 UNAUTHORIZED 错误:身份认证失败或登录信息错误

身份认证失败错误

429 Too Many Requests 错误:请求频率超出专业版限制

429 限流错误

Docker login 凭证保存错误:Cannot autolaunch D-Bus(不影响登录)

凭证保存错误

账号 / 计费 / 权限

免费版与专业版区别:功能、限额与使用场景对比

免费版与专业版区别

支持的镜像仓库:Docker Hub、GCR、GHCR、K8s 等列表

轩辕镜像支持的镜像仓库

拉取失败是否扣流量?计费规则说明

拉取失败流量计费

KYSEC 权限不够:麒麟 V10/统信 UOS 下脚本执行被拦截

KYSEC 权限错误

如何申请开具发票?(增值税普票/专票)

开具发票

如何修改网站与仓库登录密码?

修改网站和仓库密码

配置与原理类

registry-mirrors 未生效:仍访问官方仓库或报错的原因

registry-mirrors 未生效

如何去掉镜像名称中的轩辕域名前缀?(docker tag)

去掉域名前缀

如何拉取指定架构镜像?(ARM64/AMD64 等多架构)

拉取指定架构镜像

查看全部问题→

用户好评

来自真实用户的反馈,见证轩辕镜像的优质服务

用户头像

oldzhang

运维工程师

Linux服务器

5

"Docker访问体验非常流畅,大镜像也能快速完成下载。"

轩辕镜像
镜像详情
...
itzg/elasticsearch
博客公告Docker 镜像公告与技术博客
热门镜像查看热门 Docker 镜像推荐
一键安装一键安装 Docker 并配置镜像源
镜像拉取问题咨询请 提交工单,官方技术交流群:1072982923。轩辕镜像所有镜像均来源于原始仓库,本站不存储、不修改、不传播任何镜像内容。
镜像拉取问题咨询请提交工单,官方技术交流群:。轩辕镜像所有镜像均来源于原始仓库,本站不存储、不修改、不传播任何镜像内容。
官方邮箱:点击复制邮箱
©2024-2026 源码跳动
官方邮箱:点击复制邮箱Copyright © 2024-2026 杭州源码跳动科技有限公司. All rights reserved.