mirror of
https://github.com/itzg/docker-minecraft-server.git
synced 2026-03-30 18:32:45 +00:00
Compare commits
12 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b8d69278e4 | ||
|
|
4a7ecffcbb | ||
|
|
9fe0021a7a | ||
|
|
e44d27c00a | ||
|
|
5062bc91ab | ||
|
|
dde4132d2c | ||
|
|
9bb3628792 | ||
|
|
03a5bb1ab0 | ||
|
|
3a9a1dc043 | ||
|
|
36ced1c630 | ||
|
|
0cb0755739 | ||
|
|
3e8eca6e28 |
@@ -4,7 +4,7 @@ MAINTAINER itzg
|
|||||||
|
|
||||||
ENV CASSANDRA_VERSION 2.2.8
|
ENV CASSANDRA_VERSION 2.2.8
|
||||||
|
|
||||||
ADD http://mirrors.ibiblio.org/apache/cassandra/$CASSANDRA_VERSION/apache-cassandra-$CASSANDRA_VERSION-bin.tar.gz /tmp/apache-cassandra.tgz
|
ADD http://apache.mirrors.pair.com/cassandra/$CASSANDRA_VERSION/apache-cassandra-$CASSANDRA_VERSION-bin.tar.gz /tmp/apache-cassandra.tgz
|
||||||
RUN tar -C /opt -zxf /tmp/apache-cassandra.tgz && \
|
RUN tar -C /opt -zxf /tmp/apache-cassandra.tgz && \
|
||||||
rm /tmp/apache-cassandra.tgz
|
rm /tmp/apache-cassandra.tgz
|
||||||
|
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
FROM java:8u92-jre-alpine
|
FROM openjdk:8u111-jre-alpine
|
||||||
|
|
||||||
MAINTAINER itzg
|
MAINTAINER itzg
|
||||||
|
|
||||||
RUN apk -U add bash
|
RUN apk -U add bash
|
||||||
|
|
||||||
ENV ES_VERSION=5.0.1
|
ENV ES_VERSION=5.1.2
|
||||||
|
|
||||||
ADD https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-$ES_VERSION.tar.gz /tmp/es.tgz
|
ADD https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-$ES_VERSION.tar.gz /tmp/es.tgz
|
||||||
RUN cd /usr/share && \
|
RUN cd /usr/share && \
|
||||||
@@ -15,8 +15,6 @@ EXPOSE 9200 9300
|
|||||||
|
|
||||||
ENV ES_HOME=/usr/share/elasticsearch-$ES_VERSION \
|
ENV ES_HOME=/usr/share/elasticsearch-$ES_VERSION \
|
||||||
DEFAULT_ES_USER=elasticsearch \
|
DEFAULT_ES_USER=elasticsearch \
|
||||||
DISCOVER_TRANSPORT_IP=eth0 \
|
|
||||||
DISCOVER_HTTP_IP=eth0 \
|
|
||||||
ES_JAVA_OPTS="-Xms1g -Xmx1g"
|
ES_JAVA_OPTS="-Xms1g -Xmx1g"
|
||||||
|
|
||||||
RUN adduser -S -s /bin/sh $DEFAULT_ES_USER
|
RUN adduser -S -s /bin/sh $DEFAULT_ES_USER
|
||||||
@@ -25,6 +23,7 @@ VOLUME ["/data","/conf"]
|
|||||||
|
|
||||||
WORKDIR $ES_HOME
|
WORKDIR $ES_HOME
|
||||||
|
|
||||||
|
COPY java.policy /usr/lib/jvm/java-1.8-openjdk/jre/lib/security/
|
||||||
COPY start /start
|
COPY start /start
|
||||||
COPY log4j2.properties $ES_HOME/config/
|
COPY log4j2.properties $ES_HOME/config/
|
||||||
|
|
||||||
|
|||||||
@@ -29,9 +29,9 @@ Where `DOCKERHOST` would be the actual hostname of your host running Docker.
|
|||||||
|
|
||||||
To run a multi-node cluster (3-node in this example) on a single Docker machine use:
|
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 es
|
docker run -d --name es0 -p 9200:9200 itzg/elasticsearch
|
||||||
docker run -d --name es1 --link es0 -e UNICAST_HOSTS=es0 es
|
docker run -d --name es1 --link es0 -e UNICAST_HOSTS=es0 itzg/elasticsearch
|
||||||
docker run -d --name es2 --link es0 -e UNICAST_HOSTS=es0 es
|
docker run -d --name es2 --link es0 -e UNICAST_HOSTS=es0 itzg/elasticsearch
|
||||||
|
|
||||||
|
|
||||||
and then check the cluster health, such as http://192.168.99.100:9200/_cluster/health?pretty
|
and then check the cluster health, such as http://192.168.99.100:9200/_cluster/health?pretty
|
||||||
@@ -182,21 +182,17 @@ 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
|
||||||
|
-e DISCOVER_HTTP_IP=eth2
|
||||||
replacing `eth0` with another interface within the container, if needed.
|
|
||||||
|
|
||||||
The same can be done for publish/binding of the http module by adding:
|
|
||||||
|
|
||||||
-e DISCOVERY_HTTP_IP=eth2
|
|
||||||
|
|
||||||
## Heap size and other JVM options
|
## Heap size and other JVM options
|
||||||
|
|
||||||
|
|||||||
6
elasticsearch/java.policy
Normal file
6
elasticsearch/java.policy
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
grant {
|
||||||
|
// JMX Java Management eXtensions
|
||||||
|
permission javax.management.MBeanTrustPermission "register";
|
||||||
|
permission javax.management.MBeanServerPermission "createMBeanServer";
|
||||||
|
permission javax.management.MBeanPermission "-#-[-]", "queryNames";
|
||||||
|
};
|
||||||
@@ -19,6 +19,11 @@ discoverIpFromLink() {
|
|||||||
OPTS="$OPTS -E $mode.host=$ip"
|
OPTS="$OPTS -E $mode.host=$ip"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
discoverAllGlobalIps() {
|
||||||
|
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] } }'`
|
||||||
|
OPTS="$OPTS -E network.host=$ips"
|
||||||
|
}
|
||||||
|
|
||||||
setup_clustering() {
|
setup_clustering() {
|
||||||
|
|
||||||
if [ -n "$CLUSTER" ]; then
|
if [ -n "$CLUSTER" ]; then
|
||||||
@@ -112,8 +117,13 @@ OPTS="$OPTS \
|
|||||||
-E transport.tcp.port=9300 \
|
-E transport.tcp.port=9300 \
|
||||||
-E http.port=9200"
|
-E http.port=9200"
|
||||||
|
|
||||||
discoverIpFromLink $DISCOVER_TRANSPORT_IP transport
|
discoverAllGlobalIps
|
||||||
discoverIpFromLink $DISCOVER_HTTP_IP http
|
if [ "${DISCOVER_TRANSPORT_IP}" != "" ]; then
|
||||||
|
discoverIpFromLink $DISCOVER_TRANSPORT_IP transport
|
||||||
|
fi
|
||||||
|
if [ "${DISCOVER_HTTP_IP}" != "" ]; then
|
||||||
|
discoverIpFromLink $DISCOVER_HTTP_IP http
|
||||||
|
fi
|
||||||
|
|
||||||
setup_personality
|
setup_personality
|
||||||
setup_clustering
|
setup_clustering
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ FROM openjdk:8u111-jre
|
|||||||
|
|
||||||
MAINTAINER itzg
|
MAINTAINER itzg
|
||||||
|
|
||||||
ENV KIBANA_VERSION 5.0.0
|
ENV KIBANA_VERSION 5.1.2
|
||||||
|
|
||||||
ADD https://artifacts.elastic.co/downloads/kibana/kibana-${KIBANA_VERSION}-linux-x86_64.tar.gz /tmp/kibana.tgz
|
ADD https://artifacts.elastic.co/downloads/kibana/kibana-${KIBANA_VERSION}-linux-x86_64.tar.gz /tmp/kibana.tgz
|
||||||
|
|
||||||
|
|||||||
12
kibana/docker-compose-test.yml
Normal file
12
kibana/docker-compose-test.yml
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
version: '2'
|
||||||
|
|
||||||
|
services:
|
||||||
|
es:
|
||||||
|
build: ../elasticsearch
|
||||||
|
ports:
|
||||||
|
- "9200:9200"
|
||||||
|
|
||||||
|
kibana:
|
||||||
|
build: .
|
||||||
|
ports:
|
||||||
|
- "5601:5601"
|
||||||
@@ -3,4 +3,3 @@
|
|||||||
OPTS="-e $ES_URL -H $HOSTNAME"
|
OPTS="-e $ES_URL -H $HOSTNAME"
|
||||||
|
|
||||||
exec bin/kibana $OPTS
|
exec bin/kibana $OPTS
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
FROM java:8
|
FROM openjdk:8-jre
|
||||||
|
|
||||||
MAINTAINER itzg
|
MAINTAINER itzg
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user