Elasticsearch is a distributed search and analytics engine. It is used for web search, log monitoring, and real-time analytics. Ideal for Big Data applications.
Overview of Elasticsearch Trademarks: This software listing is packaged by Bitnami. The respective trademarks mentioned in the offering are owned by the respective companies, and use of them does not imply any affiliation or endorsement.
consoledocker run --name elasticsearch bitnami/elasticsearch:latest
You can find the available configuration options in the Environment Variables section.
Those are hardened, minimal CVE images built and maintained by Bitnami. Bitnami Secure Images are based on the cloud-optimized, security-hardened enterprise https://vmware.github.io/photon/. Why choose BSI images?
Each image comes with valuable security metadata. You can view the metadata in our public catalog here. Note: Some data is only available with commercial subscriptions to BSI.
!https://github.com/bitnami/containers/blob/main/BSI%20UI%201.png?raw=true "Application details" !https://github.com/bitnami/containers/blob/main/BSI%20UI%202.png?raw=true "Packaging report"
If you are looking for our previous generation of images based on Debian Linux, please see the https://hub.docker.com/u/bitnamilegacy.
Deploying Bitnami applications as Helm Charts is the easiest way to get started with our applications on Kubernetes. Read more about the installation in the https://github.com/bitnami/charts/tree/master/bitnami/elasticsearch.
Non-root container images add an extra layer of security and are generally recommended for production environments. However, because they run as a non-root user, privileged tasks are typically off-limits. Learn more about non-root containers in our docs.
Dockerfile linksLearn more about the Bitnami tagging policy and the difference between rolling tags and immutable tags in our documentation page.
You can see the equivalence between the different tags by taking a look at the tags-info.yaml file present in the branch folder, i.e bitnami/ASSET/BRANCH/DISTRO/tags-info.yaml.
Subscribe to project updates by watching the https://github.com/bitnami/containers.
The recommended way to get the Bitnami Elasticsearch Docker Image is to pull the prebuilt image from the https://hub.docker.com/r/bitnami/elasticsearch.
consoledocker pull bitnami/elasticsearch:latest
To use a specific version, you can pull a versioned tag. You can view the https://hub.docker.com/r/bitnami/elasticsearch/tags/ in the Docker Hub Registry.
consoledocker pull bitnami/elasticsearch:[TAG]
If you wish, you can also build the image yourself by cloning the repository, changing to the directory containing the Dockerfile and executing the docker build command. Remember to replace the APP, VERSION and OPERATING-SYSTEM path placeholders in the example command below with the correct values.
consolegit clone https://github.com/bitnami/containers.git cd bitnami/APP/VERSION/OPERATING-SYSTEM docker build -t bitnami/APP:latest .
If you remove the container all your data will be lost, and the next time you run the image the application will be reinitialized. To avoid this loss of data, you should mount a volume that will persist even after the container is removed.
For persistence you should mount a directory at the /bitnami path. If the mounted directory is empty, it will be initialized on the first run.
consoledocker run \ -v /path/to/elasticsearch-data-persistence:/bitnami/elasticsearch/data \ bitnami/elasticsearch:latest
or by making a minor change to the https://github.com/bitnami/containers/blob/main/bitnami/elasticsearch/docker-compose.yml file present in this repository:
yamlelasticsearch: ... volumes: - /path/to/elasticsearch-data-persistence:/bitnami/elasticsearch/data ...
NOTE: As this is a non-root container, the mounted files and directories must have the proper permissions for the UID
1001.
It is also possible to use multiple volumes for data persistence by using the ELASTICSEARCH_DATA_DIR_LIST environment variable:
yamlelasticsearch: ... volumes: - /path/to/elasticsearch-data-persistence-1:/elasticsearch/data-1 - /path/to/elasticsearch-data-persistence-2:/elasticsearch/data-2 environment: - ELASTICSEARCH_DATA_DIR_LIST=/elasticsearch/data-1,/elasticsearch/data-2 ...
Using Docker container networking, an Elasticsearch server running inside a container can easily be accessed by your application containers.
Containers attached to the same network can communicate with each other using the container name as the hostname.
Step 1: Create a network
consoledocker network create app-tier --driver bridge
Step 2: Launch the Elasticsearch server instance
Use the --network app-tier argument to the docker run command to attach the Elasticsearch container to the app-tier network.
consoledocker run -d --name elasticsearch-server \ --network app-tier \ bitnami/elasticsearch:latest
Step 3: Launch your application container
consoledocker run -d --name myapp \ --network app-tier \ YOUR_APPLICATION_IMAGE
IMPORTANT:
- Please update the YOUR_APPLICATION_IMAGE_ placeholder in the above snippet with your application image
- In your application container, use the hostname
elasticsearch-serverto connect to the Elasticsearch server
When not specified, Docker Compose automatically sets up a new network and attaches all deployed services to that network. However, we will explicitly define a new bridge network named app-tier. In this example we assume that you want to connect to the Elasticsearch server from your own custom application image which is identified in the following snippet by the service name myapp.
yamlversion: '2' networks: app-tier: driver: bridge services: elasticsearch: image: bitnami/elasticsearch:latest networks: - app-tier myapp: image: YOUR_APPLICATION_IMAGE networks: - app-tier
IMPORTANT:
- Please update the YOUR_APPLICATION_IMAGE_ placeholder in the above snippet with your application image
- In your application container, use the hostname
elasticsearchto connect to the Elasticsearch server
Launch the containers using:
consoledocker-compose up -d
Customizable environment variables
| Name | Description | Default Value |
|---|---|---|
ELASTICSEARCH_CERTS_DIR | Path to certificates folder. | ${DB_CONF_DIR}/certs |
ELASTICSEARCH_DATA_DIR_LIST | Comma, semi-colon or space separated list of directories to use for data storage | nil |
ELASTICSEARCH_BIND_ADDRESS | Elasticsearch bind address | nil |
ELASTICSEARCH_ADVERTISED_HOSTNAME | Elasticsearch advertised hostname, used for publish | nil |
ELASTICSEARCH_CLUSTER_HOSTS | Elasticsearch cluster hosts | nil |
ELASTICSEARCH_CLUSTER_MASTER_HOSTS | Elasticsearch cluster master hosts | nil |
ELASTICSEARCH_CLUSTER_NAME | Elasticsearch cluster name | nil |
ELASTICSEARCH_HEAP_SIZE | Elasticsearch heap size | 1024m |
ELASTICSEARCH_MAX_ALLOWED_MEMORY_PERCENTAGE | Elasticsearch maximum allowed memory percentage | 100 |
ELASTICSEARCH_MAX_ALLOWED_MEMORY | Elasticsearch maximum allowed memory amount (in megabytes) | nil |
ELASTICSEARCH_MAX_TIMEOUT | Elasticsearch maximum init timeout | 60 |
ELASTICSEARCH_LOCK_ALL_MEMORY | Sets bootstrap.memory_lock parameter | no |
ELASTICSEARCH_DISABLE_JVM_HEAP_DUMP | Disable JVM Heap dump | no |
ELASTICSEARCH_DISABLE_GC_LOGS | Disable GC logs | no |
ELASTICSEARCH_IS_DEDICATED_NODE | If false, Elasticsearch will be configured with all the roles, deploy as dedicated node using DB_NODE_ROLES. | no |
ELASTICSEARCH_MINIMUM_MASTER_NODES | Minimum number of master nodes | nil |
ELASTICSEARCH_NODE_NAME | Elasticsearch node name | nil |
ELASTICSEARCH_FS_SNAPSHOT_REPO_PATH | Elasticsearch repo path to restore snapshots from system repository | nil |
ELASTICSEARCH_NODE_ROLES | Comma-separated list of Elasticsearch roles. If empty, will be deployed as a coordinating-only node. | nil |
ELASTICSEARCH_PLUGINS | List of Elasticsearch plugins to activate | nil |
ELASTICSEARCH_TRANSPORT_PORT_NUMBER | Elasticsearch node port number | 9300 |
ELASTICSEARCH_HTTP_PORT_NUMBER | Elasticsearch port | 9200 |
ELASTICSEARCH_ACTION_DESTRUCTIVE_REQUIRES_NAME | Enable action destructive requires name | nil |
ELASTICSEARCH_ENABLE_SECURITY | Enable Elasticsearch security settings. | false |
ELASTICSEARCH_PASSWORD | Password for "elastic" user. | bitnami |
ELASTICSEARCH_TLS_VERIFICATION_MODE | Elasticsearch TLS verification mode in transport layer. | full |
ELASTICSEARCH_TLS_USE_PEM | Configure Security settings using PEM certificates. | false |
ELASTICSEARCH_KEYSTORE_PASSWORD | Password for the Elasticsearch keystore containing the certificates or password-protected PEM key. | nil |
ELASTICSEARCH_TRUSTSTORE_PASSWORD | Password for the Elasticsearch truststore. | nil |
ELASTICSEARCH_KEY_PASSWORD | Password for the Elasticsearch node PEM key. | nil |
ELASTICSEARCH_KEYSTORE_LOCATION | Path to Keystore | ${DB_CERTS_DIR}/elasticsearch.keystore.jks |
ELASTICSEARCH_TRUSTSTORE_LOCATION | Path to Truststore. | ${DB_CERTS_DIR}/elasticsearch.truststore.jks |
ELASTICSEARCH_NODE_CERT_LOCATION | Path to PEM node certificate. | ${DB_CERTS_DIR}/tls.crt |
ELASTICSEARCH_NODE_KEY_LOCATION | Path to PEM node key. | ${DB_CERTS_DIR}/tls.key |
ELASTICSEARCH_CA_CERT_LOCATION | Path to CA certificate. | ${DB_CERTS_DIR}/ca.crt |
ELASTICSEARCH_SKIP_TRANSPORT_TLS | Skips transport layer TLS configuration. Useful when deploying single-node clusters. | false |
ELASTICSEARCH_TRANSPORT_TLS_USE_PEM | Configure transport layer TLS settings using PEM certificates. | $DB_TLS_USE_PEM |
ELASTICSEARCH_TRANSPORT_TLS_KEYSTORE_PASSWORD | Password for the Elasticsearch transport layer TLS keystore containing the certificates or password-protected PEM key. | $DB_KEYSTORE_PASSWORD |
ELASTICSEARCH_TRANSPORT_TLS_TRUSTSTORE_PASSWORD | Password for the Elasticsearch transport layer TLS truststore. | $DB_TRUSTSTORE_PASSWORD |
ELASTICSEARCH_TRANSPORT_TLS_KEY_PASSWORD | Password for the Elasticsearch transport layer TLS node PEM key. | $DB_KEY_PASSWORD |
ELASTICSEARCH_TRANSPORT_TLS_KEYSTORE_LOCATION | Path to Keystore for transport layer TLS. | $DB_KEYSTORE_LOCATION |
ELASTICSEARCH_TRANSPORT_TLS_TRUSTSTORE_LOCATION | Path to Truststore for transport layer TLS. | $DB_TRUSTSTORE_LOCATION |
ELASTICSEARCH_TRANSPORT_TLS_NODE_CERT_LOCATION | Path to PEM node certificate for transport layer TLS. | $DB_NODE_CERT_LOCATION |
ELASTICSEARCH_TRANSPORT_TLS_NODE_KEY_LOCATION | Path to PEM node key for transport layer TLS. | $DB_NODE_KEY_LOCATION |
ELASTICSEARCH_TRANSPORT_TLS_CA_CERT_LOCATION | Path to CA certificate for transport layer TLS. | $DB_CA_CERT_LOCATION |
ELASTICSEARCH_ENABLE_REST_TLS | Enable TLS encryption for REST API communications. | true |
ELASTICSEARCH_HTTP_TLS_USE_PEM | Configure HTTP TLS settings using PEM certificates. | $DB_TLS_USE_PEM |
ELASTICSEARCH_HTTP_TLS_KEYSTORE_PASSWORD | Password for the Elasticsearch HTTP TLS keystore containing the certificates or password-protected PEM key. | $DB_KEYSTORE_PASSWORD |
ELASTICSEARCH_HTTP_TLS_TRUSTSTORE_PASSWORD | Password for the Elasticsearch HTTP TLS truststore. | $DB_TRUSTSTORE_PASSWORD |
ELASTICSEARCH_HTTP_TLS_KEY_PASSWORD | Password for the Elasticsearch HTTP TLS node PEM key. | $DB_KEY_PASSWORD |
ELASTICSEARCH_HTTP_TLS_KEYSTORE_LOCATION | Path to Keystore for HTTP TLS. | $DB_KEYSTORE_LOCATION |
ELASTICSEARCH_HTTP_TLS_TRUSTSTORE_LOCATION | Path to Truststore for HTTP TLS. | $DB_TRUSTSTORE_LOCATION |
ELASTICSEARCH_HTTP_TLS_NODE_CERT_LOCATION | Path to PEM node certificate for HTTP TLS. | $DB_NODE_CERT_LOCATION |
ELASTICSEARCH_HTTP_TLS_NODE_KEY_LOCATION | Path to PEM node key for HTTP TLS. | $DB_NODE_KEY_LOCATION |
ELASTICSEARCH_HTTP_TLS_CA_CERT_LOCATION | Path to CA certificate for HTTP TLS. | $DB_CA_CERT_LOCATION |
ELASTICSEARCH_ENABLE_FIPS_MODE | Enables FIPS mode of operation | false |
ELASTICSEARCH_PASSWD_HASH_ALGORITHM | Password hashing algorithm | nil |
ELASTICSEARCH_KEYS | Comma-separated list of key=value to be added to the Elasticsearch keystore | nil |
ES_JAVA_HOME | Elasticsearch supported Java installation folder. | ${JAVA_HOME} |
Read-only environment variables
| Name | Description | Value |
|---|---|---|
DB_FLAVOR | Database flavor. Valid values: elasticsearch or opensearch. | elasticsearch |
ELASTICSEARCH_VOLUME_DIR | Persistence base directory | /bitnami/elasticsearch |
ELASTICSEARCH_BASE_DIR | Elasticsearch installation directory | /opt/bitnami/elasticsearch |
ELASTICSEARCH_CONF_DIR | Elasticsearch configuration directory | ${DB_BASE_DIR}/config |
ELASTICSEARCH_DEFAULT_CONF_DIR | Elasticsearch default configuration directory | ${DB_BASE_DIR}/config.default |
ELASTICSEARCH_LOGS_DIR | Elasticsearch logs directory | ${DB_BASE_DIR}/logs |
ELASTICSEARCH_PLUGINS_DIR | Elasticsearch plugins directory | ${DB_BASE_DIR}/plugins |
ELASTICSEARCH_DEFAULT_PLUGINS_DIR | Elasticsearch default plugins directory | ${DB_BASE_DIR}/plugins.default |
ELASTICSEARCH_DATA_DIR | Elasticsearch data directory | ${DB_VOLUME_DIR}/data |
ELASTICSEARCH_TMP_DIR | Elasticsearch temporary directory | ${DB_BASE_DIR}/tmp |
ELASTICSEARCH_BIN_DIR | Elasticsearch executables directory | ${DB_BASE_DIR}/bin |
ELASTICSEARCH_MOUNTED_PLUGINS_DIR | Directory where plugins are mounted | ${DB_VOLUME_DIR}/plugins |
ELASTICSEARCH_CONF_FILE | Path to Elasticsearch configuration file | ${DB_CONF_DIR}/elasticsearch.yml |
ELASTICSEARCH_LOG_FILE | Path to the Elasticsearch log file | ${DB_LOGS_DIR}/elasticsearch.log |
ELASTICSEARCH_PID_FILE | Path to the Elasticsearch pid file | ${DB_TMP_DIR}/elasticsearch.pid |
ELASTICSEARCH_INITSCRIPTS_DIR | Path to the Elasticsearch container init scripts directory | /docker-entrypoint-initdb.d |
ELASTICSEARCH_DAEMON_USER | Elasticsearch system user | elasticsearch |
ELASTICSEARCH_DAEMON_GROUP | Elasticsearch system group | elasticsearch |
Note: the README for this container is longer than the DockerHub length limit of 25000, so it has been trimmed. The full README can be found at https://github.com/bitnami/containers/blob/main/bitnami/elasticsearch/README.md
以下是 bitnami/elasticsearch 相关的常用 Docker 镜像,适用于 不同场景 等不同场景:
您可以使用以下命令拉取该镜像。请将 <标签> 替换为具体的标签版本。如需查看所有可用标签版本,请访问 标签列表页面。



探索更多轩辕镜像的使用方法,找到最适合您系统的配置方式
通过 Docker 登录认证访问私有仓库
无需登录使用专属域名
Kubernetes 集群配置 Containerd
K3s 轻量级 Kubernetes 镜像加速
VS Code Dev Containers 配置
Podman 容器引擎配置
HPC 科学计算容器配置
ghcr、Quay、nvcr 等镜像仓库
Harbor Proxy Repository 对接专属域名
Portainer Registries 加速拉取
Nexus3 Docker Proxy 内网缓存
需要其他帮助?请查看我们的 常见问题Docker 镜像访问常见问题解答 或 提交工单
docker search 限制
站内搜不到镜像
离线 save/load
插件要用 plugin install
WSL 拉取慢
安全与 digest
新手拉取配置
镜像合规机制
manifest unknown
no matching manifest(架构)
invalid tar header(解压)
TLS 证书失败
DNS 超时
域名连通性排查
410 Gone 排查
402 与流量用尽
401 认证失败
429 限流
D-Bus 凭证提示
413 与超大单层
来自真实用户的反馈,见证轩辕镜像的优质服务