mirror of
https://github.com/itzg/docker-minecraft-server.git
synced 2026-02-18 15:36:22 +00:00
Compare commits
2 Commits
java16
...
es-2.4.3u1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
649ca92b14 | ||
|
|
205c57c3e3 |
@@ -1,8 +1,8 @@
|
|||||||
FROM java:8u92-jre-alpine
|
FROM java:8u111-jre-alpine
|
||||||
|
|
||||||
MAINTAINER itzg
|
MAINTAINER itzg
|
||||||
|
|
||||||
ENV ES_VERSION=2.4.1
|
ENV ES_VERSION=2.4.3
|
||||||
|
|
||||||
ADD https://download.elasticsearch.org/elasticsearch/release/org/elasticsearch/distribution/tar/elasticsearch/$ES_VERSION/elasticsearch-$ES_VERSION.tar.gz /tmp/es.tgz
|
ADD https://download.elasticsearch.org/elasticsearch/release/org/elasticsearch/distribution/tar/elasticsearch/$ES_VERSION/elasticsearch-$ES_VERSION.tar.gz /tmp/es.tgz
|
||||||
RUN cd /usr/share && \
|
RUN cd /usr/share && \
|
||||||
@@ -14,7 +14,6 @@ COPY start /start
|
|||||||
EXPOSE 9200 9300
|
EXPOSE 9200 9300
|
||||||
|
|
||||||
ENV ES_HOME=/usr/share/elasticsearch-$ES_VERSION \
|
ENV ES_HOME=/usr/share/elasticsearch-$ES_VERSION \
|
||||||
OPTS=-Dnetwork.host=_non_loopback_ \
|
|
||||||
DEFAULT_ES_USER=elasticsearch
|
DEFAULT_ES_USER=elasticsearch
|
||||||
|
|
||||||
RUN adduser -S -s /bin/sh $DEFAULT_ES_USER
|
RUN adduser -S -s /bin/sh $DEFAULT_ES_USER
|
||||||
|
|||||||
@@ -182,13 +182,14 @@ Using the Docker Compose file above, a value of `2` is appropriate when scaling
|
|||||||
|
|
||||||
docker-compose scale master=3
|
docker-compose scale master=3
|
||||||
|
|
||||||
## Auto transport/http discovery with Swarm Mode
|
## Multiple Network Binding, such as Swarm Mode
|
||||||
|
|
||||||
When using Docker Swarm mode (starting with 1.12), the overlay and ingress network interfaces are assigned
|
When using Docker Swarm mode the container is presented with multiple ethernet
|
||||||
multiple IP addresses. As a result, it creates confusion for the transport publish logic even when using
|
devices. By default, all global, routable IP addresses are configured for
|
||||||
the special value `_eth0_`.
|
Elasticsearch to use as `network.host`.
|
||||||
|
|
||||||
To resolve this, add
|
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_TRANSPORT_IP=eth0
|
||||||
|
|
||||||
|
|||||||
@@ -26,12 +26,11 @@ discoverIpFromLink() {
|
|||||||
OPTS="$OPTS -Des.$mode.host=$ip"
|
OPTS="$OPTS -Des.$mode.host=$ip"
|
||||||
}
|
}
|
||||||
|
|
||||||
if [ "$DISCOVER_TRANSPORT_IP" != "" ]; then
|
discoverAllGlobalIps() {
|
||||||
discoverIpFromLink $DISCOVER_TRANSPORT_IP transport
|
ips=`ipaddr show scope global|awk '$1 == "inet" { if (!match($2,"/32")) { gsub("/.*","",$2) ; addrs[length(addrs)] = $2 } } END { for (i in addrs) { if (i>0) printf "," ; printf addrs[i] } }'`
|
||||||
fi
|
OPTS="$OPTS --network.host=$ips"
|
||||||
if [ "$DISCOVER_HTTP_IP" != "" ]; then
|
}
|
||||||
discoverIpFromLink $DISCOVER_HTTP_IP http
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -n "$CLUSTER" ]; then
|
if [ -n "$CLUSTER" ]; then
|
||||||
OPTS="$OPTS -Des.cluster.name=$CLUSTER"
|
OPTS="$OPTS -Des.cluster.name=$CLUSTER"
|
||||||
@@ -98,6 +97,7 @@ else
|
|||||||
mkdir -p /conf/plugins
|
mkdir -p /conf/plugins
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
discoverAllGlobalIps
|
||||||
mkdir -p /conf/scripts
|
mkdir -p /conf/scripts
|
||||||
|
|
||||||
echo "Starting Elasticsearch with the options $OPTS"
|
echo "Starting Elasticsearch with the options $OPTS"
|
||||||
|
|||||||
Reference in New Issue
Block a user