Skip to content

Commit e539cf3

Browse files
mindwpires
authored andcommitted
force MEMORY_LOCK default to false.
1 parent 180a91c commit e539cf3

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,6 @@ ADD config /elasticsearch/config
77

88
# Set environment
99
ENV DISCOVERY_SERVICE elasticsearch-discovery
10+
11+
# kubernetes runtime requires swap is turned off, so memory lock is redundant
12+
ENV MEMORY_LOCK false

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,5 @@ This image can be configured by means of environment variables, that one can set
1919

2020
Besides the [inherited ones](https://github.com/pires/docker-elasticsearch#environment-variables), this container image provides the following:
2121

22-
* `DISCOVERY_SERVICE` - the service to be queried for through DNS.
22+
* [DISCOVERY_SERVICE](https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-discovery-zen.html#unicast) - the service to be queried for through DNS (default = `elasticsearch-discovery`).
23+
* [MEMORY_LOCK](https://www.elastic.co/guide/en/elasticsearch/reference/current/important-settings.html#bootstrap.memory_lock) - memory locking control defaults to `false` as Kubernetes requires swap to be disabled.

config/elasticsearch.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ path:
1515
logs: /data/log
1616

1717
bootstrap:
18-
memory_lock: true
18+
memory_lock: ${MEMORY_LOCK}
1919

2020
http:
2121
enabled: ${HTTP_ENABLE}

0 commit comments

Comments
 (0)