mirror of
https://github.com/itzg/docker-minecraft-server.git
synced 2026-02-28 03:46:26 +00:00
Compare commits
85 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9ee907783d | ||
|
|
463cc62b75 | ||
|
|
5afd98edd8 | ||
|
|
8b9051d72e | ||
|
|
d6392f3aa9 | ||
|
|
fe808be91b | ||
|
|
2cab10e906 | ||
|
|
7f39d1f22e | ||
|
|
a9184368c1 | ||
|
|
caf2fc2ab6 | ||
|
|
5dd8141e5e | ||
|
|
2ff28675d4 | ||
|
|
519bd986b5 | ||
|
|
e41efba176 | ||
|
|
0502813496 | ||
|
|
932a6828f9 | ||
|
|
d176ef3f6a | ||
|
|
deb98268f6 | ||
|
|
e1531c3237 | ||
|
|
47af45a430 | ||
|
|
0195b42eea | ||
|
|
f875af5cdb | ||
|
|
32a918b902 | ||
|
|
d09a56075f | ||
|
|
e261fae348 | ||
|
|
5b8668d73f | ||
|
|
123292b56b | ||
|
|
0e0828f47f | ||
|
|
532c9fa69a | ||
|
|
e509563b10 | ||
|
|
899f31917c | ||
|
|
e6ca9a1c6d | ||
|
|
24c68b9c2c | ||
|
|
2891e1ac3e | ||
|
|
da9618c08b | ||
|
|
cb6643a345 | ||
|
|
71527b87c1 | ||
|
|
df25a22634 | ||
|
|
5c6a2cf44f | ||
|
|
536a7f6095 | ||
|
|
df9e725baf | ||
|
|
156716a7d8 | ||
|
|
0876ef7704 | ||
|
|
5c3ea25ff3 | ||
|
|
bd8e0cf5d2 | ||
|
|
1d5c4e3b0b | ||
|
|
6a565692a0 | ||
|
|
cf68446a00 | ||
|
|
c4a92f6706 | ||
|
|
7bb397a031 | ||
|
|
d86f034e96 | ||
|
|
20385507d8 | ||
|
|
91def1176d | ||
|
|
2e03ee4197 | ||
|
|
e8dd60a831 | ||
|
|
dc15094b8a | ||
|
|
fc807429e4 | ||
|
|
5ec21fc0ba | ||
|
|
3a0a8a9ced | ||
|
|
b9b05dbdfc | ||
|
|
179e72cda0 | ||
|
|
2b9514ab0b | ||
|
|
8a04a9f72e | ||
|
|
3a7af8e8d6 | ||
|
|
615d12bce3 | ||
|
|
72d055ac19 | ||
|
|
80c18004c1 | ||
|
|
97e9b2901c | ||
|
|
027d94cc77 | ||
|
|
66261af03d | ||
|
|
290e2c734a | ||
|
|
54d19715c7 | ||
|
|
bbe1533f91 | ||
|
|
97040f61ed | ||
|
|
55801ac11c | ||
|
|
07c32d8ee4 | ||
|
|
2e631bcbd9 | ||
|
|
c96c630fe5 | ||
|
|
f69e75cfc1 | ||
|
|
6157a693f1 | ||
|
|
854a158d3d | ||
|
|
18919ef33c | ||
|
|
2d8b3d7275 | ||
|
|
f48eedee78 | ||
|
|
08d459c373 |
10
README.md
10
README.md
@@ -1,6 +1,10 @@
|
|||||||
dockerfiles
|
|
||||||
===========
|
|
||||||
|
|
||||||
Contains the various Dockerfile definitions I'm maintaining.
|
This repository contains the various Dockerfile definitions I'm maintaining.
|
||||||
|
|
||||||
[](https://gitter.im/itzg/dockerfiles?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
|
[](https://gitter.im/itzg/dockerfiles?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
|
||||||
|
|
||||||
|
### Discontinued
|
||||||
|
|
||||||
|
##### Cassandra
|
||||||
|
|
||||||
|
I have found the [official image](https://hub.docker.com/_/cassandra/) to be quite sufficient
|
||||||
|
|||||||
2
build
2
build
@@ -5,10 +5,8 @@ pkgs="$pkgs minecraft-server"
|
|||||||
pkgs="$pkgs elasticsearch"
|
pkgs="$pkgs elasticsearch"
|
||||||
pkgs="$pkgs kibana"
|
pkgs="$pkgs kibana"
|
||||||
pkgs="$pkgs titan-gremlin"
|
pkgs="$pkgs titan-gremlin"
|
||||||
pkgs="$pkgs cassandra"
|
|
||||||
|
|
||||||
for p in $pkgs
|
for p in $pkgs
|
||||||
do
|
do
|
||||||
docker build -t itzg/$p $p
|
docker build -t itzg/$p $p
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|||||||
@@ -1,26 +0,0 @@
|
|||||||
FROM java:openjdk-8u72-jdk
|
|
||||||
|
|
||||||
MAINTAINER itzg
|
|
||||||
|
|
||||||
ENV CASSANDRA_VERSION 2.2.8
|
|
||||||
|
|
||||||
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 && \
|
|
||||||
rm /tmp/apache-cassandra.tgz
|
|
||||||
|
|
||||||
|
|
||||||
RUN mv /opt/apache-cassandra-$CASSANDRA_VERSION /opt/cassandra
|
|
||||||
ENV CASSANDRA_HOME /opt/cassandra
|
|
||||||
ENV CASSANDRA_CONF /conf
|
|
||||||
ENV CASSANDRA_DATA /data
|
|
||||||
WORKDIR $CASSANDRA_HOME
|
|
||||||
|
|
||||||
RUN ln -s $CASSANDRA_HOME/bin/* /usr/local/bin
|
|
||||||
VOLUME ["/data","/conf"]
|
|
||||||
|
|
||||||
EXPOSE 9042 9160 7000 7001
|
|
||||||
|
|
||||||
ADD cassandra.in.sh $CASSANDRA_HOME/cassandra.in.sh
|
|
||||||
RUN mv $CASSANDRA_HOME/bin/cassandra.in.sh $CASSANDRA_HOME/bin/orig.cassandra.in.sh
|
|
||||||
|
|
||||||
CMD ["/opt/cassandra/bin/cassandra", "-f"]
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
Yet another Cassandra image, but this one got container and non-container access right.
|
|
||||||
|
|
||||||
# Basic Usage
|
|
||||||
|
|
||||||
To support access from both Docker containers and external, non-Docker clients:
|
|
||||||
|
|
||||||
docker run -d --name cassandra -e PUBLISH_AS=192.168.59.103 -p 9160:9160 itzg/cassandra
|
|
||||||
|
|
||||||
replacing `192.168.59.103` with your Docker host's LAN IP address.
|
|
||||||
@@ -1,24 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
cassYml=$CASSANDRA_HOME/conf/cassandra.yaml
|
|
||||||
|
|
||||||
privateAddr=$(hostname -i)
|
|
||||||
|
|
||||||
seeds=${SEEDS:-${PUBLISH_AS:-$privateAddr}}
|
|
||||||
|
|
||||||
sed -i -e "s/- seeds:.*/- seeds: \"$seeds\"/" \
|
|
||||||
-e "s/listen_address:.*/listen_address: $privateAddr/" \
|
|
||||||
-e "s/rpc_address:.*/rpc_address: $privateAddr/" \
|
|
||||||
-e "s/start_rpc:.*/start_rpc: true/" \
|
|
||||||
-e "s#- /var/lib/cassandra/data#- $CASSANDRA_DATA#" \
|
|
||||||
$cassYml
|
|
||||||
|
|
||||||
if [ -n "$PUBLISH_AS" ]; then
|
|
||||||
sed -i -e "s/\(\s*#\)\?\s*broadcast_address:.*/broadcast_address: $PUBLISH_AS/" $cassYml
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Copy over our tweaked files, but non-clobbering to let user have ultimate control
|
|
||||||
cp -rn $CASSANDRA_HOME/conf/* $CASSANDRA_CONF
|
|
||||||
|
|
||||||
# source the original
|
|
||||||
. $CASSANDRA_HOME/bin/orig.cassandra.in.sh
|
|
||||||
@@ -1,15 +1,21 @@
|
|||||||
FROM openjdk:8u111-jre-alpine
|
FROM openjdk:8u121-jre-alpine
|
||||||
|
|
||||||
MAINTAINER itzg
|
LABEL maintainer "itzg"
|
||||||
|
|
||||||
RUN apk -U add bash
|
RUN apk -U add bash
|
||||||
|
|
||||||
ENV ES_VERSION=5.2.1
|
ARG ES_VERSION=5.5.1
|
||||||
|
# avoid conflicts with debian host systems when mounting to host volume
|
||||||
|
ARG DEFAULT_ES_USER_UID=1100
|
||||||
|
|
||||||
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
|
||||||
|
# need to adapt to both Docker's new remote-unpack-ADD behavior and the old behavior
|
||||||
RUN cd /usr/share && \
|
RUN cd /usr/share && \
|
||||||
tar xf /tmp/es.tgz && \
|
if [ -f /tmp/elasticsearch-$ES_VERSION.tar.gz ]; then \
|
||||||
rm /tmp/es.tgz
|
tar xf /tmp/elasticsearch-$ES_VERSION.tar.gz; \
|
||||||
|
else mv /tmp/elasticsearch-${ES_VERSION} /usr/share; \
|
||||||
|
fi && \
|
||||||
|
rm -f /tmp/elasticsearch-$ES_VERSION.tar.gz
|
||||||
|
|
||||||
EXPOSE 9200 9300
|
EXPOSE 9200 9300
|
||||||
|
|
||||||
@@ -17,9 +23,10 @@ HEALTHCHECK --timeout=5s CMD wget -q -O - http://$HOSTNAME:9200/_cat/health
|
|||||||
|
|
||||||
ENV ES_HOME=/usr/share/elasticsearch-$ES_VERSION \
|
ENV ES_HOME=/usr/share/elasticsearch-$ES_VERSION \
|
||||||
DEFAULT_ES_USER=elasticsearch \
|
DEFAULT_ES_USER=elasticsearch \
|
||||||
|
DEFAULT_ES_USER_UID=$DEFAULT_ES_USER_UID \
|
||||||
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 -u $DEFAULT_ES_USER_UID $DEFAULT_ES_USER
|
||||||
|
|
||||||
VOLUME ["/data","/conf"]
|
VOLUME ["/data","/conf"]
|
||||||
|
|
||||||
|
|||||||
@@ -181,12 +181,14 @@ To simplify all that, this image provides a `TYPE` variable to let you amongst t
|
|||||||
* `MASTER` : master-eligible, but holds no data. It is good to have three or more of these in a
|
* `MASTER` : master-eligible, but holds no data. It is good to have three or more of these in a
|
||||||
large cluster
|
large cluster
|
||||||
* `DATA` (or `NON_MASTER`) : holds data and serves search/index requests. Scale these out for elastic-y goodness.
|
* `DATA` (or `NON_MASTER`) : holds data and serves search/index requests. Scale these out for elastic-y goodness.
|
||||||
* `GATEWAY` : only operates as a client node or a "smart router". These are the ones whose HTTP port 9200 will need to be exposed
|
* `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](https://docs.docker.com/compose/overview/) file will serve as a good example of these three node types:
|
A [Docker Compose](https://docs.docker.com/compose/overview/) file will serve as a good example of these three node types:
|
||||||
|
|
||||||
```
|
```
|
||||||
version: '2'
|
version: '3'
|
||||||
|
|
||||||
services:
|
services:
|
||||||
gateway:
|
gateway:
|
||||||
@@ -209,6 +211,14 @@ services:
|
|||||||
environment:
|
environment:
|
||||||
UNICAST_HOSTS: master,gateway
|
UNICAST_HOSTS: master,gateway
|
||||||
TYPE: DATA
|
TYPE: DATA
|
||||||
|
|
||||||
|
kibana:
|
||||||
|
image: kibana
|
||||||
|
ports:
|
||||||
|
- "5601:5601"
|
||||||
|
environment:
|
||||||
|
ELASTICSEARCH_URL: http://gateway:9200
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
## Minimum Master Nodes
|
## Minimum Master Nodes
|
||||||
|
|||||||
35
elasticsearch/docker-compose-3x1GB.yml
Normal file
35
elasticsearch/docker-compose-3x1GB.yml
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
# This composition is known to work on a Swarm cluster consisting of
|
||||||
|
# 3 VM nodes with 1GB allocated to each.
|
||||||
|
version: '3'
|
||||||
|
|
||||||
|
services:
|
||||||
|
master:
|
||||||
|
image: itzg/elasticsearch
|
||||||
|
environment:
|
||||||
|
UNICAST_HOSTS: master
|
||||||
|
MIN_MASTERS: 1
|
||||||
|
ES_JAVA_OPTS: -Xms756m -Xmx756m
|
||||||
|
TYPE: NON_DATA
|
||||||
|
ports:
|
||||||
|
- "9200:9200"
|
||||||
|
- "9300:9300"
|
||||||
|
deploy:
|
||||||
|
replicas: 1
|
||||||
|
update_config:
|
||||||
|
parallelism: 1
|
||||||
|
data:
|
||||||
|
image: itzg/elasticsearch
|
||||||
|
deploy:
|
||||||
|
mode: global
|
||||||
|
update_config:
|
||||||
|
parallelism: 1
|
||||||
|
environment:
|
||||||
|
TYPE: DATA
|
||||||
|
UNICAST_HOSTS: master
|
||||||
|
ES_JAVA_OPTS: -Xms512m -Xmx512m
|
||||||
|
kibana:
|
||||||
|
image: kibana
|
||||||
|
ports:
|
||||||
|
- "5601:5601"
|
||||||
|
environment:
|
||||||
|
ELASTICSEARCH_URL: http://master:9200
|
||||||
35
elasticsearch/docker-compose-localbuild.yml
Normal file
35
elasticsearch/docker-compose-localbuild.yml
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
version: '3'
|
||||||
|
|
||||||
|
services:
|
||||||
|
master:
|
||||||
|
build: .
|
||||||
|
environment:
|
||||||
|
TYPE: MASTER
|
||||||
|
UNICAST_HOSTS: master
|
||||||
|
MIN_MASTERS: 1
|
||||||
|
data:
|
||||||
|
build: .
|
||||||
|
environment:
|
||||||
|
TYPE: DATA
|
||||||
|
UNICAST_HOSTS: master
|
||||||
|
gateway:
|
||||||
|
build: .
|
||||||
|
ports:
|
||||||
|
- "9200:9200"
|
||||||
|
- "9300:9300"
|
||||||
|
environment:
|
||||||
|
TYPE: GATEWAY
|
||||||
|
UNICAST_HOSTS: master
|
||||||
|
ingest:
|
||||||
|
build: .
|
||||||
|
ports:
|
||||||
|
- "9222:9200"
|
||||||
|
environment:
|
||||||
|
TYPE: INGEST
|
||||||
|
UNICAST_HOSTS: master
|
||||||
|
kibana:
|
||||||
|
image: kibana:5.5.1
|
||||||
|
ports:
|
||||||
|
- "5601:5601"
|
||||||
|
environment:
|
||||||
|
ELASTICSEARCH_URL: http://gateway:9200
|
||||||
21
elasticsearch/docker-compose-min.yml
Normal file
21
elasticsearch/docker-compose-min.yml
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
version: '3'
|
||||||
|
|
||||||
|
services:
|
||||||
|
master:
|
||||||
|
image: itzg/elasticsearch
|
||||||
|
environment:
|
||||||
|
UNICAST_HOSTS: master
|
||||||
|
MIN_MASTERS: 1
|
||||||
|
ports:
|
||||||
|
- "9200:9200"
|
||||||
|
- "9300:9300"
|
||||||
|
deploy:
|
||||||
|
replicas: 1
|
||||||
|
update_config:
|
||||||
|
parallelism: 1
|
||||||
|
kibana:
|
||||||
|
image: kibana
|
||||||
|
ports:
|
||||||
|
- "5601:5601"
|
||||||
|
environment:
|
||||||
|
ELASTICSEARCH_URL: http://master:9200
|
||||||
@@ -29,6 +29,13 @@ services:
|
|||||||
environment:
|
environment:
|
||||||
TYPE: GATEWAY
|
TYPE: GATEWAY
|
||||||
UNICAST_HOSTS: master
|
UNICAST_HOSTS: master
|
||||||
|
ingest:
|
||||||
|
image: itzg/elasticsearch
|
||||||
|
ports:
|
||||||
|
- "9222:9200"
|
||||||
|
environment:
|
||||||
|
TYPE: INGEST
|
||||||
|
UNICAST_HOSTS: master
|
||||||
kibana:
|
kibana:
|
||||||
image: kibana
|
image: kibana
|
||||||
ports:
|
ports:
|
||||||
|
|||||||
@@ -20,7 +20,18 @@ discoverIpFromLink() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
discoverAllGlobalIps() {
|
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] } }'`
|
if [ ${#IGNORE_NETWORK} -eq 0 ]
|
||||||
|
then
|
||||||
|
IGNORE_NETWORK='999.999.999.999'
|
||||||
|
fi
|
||||||
|
printf "Finding IPs"
|
||||||
|
while [ ${#ips} -eq 0 ]
|
||||||
|
do
|
||||||
|
printf "."
|
||||||
|
ips=`ipaddr show scope global| grep -v "inet ${IGNORE_NETWORK}" | 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] } }'`
|
||||||
|
sleep 1
|
||||||
|
done
|
||||||
|
echo " found! $ips"
|
||||||
OPTS="$OPTS -E network.host=$ips"
|
OPTS="$OPTS -E network.host=$ips"
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -77,15 +88,27 @@ setup_personality() {
|
|||||||
if [ -n "$TYPE" ]; then
|
if [ -n "$TYPE" ]; then
|
||||||
case $TYPE in
|
case $TYPE in
|
||||||
MASTER)
|
MASTER)
|
||||||
OPTS="$OPTS -E node.master=true -E node.data=false"
|
OPTS="$OPTS -E node.master=true -E node.data=false -E node.ingest=false"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
GATEWAY)
|
GATEWAY|COORDINATING)
|
||||||
OPTS="$OPTS -E node.master=false -E node.data=false"
|
OPTS="$OPTS -E node.master=false -E node.data=false -E node.ingest=false"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
DATA|NON_MASTER)
|
INGEST)
|
||||||
OPTS="$OPTS -E node.master=false -E node.data=true"
|
OPTS="$OPTS -E node.master=false -E node.data=false -E node.ingest=true"
|
||||||
|
;;
|
||||||
|
|
||||||
|
DATA)
|
||||||
|
OPTS="$OPTS -E node.master=false -E node.data=true -E node.ingest=false"
|
||||||
|
;;
|
||||||
|
|
||||||
|
NON_MASTER)
|
||||||
|
OPTS="$OPTS -E node.master=false -E node.data=true -E node.ingest=true"
|
||||||
|
;;
|
||||||
|
|
||||||
|
NON_DATA)
|
||||||
|
OPTS="$OPTS -E node.master=true -E node.data=false -E node.ingest=true"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
*)
|
*)
|
||||||
|
|||||||
@@ -1,18 +1,18 @@
|
|||||||
FROM java:8
|
FROM java:8
|
||||||
|
|
||||||
MAINTAINER itzg
|
LABEL maintainer "itzg"
|
||||||
|
|
||||||
ENV GITBLIT_VERSION 1.7.1
|
ENV GITBLIT_VERSION 1.7.1
|
||||||
|
|
||||||
RUN wget -qO /tmp/gitblit.tgz http://dl.bintray.com/gitblit/releases/gitblit-$GITBLIT_VERSION.tar.gz
|
RUN wget -qO /tmp/gitblit.tgz http://dl.bintray.com/gitblit/releases/gitblit-$GITBLIT_VERSION.tar.gz
|
||||||
|
|
||||||
RUN tar -C /opt -xvf /tmp/gitblit.tgz && \
|
RUN tar -C /opt -xvf /tmp/gitblit.tgz && \
|
||||||
rm /tmp/gitblit.tgz
|
rm /tmp/gitblit.tgz
|
||||||
|
|
||||||
VOLUME ["/data"]
|
VOLUME ["/data"]
|
||||||
|
|
||||||
ADD start.sh /start
|
ADD start.sh /start
|
||||||
|
|
||||||
ENV GITBLIT_PATH=/opt/gitblit-${GITBLIT_VERSION} \
|
ENV GITBLIT_PATH=/opt/gitblit-${GITBLIT_VERSION} \
|
||||||
GITBLIT_HTTPS_PORT=443 \
|
GITBLIT_HTTPS_PORT=443 \
|
||||||
GITBLIT_HTTP_PORT=80 \
|
GITBLIT_HTTP_PORT=80 \
|
||||||
@@ -20,7 +20,7 @@ ENV GITBLIT_PATH=/opt/gitblit-${GITBLIT_VERSION} \
|
|||||||
GITBLIT_ADMIN_USER=admin \
|
GITBLIT_ADMIN_USER=admin \
|
||||||
GITBLIT_INITIAL_REPO=
|
GITBLIT_INITIAL_REPO=
|
||||||
WORKDIR $GITBLIT_PATH
|
WORKDIR $GITBLIT_PATH
|
||||||
|
|
||||||
EXPOSE 80 443
|
EXPOSE 80 443
|
||||||
|
|
||||||
ENTRYPOINT ["/start"]
|
ENTRYPOINT ["/start"]
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
FROM itzg/ubuntu-openjdk-7
|
FROM itzg/ubuntu-openjdk-7
|
||||||
|
|
||||||
MAINTAINER itzg
|
LABEL maintainer "itzg"
|
||||||
|
|
||||||
RUN apt-get install -y curl unzip
|
RUN apt-get install -y curl unzip
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
FROM ubuntu:trusty
|
FROM ubuntu:trusty
|
||||||
|
|
||||||
MAINTAINER itzg
|
LABEL maintainer "itzg"
|
||||||
|
|
||||||
ENV APT_GET_UPDATE 2014-09-18
|
ENV APT_GET_UPDATE 2014-09-18
|
||||||
|
|
||||||
@@ -21,4 +21,3 @@ EXPOSE 4000
|
|||||||
|
|
||||||
ADD start.sh /start
|
ADD start.sh /start
|
||||||
CMD ["/start"]
|
CMD ["/start"]
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
FROM java:openjdk-8u102-jdk
|
FROM java:openjdk-8u102-jdk
|
||||||
|
|
||||||
MAINTAINER itzg
|
LABEL maintainer "itzg"
|
||||||
|
|
||||||
RUN apt-get update && \
|
RUN apt-get update && \
|
||||||
DEBIAN_FRONTEND=noninteractive apt-get install -y \
|
DEBIAN_FRONTEND=noninteractive apt-get install -y \
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
FROM openjdk:8u111-jre
|
FROM openjdk:8u111-jre
|
||||||
|
|
||||||
MAINTAINER itzg
|
LABEL maintainer "itzg"
|
||||||
|
|
||||||
ENV KIBANA_VERSION 5.1.2
|
ENV KIBANA_VERSION 5.1.2
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
FROM itzg/ubuntu-openjdk-7
|
FROM itzg/ubuntu-openjdk-7
|
||||||
|
|
||||||
MAINTAINER itzg
|
LABEL maintainer "itzg"
|
||||||
|
|
||||||
ENV LOGSTASH_VERSION 1.5.0-1
|
ENV LOGSTASH_VERSION 1.5.0-1
|
||||||
|
|
||||||
|
|||||||
@@ -1,30 +1,36 @@
|
|||||||
FROM openjdk:8-jre
|
FROM openjdk:8u131-jre-alpine
|
||||||
|
|
||||||
MAINTAINER itzg
|
LABEL maintainer "itzg"
|
||||||
|
|
||||||
ENV APT_GET_UPDATE 2016-04-23
|
RUN apk add -U \
|
||||||
RUN apt-get update
|
openssl \
|
||||||
|
imagemagick \
|
||||||
|
lsof \
|
||||||
|
su-exec \
|
||||||
|
bash \
|
||||||
|
curl \
|
||||||
|
git \
|
||||||
|
jq \
|
||||||
|
mysql-client \
|
||||||
|
python python-dev py2-pip && \
|
||||||
|
rm -rf /var/cache/apk/*
|
||||||
|
|
||||||
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y \
|
RUN pip install mcstatus
|
||||||
imagemagick \
|
|
||||||
lsof \
|
|
||||||
nano \
|
|
||||||
sudo \
|
|
||||||
vim \
|
|
||||||
jq \
|
|
||||||
&& apt-get clean
|
|
||||||
|
|
||||||
RUN useradd -s /bin/false --uid 1000 minecraft \
|
HEALTHCHECK CMD mcstatus localhost ping
|
||||||
|
|
||||||
|
RUN addgroup -g 1000 minecraft \
|
||||||
|
&& adduser -Ss /bin/false -u 1000 -G minecraft -h /home/minecraft minecraft \
|
||||||
&& mkdir /data \
|
&& mkdir /data \
|
||||||
&& mkdir /config \
|
&& mkdir /config \
|
||||||
&& mkdir /mods \
|
&& mkdir /mods \
|
||||||
&& mkdir /plugins \
|
&& mkdir /plugins \
|
||||||
&& mkdir /home/minecraft \
|
|
||||||
&& chown minecraft:minecraft /data /config /mods /plugins /home/minecraft
|
&& chown minecraft:minecraft /data /config /mods /plugins /home/minecraft
|
||||||
|
|
||||||
EXPOSE 25565 25575
|
EXPOSE 25565 25575
|
||||||
|
|
||||||
ADD https://github.com/itzg/restify/releases/download/1.0.3/restify_linux_amd64 /usr/local/bin/restify
|
ADD https://github.com/itzg/restify/releases/download/1.0.4/restify_linux_amd64 /usr/local/bin/restify
|
||||||
|
ADD https://github.com/itzg/rcon-cli/releases/download/1.3/rcon-cli_linux_amd64 /usr/local/bin/rcon-cli
|
||||||
COPY start.sh /start
|
COPY start.sh /start
|
||||||
COPY start-minecraft.sh /start-minecraft
|
COPY start-minecraft.sh /start-minecraft
|
||||||
COPY mcadmin.jq /usr/share
|
COPY mcadmin.jq /usr/share
|
||||||
@@ -38,6 +44,7 @@ ENTRYPOINT [ "/start" ]
|
|||||||
|
|
||||||
ENV UID=1000 GID=1000 \
|
ENV UID=1000 GID=1000 \
|
||||||
MOTD="A Minecraft Server Powered by Docker" \
|
MOTD="A Minecraft Server Powered by Docker" \
|
||||||
JVM_XX_OPTS="-XX:+UseG1GC" MAX_MEMORY="1G" \
|
JVM_XX_OPTS="-XX:+UseG1GC" MEMORY="1G" \
|
||||||
TYPE=VANILLA VERSION=LATEST FORGEVERSION=RECOMMENDED LEVEL=world PVP=true DIFFICULTY=easy \
|
TYPE=VANILLA VERSION=LATEST FORGEVERSION=RECOMMENDED LEVEL=world PVP=true DIFFICULTY=easy \
|
||||||
|
ENABLE_RCON=true RCON_PORT=25575 RCON_PASSWORD=minecraft \
|
||||||
LEVEL_TYPE=DEFAULT GENERATOR_SETTINGS= WORLD= MODPACK= ONLINE_MODE=TRUE CONSOLE=true
|
LEVEL_TYPE=DEFAULT GENERATOR_SETTINGS= WORLD= MODPACK= ONLINE_MODE=TRUE CONSOLE=true
|
||||||
|
|||||||
1
minecraft-server/Minecraft server containment.xml
Normal file
1
minecraft-server/Minecraft server containment.xml
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<mxfile userAgent="Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.110 Safari/537.36" version="6.4.4" editor="www.draw.io" type="github"><diagram name="Page-1">1VVNc5swEP01HDMDUiDOMbGd5pK2Ux96VkGAxgJRIRvcX9+VWD40ODOZ1j0Uz9jS2w+t3ts1Ad1W/SfNmvJNZVwGJMz6gO4CQjZRCN8WuAxA8vgwAIUW2QBFM3AQvziCGFecRMZbz9EoJY1ofDBVdc1T42FMa9X5brmS/qkNK/gKOKRMrtHvIjMlolEYzoZXLooSj97EaPjB0mOh1anG8wJCc/cM5oqNudC/LVmmugVE9wHdaqXMsKr6LZeW2pG2Ie7lHetUt+a1+UgAGQLOTJ74WHEiIfQ5E2dbn7kgJ8nPky3q2fDe3DEpijqgT+AheW5mK6wK/HVZ2obVI7ZT6ZFrCHlVrRkdoLSlzwJ2BYwo8WohXSkMPzQstfsOWhCcSlNJ2EX21JFVu8mFlFsllXahdJ/YD+Bnro0AyZ+Gu+yMslnwZjt3LVd/KurCpgptLlWbA5aBXNs0vH+X/mgSFWaFq4obfQEXDKDYBhd/2809RzeIlYt2mxwZ9nkxZZ61hgXKfV16upK+EjBMmuXmruX67KSCATMMYL2SwDU5z5DkvxAE52NNvdHqyBeOoXs8UWIbplP8A3ES3UCVja/K41oVEl5RJYpuoMr9SpU34B+Qr0rD0ITD0JE4TuI/nopwLcKLexYi6OFet6CT3Pt8TjwtCI3IFUJv0eXxis9v2y+fr/D58P/yGf87PmE7v4ycbfHCp/vf</diagram></mxfile>
|
||||||
@@ -1,6 +1,7 @@
|
|||||||
|
|
||||||
[](https://hub.docker.com/r/itzg/minecraft-server/)
|
[](https://hub.docker.com/r/itzg/minecraft-server/)
|
||||||
[](https://hub.docker.com/r/itzg/minecraft-server/)
|
[](https://hub.docker.com/r/itzg/minecraft-server/)
|
||||||
|
[](https://github.com/itzg/dockerfiles/issues)
|
||||||
|
|
||||||
This docker image provides a Minecraft Server that will automatically download the latest stable
|
This docker image provides a Minecraft Server that will automatically download the latest stable
|
||||||
version at startup. You can also run/upgrade to any specific version or the
|
version at startup. You can also run/upgrade to any specific version or the
|
||||||
@@ -35,6 +36,24 @@ With that you can easily view the logs, stop, or re-start the container:
|
|||||||
|
|
||||||
## Interacting with the server
|
## Interacting with the server
|
||||||
|
|
||||||
|
[RCON](http://wiki.vg/RCON) is enabled by default, so you can `exec` into the container to
|
||||||
|
access the Minecraft server console:
|
||||||
|
|
||||||
|
```
|
||||||
|
docker exec -i mc rcon-cli
|
||||||
|
```
|
||||||
|
|
||||||
|
Note: The `-i` is required for interactive use of rcon-cli.
|
||||||
|
|
||||||
|
To run a simple, one-shot command, such as stopping a Minecraft server, pass the command as
|
||||||
|
arguments to `rcon-cli`, such as:
|
||||||
|
|
||||||
|
```
|
||||||
|
docker exec mc rcon-cli stop
|
||||||
|
```
|
||||||
|
|
||||||
|
_The `-i` is not needed in this case._
|
||||||
|
|
||||||
In order to attach and interact with the Minecraft server, add `-it` when starting the container, such as
|
In order to attach and interact with the Minecraft server, add `-it` when starting the container, such as
|
||||||
|
|
||||||
docker run -d -it -p 25565:25565 --name mc itzg/minecraft-server
|
docker run -d -it -p 25565:25565 --name mc itzg/minecraft-server
|
||||||
@@ -99,6 +118,34 @@ or a specific version:
|
|||||||
|
|
||||||
docker run -d -e VERSION=1.7.9 ...
|
docker run -d -e VERSION=1.7.9 ...
|
||||||
|
|
||||||
|
## Healthcheck
|
||||||
|
|
||||||
|
This image contains [Dinnerbone's mcstatus](https://github.com/Dinnerbone/mcstatus) and uses
|
||||||
|
its `ping` command to continually check on the container's. That can be observed
|
||||||
|
from the `STATUS` column of `docker ps`
|
||||||
|
|
||||||
|
```
|
||||||
|
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
|
||||||
|
b418af073764 mc "/start" 43 seconds ago Up 41 seconds (healthy) 0.0.0.0:25565->25565/tcp, 25575/tcp mc
|
||||||
|
```
|
||||||
|
|
||||||
|
You can also query the container's health in a script friendly way:
|
||||||
|
|
||||||
|
```
|
||||||
|
> docker container inspect -f "{{.State.Health.Status}}" mc
|
||||||
|
healthy
|
||||||
|
```
|
||||||
|
|
||||||
|
Finally, since `mcstatus` is on the `PATH` you can exec into the container
|
||||||
|
and use mcstatus directly and invoke any of its other commands:
|
||||||
|
|
||||||
|
```
|
||||||
|
> docker exec mc mcstatus localhost status
|
||||||
|
version: v1.12 (protocol 335)
|
||||||
|
description: "{u'text': u'A Minecraft Server Powered by Docker'}"
|
||||||
|
players: 0/20 No players online
|
||||||
|
```
|
||||||
|
|
||||||
## Running a Forge Server
|
## Running a Forge Server
|
||||||
|
|
||||||
Enable Forge server mode by adding a `-e TYPE=FORGE` to your command-line.
|
Enable Forge server mode by adding a `-e TYPE=FORGE` to your command-line.
|
||||||
@@ -109,6 +156,20 @@ but you can also choose to run a specific version with `-e FORGEVERSION=10.13.4.
|
|||||||
-e TYPE=FORGE -e FORGEVERSION=10.13.4.1448 \
|
-e TYPE=FORGE -e FORGEVERSION=10.13.4.1448 \
|
||||||
-p 25565:25565 -e EULA=TRUE --name mc itzg/minecraft-server
|
-p 25565:25565 -e EULA=TRUE --name mc itzg/minecraft-server
|
||||||
|
|
||||||
|
To use a pre-downloaded Forge installer, place it in the attached `/data` directory and
|
||||||
|
specify the name of the installer file with `FORGE_INSTALLER`, such as:
|
||||||
|
|
||||||
|
$ docker run -d -v /path/on/host:/data ... \
|
||||||
|
-e FORGE_INSTALLER=forge-1.11.2-13.20.0.2228-installer.jar ...
|
||||||
|
|
||||||
|
To download a Forge installer from a custom location, such as your own file repository, specify
|
||||||
|
the URL with `FORGE_INSTALLER_URL`, such as:
|
||||||
|
|
||||||
|
$ docker run -d -v /path/on/host:/data ... \
|
||||||
|
-e FORGE_INSTALLER_URL=http://HOST/forge-1.11.2-13.20.0.2228-installer.jar ...
|
||||||
|
|
||||||
|
In both of the cases above, there is no need for the `VERSION` or `FORGEVERSION` variables.
|
||||||
|
|
||||||
In order to add mods, you have two options.
|
In order to add mods, you have two options.
|
||||||
|
|
||||||
### Using the /data volume
|
### Using the /data volume
|
||||||
@@ -159,6 +220,10 @@ Enable Bukkit/Spigot server mode by adding a `-e TYPE=BUKKIT -e VERSION=1.8` or
|
|||||||
-e TYPE=SPIGOT -e VERSION=1.8 \
|
-e TYPE=SPIGOT -e VERSION=1.8 \
|
||||||
-p 25565:25565 -e EULA=TRUE --name mc itzg/minecraft-server
|
-p 25565:25565 -e EULA=TRUE --name mc itzg/minecraft-server
|
||||||
|
|
||||||
|
If you are hosting your own copy of Bukkit/Spigot you can override the download URLs with:
|
||||||
|
* -e BUKKIT_DOWNLOAD_URL=<url>
|
||||||
|
* -e SPIGOT_DOWNLOAD_URL=<url>
|
||||||
|
|
||||||
You can build spigot from source by adding `-e BUILD_FROM_SOURCE=true`
|
You can build spigot from source by adding `-e BUILD_FROM_SOURCE=true`
|
||||||
|
|
||||||
__NOTE: to avoid pegging the CPU when running Spigot,__ you will need to
|
__NOTE: to avoid pegging the CPU when running Spigot,__ you will need to
|
||||||
@@ -224,6 +289,9 @@ pass `--noconsole` at the very end of the command line and not use `-it`. For ex
|
|||||||
-e TYPE=PAPER -e VERSION=1.9.4 \
|
-e TYPE=PAPER -e VERSION=1.9.4 \
|
||||||
-p 25565:25565 -e EULA=TRUE --name mc itzg/minecraft-server --noconsole
|
-p 25565:25565 -e EULA=TRUE --name mc itzg/minecraft-server --noconsole
|
||||||
|
|
||||||
|
If you are hosting your own copy of PaperSpigot you can override the download URL with:
|
||||||
|
* -e PAPER_DOWNLOAD_URL=<url>
|
||||||
|
|
||||||
You can install Bukkit plugins in two ways...
|
You can install Bukkit plugins in two ways...
|
||||||
|
|
||||||
### Using the /data volume
|
### Using the /data volume
|
||||||
@@ -282,6 +350,13 @@ Now you can add a `-e FTB_SERVER_MOD=name_of_modpack.zip` to your command-line.
|
|||||||
-e FTB_SERVER_MOD=FTBPresentsSkyfactory3Server_3.0.6.zip \
|
-e FTB_SERVER_MOD=FTBPresentsSkyfactory3Server_3.0.6.zip \
|
||||||
-p 25565:25565 -e EULA=TRUE --name mc itzg/minecraft-server
|
-p 25565:25565 -e EULA=TRUE --name mc itzg/minecraft-server
|
||||||
|
|
||||||
|
Instead of explicitly downloading a modpack from the Feed the Beast site, you
|
||||||
|
can you set `FTB_SERVER_MOD` to the **server** URL of a modpack, such as
|
||||||
|
|
||||||
|
$ docker run ... \
|
||||||
|
-e TYPE=FTB \
|
||||||
|
-e FTB_SERVER_MOD=https://www.feed-the-beast.com/projects/ftb-infinity-lite-1-10/files/2402889
|
||||||
|
|
||||||
### Using the /data volume
|
### Using the /data volume
|
||||||
|
|
||||||
You must use a persistent `/data` mount for this type of server.
|
You must use a persistent `/data` mount for this type of server.
|
||||||
@@ -349,7 +424,7 @@ minecraft-server:
|
|||||||
|
|
||||||
and in the same directory as that file run
|
and in the same directory as that file run
|
||||||
|
|
||||||
docker-compose -d up
|
docker-compose up -d
|
||||||
|
|
||||||
Now, go play...or adjust the `environment` section to configure
|
Now, go play...or adjust the `environment` section to configure
|
||||||
this server instance.
|
this server instance.
|
||||||
@@ -598,6 +673,20 @@ To use this option pass the environment variable `MODPACK`, such as
|
|||||||
top level of the zip archive. Make sure the jars are compatible with the
|
top level of the zip archive. Make sure the jars are compatible with the
|
||||||
particular `TYPE` of server you are running.
|
particular `TYPE` of server you are running.
|
||||||
|
|
||||||
|
### Remove old mods/plugins
|
||||||
|
|
||||||
|
When the option above is specified (`MODPACK`) you can also instruct script to
|
||||||
|
delete old mods/plugins prior to installing new ones. This behaviour is desirable
|
||||||
|
in case you want to upgrade mods/plugins from downloaded zip file.
|
||||||
|
To use this option pass the environment variable `REMOVE_OLD_MODS="TRUE"`, such as
|
||||||
|
|
||||||
|
docker run -d -e REMOVE_OLD_MODS="TRUE" -e MODPACK=http://www.example.com/mods/modpack.zip ...
|
||||||
|
|
||||||
|
**NOTE:** This option will be taken into account only when option `MODPACK` is also used.
|
||||||
|
|
||||||
|
**WARNING:** All content of the `mods` or `plugins` directory will be deleted
|
||||||
|
before unpacking new content from the zip file.
|
||||||
|
|
||||||
### Online mode
|
### Online mode
|
||||||
|
|
||||||
By default, server checks connecting players against Minecraft's account database. If you want to create an offline server or your server is not connected to the internet, you can disable the server to try connecting to minecraft.net to authenticate players with environment variable `ONLINE_MODE`, like this
|
By default, server checks connecting players against Minecraft's account database. If you want to create an offline server or your server is not connected to the internet, you can disable the server to try connecting to minecraft.net to authenticate players with environment variable `ONLINE_MODE`, like this
|
||||||
@@ -608,12 +697,23 @@ By default, server checks connecting players against Minecraft's account databas
|
|||||||
|
|
||||||
### Memory Limit
|
### Memory Limit
|
||||||
|
|
||||||
By default the image declares a Java memory limit of 1 GB. That can be adjusted
|
By default, the image declares a Java initial and maximum memory limit of 1 GB. There are several
|
||||||
higher (or lower) by setting the `MAX_MEMORY` environment variable. For example,
|
ways to adjust the memory settings:
|
||||||
the following increases the memory limit to 8 GB:
|
|
||||||
|
|
||||||
docker run -e MAX_MEMORY=8G ...
|
* `MEMORY`, "1G" by default, can be used to adjust both initial (`Xms`) and max (`Xmx`)
|
||||||
|
memory settings of the JVM
|
||||||
|
* `INIT_MEMORY`, independently sets the initial heap size
|
||||||
|
* `MAX_MEMORY`, independently sets the max heap size
|
||||||
|
|
||||||
|
The values of all three are passed directly to the JVM and support format/units as
|
||||||
|
`<size>[g|G|m|M|k|K]`.
|
||||||
|
|
||||||
### /data ownership
|
### /data ownership
|
||||||
|
|
||||||
In order to adapt to differences in `UID` and `GID` settings the entry script will attempt to correct ownership and writability of the `/data` directory. This logic can be disabled by setting `-e SKIP_OWNERSHIP_FIX=TRUE`.
|
In order to adapt to differences in `UID` and `GID` settings the entry script will attempt to correct ownership and writability of the `/data` directory. This logic can be disabled by setting `-e SKIP_OWNERSHIP_FIX=TRUE`.
|
||||||
|
|
||||||
|
### JVM Options
|
||||||
|
|
||||||
|
General JVM options can be passed to the Minecraft Server invocation by passing a `JVM_OPTS`
|
||||||
|
environment variable. Options like `-X` that need to proceed general JVM options can be passed
|
||||||
|
via a `JVM_XX_OPTS` environment variable.
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
version: '3'
|
version: '3'
|
||||||
|
|
||||||
services:
|
services:
|
||||||
minecraft-server:
|
minecraft:
|
||||||
ports:
|
ports:
|
||||||
- "25570:25565"
|
- "25565:25565"
|
||||||
volumes:
|
volumes:
|
||||||
- "mcbig:/data"
|
- "mcbig:/data"
|
||||||
environment:
|
environment:
|
||||||
@@ -16,6 +16,14 @@ services:
|
|||||||
CONSOLE: "false"
|
CONSOLE: "false"
|
||||||
image: itzg/minecraft-server
|
image: itzg/minecraft-server
|
||||||
restart: always
|
restart: always
|
||||||
|
rcon:
|
||||||
|
image: itzg/rcon
|
||||||
|
ports:
|
||||||
|
- "4326:4326"
|
||||||
|
- "4327:4327"
|
||||||
|
volumes:
|
||||||
|
- "rcon:/opt/rcon-web-admin/db"
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
mcbig:
|
mcbig:
|
||||||
|
rcon:
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
.[] |
|
.[] |
|
||||||
select(.elements | length > 1) |
|
select(.elements | length > 1) |
|
||||||
select(.elements[].elements[] | select(.class == "version" and .text == $version)) |
|
select(.elements[].elements[] | select(.class == "version" and .text == $version)) |
|
||||||
.elements[].elements[] |
|
.elements[].elements[] |
|
||||||
select(.class|contains("server-jar")) |
|
select(.class|contains("server-jar")) |
|
||||||
.elements[] | select(.name="a") |
|
.elements[] | select(.name="a") |
|
||||||
.href
|
.href
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
shopt -s nullglob
|
||||||
|
|
||||||
#umask 002
|
#umask 002
|
||||||
export HOME=/data
|
export HOME=/data
|
||||||
|
|
||||||
@@ -7,6 +9,10 @@ if [ ! -e /data/eula.txt ]; then
|
|||||||
if [ "$EULA" != "" ]; then
|
if [ "$EULA" != "" ]; then
|
||||||
echo "# Generated via Docker on $(date)" > eula.txt
|
echo "# Generated via Docker on $(date)" > eula.txt
|
||||||
echo "eula=$EULA" >> eula.txt
|
echo "eula=$EULA" >> eula.txt
|
||||||
|
if [ $? != 0 ]; then
|
||||||
|
echo "ERROR: unable to write eula to /data. Please make sure attached directory is writable by uid=${UID}"
|
||||||
|
exit 2
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
echo ""
|
echo ""
|
||||||
echo "Please accept the Minecraft EULA at"
|
echo "Please accept the Minecraft EULA at"
|
||||||
@@ -18,21 +24,28 @@ if [ ! -e /data/eula.txt ]; then
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if ! touch /data/.verify_access; then
|
||||||
|
echo "ERROR: /data doesn't seem to be writable. Please make sure attached directory is writable by uid=${UID} "
|
||||||
|
exit 2
|
||||||
|
fi
|
||||||
|
|
||||||
|
SERVER_PROPERTIES=/data/server.properties
|
||||||
|
FTB_DIR=/data/FeedTheBeast
|
||||||
VERSIONS_JSON=https://launchermeta.mojang.com/mc/game/version_manifest.json
|
VERSIONS_JSON=https://launchermeta.mojang.com/mc/game/version_manifest.json
|
||||||
|
|
||||||
echo "Checking version information."
|
echo "Checking version information."
|
||||||
case "X$VERSION" in
|
case "X$VERSION" in
|
||||||
X|XLATEST|Xlatest)
|
X|XLATEST|Xlatest)
|
||||||
VANILLA_VERSION=`curl -sSL $VERSIONS_JSON | jq -r '.latest.release'`
|
VANILLA_VERSION=`curl -fsSL $VERSIONS_JSON | jq -r '.latest.release'`
|
||||||
;;
|
;;
|
||||||
XSNAPSHOT|Xsnapshot)
|
XSNAPSHOT|Xsnapshot)
|
||||||
VANILLA_VERSION=`curl -sSL $VERSIONS_JSON | jq -r '.latest.snapshot'`
|
VANILLA_VERSION=`curl -fsSL $VERSIONS_JSON | jq -r '.latest.snapshot'`
|
||||||
;;
|
;;
|
||||||
X[1-9]*)
|
X[1-9]*)
|
||||||
VANILLA_VERSION=$VERSION
|
VANILLA_VERSION=$VERSION
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
VANILLA_VERSION=`curl -sSL $VERSIONS_JSON | jq -r '.latest.release'`
|
VANILLA_VERSION=`curl -fsSL $VERSIONS_JSON | jq -r '.latest.release'`
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
@@ -56,28 +69,32 @@ function downloadSpigot {
|
|||||||
case "$TYPE" in
|
case "$TYPE" in
|
||||||
*BUKKIT|*bukkit)
|
*BUKKIT|*bukkit)
|
||||||
match="Craftbukkit"
|
match="Craftbukkit"
|
||||||
|
downloadUrl=${BUKKIT_DOWNLOAD_URL}
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
match="Spigot"
|
match="Spigot"
|
||||||
|
downloadUrl=${SPIGOT_DOWNLOAD_URL}
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
downloadUrl=$(restify --class=jar-div https://mcadmin.net/ | \
|
if [[ -z $downloadUrl ]]; then
|
||||||
jq --arg version "$match $VANILLA_VERSION" -r -f /usr/share/mcadmin.jq)
|
downloadUrl=$(restify --class=jar-div https://mcadmin.net/ | \
|
||||||
if [[ -n $downloadUrl ]]; then
|
jq --arg version "$match $VANILLA_VERSION" -r -f /usr/share/mcadmin.jq)
|
||||||
echo "Downloading $match"
|
if [[ -z $downloadUrl ]]; then
|
||||||
wget -q -O $SERVER "$downloadUrl"
|
echo "ERROR: Version $VANILLA_VERSION is not supported for $TYPE"
|
||||||
status=$?
|
echo " Refer to https://mcadmin.net/ for supported versions"
|
||||||
if [ $status != 0 ]; then
|
exit 2
|
||||||
echo "ERROR: failed to download from $downloadUrl due to (error code was $status)"
|
|
||||||
exit 3
|
|
||||||
fi
|
fi
|
||||||
else
|
|
||||||
echo "ERROR: Version $VANILLA_VERSION is not supported for $TYPE"
|
|
||||||
echo " Refer to https://mcadmin.net/ for supported versions"
|
|
||||||
exit 2
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
echo "Downloading $match"
|
||||||
|
curl -kfsSL -o $SERVER "$downloadUrl"
|
||||||
|
status=$?
|
||||||
|
if [ ! -f $SERVER ]; then
|
||||||
|
echo "ERROR: failed to download from $downloadUrl (status=$status)"
|
||||||
|
exit 3
|
||||||
|
fi
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function downloadPaper {
|
function downloadPaper {
|
||||||
@@ -98,11 +115,11 @@ function downloadPaper {
|
|||||||
esac
|
esac
|
||||||
|
|
||||||
if [ $build != "nosupp" ]; then
|
if [ $build != "nosupp" ]; then
|
||||||
downloadUrl="https://ci.destroystokyo.com/job/PaperSpigot/$build/artifact/paperclip.jar"
|
rm $SERVER
|
||||||
wget -q -O $SERVER "$downloadUrl"
|
downloadUrl=${PAPER_DOWNLOAD_URL:-https://ci.destroystokyo.com/job/PaperSpigot/$build/artifact/paperclip.jar}
|
||||||
status=$?
|
curl -fsSL -o $SERVER "$downloadUrl"
|
||||||
if [ $status != 0 ]; then
|
if [ ! -f $SERVER ]; then
|
||||||
echo "ERROR: failed to download from $downloadUrl due to (error code was $status)"
|
echo "ERROR: failed to download from $downloadUrl (status=$?)"
|
||||||
exit 3
|
exit 3
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
@@ -115,45 +132,128 @@ function downloadPaper {
|
|||||||
|
|
||||||
function installForge {
|
function installForge {
|
||||||
TYPE=FORGE
|
TYPE=FORGE
|
||||||
norm=$VANILLA_VERSION
|
|
||||||
|
|
||||||
echo "Checking Forge version information."
|
if [[ -z $FORGE_INSTALLER && -z $FORGE_INSTALLER_URL ]]; then
|
||||||
case $FORGEVERSION in
|
norm=$VANILLA_VERSION
|
||||||
RECOMMENDED)
|
|
||||||
curl -o /tmp/forge.json -sSL http://files.minecraftforge.net/maven/net/minecraftforge/forge/promotions_slim.json
|
case $VANILLA_VERSION in
|
||||||
FORGE_VERSION=$(cat /tmp/forge.json | jq -r ".promos[\"$norm-recommended\"]")
|
*.*.*)
|
||||||
if [ $FORGE_VERSION = null ]; then
|
norm=$VANILLA_VERSION ;;
|
||||||
FORGE_VERSION=$(cat /tmp/forge.json | jq -r ".promos[\"$norm-latest\"]")
|
*.*)
|
||||||
|
norm=${VANILLA_VERSION}.0 ;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
echo "Checking Forge version information."
|
||||||
|
case $FORGEVERSION in
|
||||||
|
RECOMMENDED)
|
||||||
|
curl -fsSL -o /tmp/forge.json http://files.minecraftforge.net/maven/net/minecraftforge/forge/promotions_slim.json
|
||||||
|
FORGE_VERSION=$(cat /tmp/forge.json | jq -r ".promos[\"$VANILLA_VERSION-recommended\"]")
|
||||||
if [ $FORGE_VERSION = null ]; then
|
if [ $FORGE_VERSION = null ]; then
|
||||||
echo "ERROR: Version $FORGE_VERSION is not supported by Forge"
|
FORGE_VERSION=$(cat /tmp/forge.json | jq -r ".promos[\"$VANILLA_VERSION-latest\"]")
|
||||||
echo " Refer to http://files.minecraftforge.net/ for supported versions"
|
if [ $FORGE_VERSION = null ]; then
|
||||||
|
echo "ERROR: Version $VANILLA_VERSION is not supported by Forge"
|
||||||
|
echo " Refer to http://files.minecraftforge.net/ for supported versions"
|
||||||
|
exit 2
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
|
||||||
|
*)
|
||||||
|
FORGE_VERSION=$FORGEVERSION
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
normForgeVersion=$VANILLA_VERSION-$FORGE_VERSION-$norm
|
||||||
|
shortForgeVersion=$VANILLA_VERSION-$FORGE_VERSION
|
||||||
|
|
||||||
|
FORGE_INSTALLER="/tmp/forge-$shortForgeVersion-installer.jar"
|
||||||
|
elif [[ -z $FORGE_INSTALLER ]]; then
|
||||||
|
FORGE_INSTALLER="/tmp/forge-installer.jar"
|
||||||
|
elif [[ ! -e $FORGE_INSTALLER ]]; then
|
||||||
|
echo "ERROR: the given Forge installer doesn't exist : $FORGE_INSTALLER"
|
||||||
|
exit 2
|
||||||
|
fi
|
||||||
|
|
||||||
|
installMarker=".forge-installed-$shortForgeVersion"
|
||||||
|
|
||||||
|
if [ ! -e $installMarker ]; then
|
||||||
|
if [ ! -e $FORGE_INSTALLER ]; then
|
||||||
|
|
||||||
|
if [[ -z $FORGE_INSTALLER_URL ]]; then
|
||||||
|
echo "Downloading $normForgeVersion"
|
||||||
|
|
||||||
|
forgeFileNames="
|
||||||
|
$normForgeVersion/forge-$normForgeVersion-installer.jar
|
||||||
|
$shortForgeVersion/forge-$shortForgeVersion-installer.jar
|
||||||
|
END
|
||||||
|
"
|
||||||
|
for fn in $forgeFileNames; do
|
||||||
|
if [ $fn == END ]; then
|
||||||
|
echo "Unable to compute URL for $normForgeVersion"
|
||||||
|
exit 2
|
||||||
|
fi
|
||||||
|
downloadUrl=http://files.minecraftforge.net/maven/net/minecraftforge/forge/$fn
|
||||||
|
echo "...trying $downloadUrl"
|
||||||
|
if curl -o $FORGE_INSTALLER -fsSL $downloadUrl; then
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
else
|
||||||
|
echo "Downloading $FORGE_INSTALLER_URL ..."
|
||||||
|
if ! curl -o $FORGE_INSTALLER -fsSL $FORGE_INSTALLER_URL; then
|
||||||
|
echo "Failed to download from given location $FORGE_INSTALLER_URL"
|
||||||
exit 2
|
exit 2
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
;;
|
fi
|
||||||
|
|
||||||
*)
|
echo "Installing Forge $shortForgeVersion using $FORGE_INSTALLER"
|
||||||
FORGE_VERSION=$FORGEVERSION
|
mkdir -p mods
|
||||||
;;
|
tries=3
|
||||||
esac
|
while ((--tries >= 0)); do
|
||||||
|
java -jar $FORGE_INSTALLER --installServer
|
||||||
|
if [ $? == 0 ]; then
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
if (($tries < 0)); then
|
||||||
|
echo "Forge failed to install after several tries." >&2
|
||||||
|
exit 10
|
||||||
|
fi
|
||||||
|
|
||||||
|
# NOTE $shortForgeVersion will be empty if installer location was given to us
|
||||||
|
echo "Finding installed server jar..."
|
||||||
|
for j in *forge*.jar; do
|
||||||
|
echo "...$j"
|
||||||
|
case $j in
|
||||||
|
*installer*)
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
SERVER=$j
|
||||||
|
break
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
if [[ -z $SERVER ]]; then
|
||||||
|
echo "Unable to derive server jar for Forge"
|
||||||
|
exit 2
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "Using server $SERVER"
|
||||||
|
echo $SERVER > $installMarker
|
||||||
|
|
||||||
# URL format changed for 1.7.10 from 10.13.2.1300
|
|
||||||
sorted=$((echo $FORGE_VERSION; echo 10.13.2.1300) | sort -V | head -1)
|
|
||||||
if [[ $norm == '1.7.10' && $sorted == '10.13.2.1300' ]]; then
|
|
||||||
# if $FORGEVERSION >= 10.13.2.1300
|
|
||||||
normForgeVersion="$norm-$FORGE_VERSION-$norm"
|
|
||||||
else
|
else
|
||||||
normForgeVersion="$norm-$FORGE_VERSION"
|
SERVER=$(cat $installMarker)
|
||||||
fi
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
FORGE_INSTALLER="forge-$normForgeVersion-installer.jar"
|
function isURL {
|
||||||
SERVER="forge-$normForgeVersion-universal.jar"
|
local value=$1
|
||||||
|
|
||||||
if [ ! -e "$SERVER" ]; then
|
if [[ ${value:0:8} == "https://" || ${value:0:7} = "http://" ]]; then
|
||||||
echo "Downloading $FORGE_INSTALLER ..."
|
return 0
|
||||||
wget -q http://files.minecraftforge.net/maven/net/minecraftforge/forge/$normForgeVersion/$FORGE_INSTALLER
|
else
|
||||||
echo "Installing $SERVER"
|
return 1
|
||||||
java -jar $FORGE_INSTALLER --installServer
|
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -168,6 +268,20 @@ function installFTB {
|
|||||||
exit 2
|
exit 2
|
||||||
fi
|
fi
|
||||||
local srv_modpack=${FTB_SERVER_MOD}
|
local srv_modpack=${FTB_SERVER_MOD}
|
||||||
|
if isURL ${srv_modpack}; then
|
||||||
|
case $srv_modpack in
|
||||||
|
*/download)
|
||||||
|
break;;
|
||||||
|
*)
|
||||||
|
srv_modpack=${srv_modpack}/download;;
|
||||||
|
esac
|
||||||
|
local file=$(basename $(dirname $srv_modpack))
|
||||||
|
local downloaded=/data/${file}.zip
|
||||||
|
echo "Downloading FTB modpack...
|
||||||
|
$srv_modpack -> $downloaded"
|
||||||
|
curl -sSL -o $downloaded $srv_modpack
|
||||||
|
srv_modpack=$downloaded
|
||||||
|
fi
|
||||||
if [[ ${srv_modpack:0:5} == "data/" ]]; then
|
if [[ ${srv_modpack:0:5} == "data/" ]]; then
|
||||||
# Prepend with "/"
|
# Prepend with "/"
|
||||||
srv_modpack=/${srv_modpack}
|
srv_modpack=/${srv_modpack}
|
||||||
@@ -187,12 +301,12 @@ function installFTB {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Unpacking FTB server modpack ${srv_modpack} ..."
|
echo "Unpacking FTB server modpack ${srv_modpack} ..."
|
||||||
local ftb_dir=/data/FeedTheBeast
|
mkdir -p ${FTB_DIR}
|
||||||
mkdir -p ${ftb_dir}
|
unzip -o ${srv_modpack} -d ${FTB_DIR}
|
||||||
unzip -u -o ${srv_modpack} -d ${ftb_dir}
|
cp -f /data/eula.txt ${FTB_DIR}/eula.txt
|
||||||
cp -f /data/eula.txt ${ftb_dir}/eula.txt
|
FTB_SERVER_START=${FTB_DIR}/ServerStart.sh
|
||||||
FTB_SERVER_START=${ftb_dir}/ServerStart.sh
|
|
||||||
chmod a+x ${FTB_SERVER_START}
|
chmod a+x ${FTB_SERVER_START}
|
||||||
|
sed -i "s/-jar/-Dfml.queryResult=confirm -jar/" ${FTB_SERVER_START}
|
||||||
}
|
}
|
||||||
|
|
||||||
function installVanilla {
|
function installVanilla {
|
||||||
@@ -297,12 +411,18 @@ if [[ "$MODPACK" ]]; then
|
|||||||
case "X$MODPACK" in
|
case "X$MODPACK" in
|
||||||
X[Hh][Tt][Tt][Pp]*[Zz][iI][pP])
|
X[Hh][Tt][Tt][Pp]*[Zz][iI][pP])
|
||||||
echo "Downloading mod/plugin pack via HTTP"
|
echo "Downloading mod/plugin pack via HTTP"
|
||||||
echo "$MODPACK"
|
echo " from $MODPACK ..."
|
||||||
wget -q -O /tmp/modpack.zip "$MODPACK"
|
curl -sSL -o /tmp/modpack.zip "$MODPACK"
|
||||||
if [ "$TYPE" = "SPIGOT" ]; then
|
if [ "$TYPE" = "SPIGOT" ]; then
|
||||||
|
if [ "$REMOVE_OLD_MODS" = "TRUE" ]; then
|
||||||
|
rm -rf /data/plugins/*
|
||||||
|
fi
|
||||||
mkdir -p /data/plugins
|
mkdir -p /data/plugins
|
||||||
unzip -o -d /data/plugins /tmp/modpack.zip
|
unzip -o -d /data/plugins /tmp/modpack.zip
|
||||||
else
|
else
|
||||||
|
if [ "$REMOVE_OLD_MODS" = "TRUE" ]; then
|
||||||
|
rm -rf /data/mods/*
|
||||||
|
fi
|
||||||
mkdir -p /data/mods
|
mkdir -p /data/mods
|
||||||
unzip -o -d /data/mods /tmp/modpack.zip
|
unzip -o -d /data/mods /tmp/modpack.zip
|
||||||
fi
|
fi
|
||||||
@@ -314,6 +434,28 @@ case "X$MODPACK" in
|
|||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# If supplied with a URL for a config (simple zip of configurations), download it and unpack
|
||||||
|
if [[ "$MODCONFIG" ]]; then
|
||||||
|
case "X$MODCONFIG" in
|
||||||
|
X[Hh][Tt][Tt][Pp]*[Zz][iI][pP])
|
||||||
|
echo "Downloading mod/plugin configs via HTTP"
|
||||||
|
echo " from $MODCONFIG ..."
|
||||||
|
curl -sSL -o /tmp/modconfig.zip "$MODCONFIG"
|
||||||
|
if [ "$TYPE" = "SPIGOT" ]; then
|
||||||
|
mkdir -p /data/plugins
|
||||||
|
unzip -o -d /data/plugins /tmp/modconfig.zip
|
||||||
|
else
|
||||||
|
mkdir -p /data/config
|
||||||
|
unzip -o -d /data/config /tmp/modconfig.zip
|
||||||
|
fi
|
||||||
|
rm -f /tmp/modconfig.zip
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "Invalid URL given for modconfig: Must be HTTP or HTTPS and a ZIP file"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
|
||||||
function setServerProp {
|
function setServerProp {
|
||||||
local prop=$1
|
local prop=$1
|
||||||
local var=$2
|
local var=$2
|
||||||
@@ -338,11 +480,10 @@ if [ ! -e server.properties ]; then
|
|||||||
setServerProp "allow-nether" "$ALLOW_NETHER"
|
setServerProp "allow-nether" "$ALLOW_NETHER"
|
||||||
setServerProp "announce-player-achievements" "$ANNOUNCE_PLAYER_ACHIEVEMENTS"
|
setServerProp "announce-player-achievements" "$ANNOUNCE_PLAYER_ACHIEVEMENTS"
|
||||||
setServerProp "enable-command-block" "$ENABLE_COMMAND_BLOCK"
|
setServerProp "enable-command-block" "$ENABLE_COMMAND_BLOCK"
|
||||||
setServerProp "spawn-animals" "$SPAWN_ANIMAILS"
|
setServerProp "spawn-animals" "$SPAWN_ANIMALS"
|
||||||
setServerProp "spawn-monsters" "$SPAWN_MONSTERS"
|
setServerProp "spawn-monsters" "$SPAWN_MONSTERS"
|
||||||
setServerProp "spawn-npcs" "$SPAWN_NPCS"
|
setServerProp "spawn-npcs" "$SPAWN_NPCS"
|
||||||
setServerProp "generate-structures" "$GENERATE_STRUCTURES"
|
setServerProp "generate-structures" "$GENERATE_STRUCTURES"
|
||||||
setServerProp "spawn-npcs" "$SPAWN_NPCS"
|
|
||||||
setServerProp "view-distance" "$VIEW_DISTANCE"
|
setServerProp "view-distance" "$VIEW_DISTANCE"
|
||||||
setServerProp "hardcore" "$HARDCORE"
|
setServerProp "hardcore" "$HARDCORE"
|
||||||
setServerProp "max-build-height" "$MAX_BUILD_HEIGHT"
|
setServerProp "max-build-height" "$MAX_BUILD_HEIGHT"
|
||||||
@@ -363,11 +504,11 @@ if [ ! -e server.properties ]; then
|
|||||||
|
|
||||||
if [ -n "$LEVEL_TYPE" ]; then
|
if [ -n "$LEVEL_TYPE" ]; then
|
||||||
# normalize to uppercase
|
# normalize to uppercase
|
||||||
LEVEL_TYPE=${LEVEL_TYPE^^}
|
LEVEL_TYPE=$( echo ${LEVEL_TYPE} | tr '[:lower:]' '[:upper:]' )
|
||||||
echo "Setting level type to $LEVEL_TYPE"
|
echo "Setting level type to $LEVEL_TYPE"
|
||||||
# check for valid values and only then set
|
# check for valid values and only then set
|
||||||
case $LEVEL_TYPE in
|
case $LEVEL_TYPE in
|
||||||
DEFAULT|FLAT|LARGEBIOMES|AMPLIFIED|CUSTOMIZED)
|
DEFAULT|FLAT|LARGEBIOMES|AMPLIFIED|CUSTOMIZED|BIOMESOP)
|
||||||
sed -i "/level-type\s*=/ c level-type=$LEVEL_TYPE" /data/server.properties
|
sed -i "/level-type\s*=/ c level-type=$LEVEL_TYPE" /data/server.properties
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
@@ -402,7 +543,8 @@ if [ ! -e server.properties ]; then
|
|||||||
|
|
||||||
if [ -n "$MODE" ]; then
|
if [ -n "$MODE" ]; then
|
||||||
echo "Setting mode"
|
echo "Setting mode"
|
||||||
case ${MODE,,?} in
|
MODE_LC=$( echo $MODE | tr '[:upper:]' '[:lower:]' )
|
||||||
|
case $MODE_LC in
|
||||||
0|1|2|3)
|
0|1|2|3)
|
||||||
;;
|
;;
|
||||||
su*)
|
su*)
|
||||||
@@ -423,7 +565,7 @@ if [ ! -e server.properties ]; then
|
|||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
sed -i "/gamemode\s*=/ c gamemode=$MODE" /data/server.properties
|
sed -i "/^gamemode\s*=/ c gamemode=$MODE" $SERVER_PROPERTIES
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -451,21 +593,21 @@ if [ -n "$ICON" -a ! -e server-icon.png ]; then
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Make sure files exist to avoid errors
|
# Make sure files exist and are valid JSON (for pre-1.12 to 1.12 upgrades)
|
||||||
if [ ! -e banned-players.json ]; then
|
for j in *.json; do
|
||||||
echo '' > banned-players.json
|
if [[ $(python -c "print open('$j').read().strip()==''") = True ]]; then
|
||||||
fi
|
echo "Fixing JSON $j"
|
||||||
if [ ! -e banned-ips.json ]; then
|
echo '[]' > $j
|
||||||
echo '' > banned-ips.json
|
fi
|
||||||
fi
|
done
|
||||||
|
|
||||||
# If any modules have been provided, copy them over
|
# If any modules have been provided, copy them over
|
||||||
[ -d /data/mods ] || mkdir /data/mods
|
mkdir -p /data/mods
|
||||||
for m in /mods/*.jar
|
for m in /mods/*.{jar,zip}
|
||||||
do
|
do
|
||||||
if [ -f "$m" ]; then
|
if [ -f "$m" -a ! -f "/data/mods/$m" ]; then
|
||||||
echo Copying mod `basename "$m"`
|
echo Copying mod `basename "$m"`
|
||||||
cp -f "$m" /data/mods
|
cp "$m" /data/mods
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
[ -d /data/config ] || mkdir /data/config
|
[ -d /data/config ] || mkdir /data/config
|
||||||
@@ -484,18 +626,25 @@ if [ "$TYPE" = "SPIGOT" ]; then
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ $CONSOLE = false ]]; then
|
EXTRA_ARGS=""
|
||||||
EXTRA_ARGS=--noconsole
|
# Optional disable console
|
||||||
else
|
if [[ ${CONSOLE} = false || ${CONSOLE} = FALSE ]]; then
|
||||||
EXTRA_ARGS=""
|
EXTRA_ARGS+="--noconsole"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ ! -z $MAX_MEMORY ]]; then
|
# Optional disable GUI for headless servers
|
||||||
# put prior JVM_OPTS at the end to give any memory settings there higher precedence
|
if [[ ${GUI} = false || ${GUI} = FALSE ]]; then
|
||||||
JVM_OPTS="-Xms${MAX_MEMORY} -Xmx${MAX_MEMORY} ${JVM_OPTS}"
|
EXTRA_ARGS="${EXTRA_ARGS} nogui"
|
||||||
fi
|
fi
|
||||||
set -x
|
|
||||||
|
# put these prior JVM_OPTS at the end to give any memory settings there higher precedence
|
||||||
|
echo "Setting initial memory to ${INIT_MEMORY:-${MEMORY}} and max to ${MAX_MEMORY:-${MEMORY}}"
|
||||||
|
JVM_OPTS="-Xms${INIT_MEMORY:-${MEMORY}} -Xmx${MAX_MEMORY:-${MEMORY}} ${JVM_OPTS}"
|
||||||
|
|
||||||
if [[ ${TYPE} == "FEED-THE-BEAST" ]]; then
|
if [[ ${TYPE} == "FEED-THE-BEAST" ]]; then
|
||||||
|
cp -f $SERVER_PROPERTIES ${FTB_DIR}/server.properties
|
||||||
|
cp -f /data/{eula,ops,white-list}.txt ${FTB_DIR}/
|
||||||
|
cd ${FTB_DIR}
|
||||||
echo "Running FTB server modpack start ..."
|
echo "Running FTB server modpack start ..."
|
||||||
exec sh ${FTB_SERVER_START}
|
exec sh ${FTB_SERVER_START}
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -1,13 +1,13 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
usermod --uid $UID minecraft
|
sed -i "/^minecraft/s/:1000:1000:/:${UID}:${GID}:/g" /etc/passwd
|
||||||
groupmod --gid $GID minecraft
|
sed -i "/^minecraft/s/:1000:/:${GID}:/g" /etc/group
|
||||||
|
|
||||||
if [ "$SKIP_OWNERSHIP_FIX" != "TRUE" ]; then
|
if [ "$SKIP_OWNERSHIP_FIX" != "TRUE" ]; then
|
||||||
fix_ownership() {
|
fix_ownership() {
|
||||||
dir=$1
|
dir=$1
|
||||||
if ! sudo -u minecraft test -w $dir; then
|
if ! su-exec minecraft test -w $dir; then
|
||||||
echo "Correcting writability of $dir ..."
|
echo "Correcting writability of $dir ..."
|
||||||
chown -R minecraft:minecraft $dir
|
chown -R minecraft:minecraft $dir
|
||||||
chmod -R u+w $dir
|
chmod -R u+w $dir
|
||||||
@@ -19,4 +19,4 @@ if [ "$SKIP_OWNERSHIP_FIX" != "TRUE" ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Switching to user 'minecraft'"
|
echo "Switching to user 'minecraft'"
|
||||||
exec sudo -E -u minecraft /start-minecraft "$@"
|
su-exec minecraft /start-minecraft $@
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
FROM itzg/gvm
|
FROM itzg/gvm
|
||||||
|
|
||||||
MAINTAINER itzg
|
LABEL maintainer "itzg"
|
||||||
|
|
||||||
RUN ["/run", "install", "springboot"]
|
RUN ["/run", "install", "springboot"]
|
||||||
|
|
||||||
|
|||||||
@@ -1,11 +1,12 @@
|
|||||||
FROM itzg/ubuntu-openjdk-7
|
FROM openjdk:8-jre
|
||||||
|
|
||||||
MAINTAINER itzg
|
LABEL maintainer "itzg"
|
||||||
|
|
||||||
ENV TITAN_VERSION 0.5.4
|
ENV TITAN_VERSION 0.5.4
|
||||||
|
|
||||||
RUN wget -q -O /tmp/titan.zip http://s3.thinkaurelius.com/downloads/titan/titan-$TITAN_VERSION-hadoop2.zip
|
ADD http://s3.thinkaurelius.com/downloads/titan/titan-$TITAN_VERSION-hadoop2.zip /tmp/titan.zip
|
||||||
RUN unzip -q /tmp/titan.zip -d /opt && rm /tmp/titan.zip
|
RUN unzip -q /tmp/titan.zip -d /opt && \
|
||||||
|
rm /tmp/titan.zip
|
||||||
|
|
||||||
ENV TITAN_HOME /opt/titan-$TITAN_VERSION-hadoop2
|
ENV TITAN_HOME /opt/titan-$TITAN_VERSION-hadoop2
|
||||||
WORKDIR $TITAN_HOME
|
WORKDIR $TITAN_HOME
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
FROM itzg/ubuntu-openjdk-7
|
FROM itzg/ubuntu-openjdk-7
|
||||||
|
|
||||||
MAINTAINER itzg
|
LABEL maintainer "itzg"
|
||||||
|
|
||||||
ENV APT_GET_UPDATE 2014-07-19
|
ENV APT_GET_UPDATE 2014-07-19
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
FROM ubuntu:trusty
|
FROM ubuntu:trusty
|
||||||
|
|
||||||
MAINTAINER itzg
|
LABEL maintainer "itzg"
|
||||||
|
|
||||||
ENV APT_GET_UPDATE 2015-10-29
|
ENV APT_GET_UPDATE 2015-10-29
|
||||||
RUN apt-get update
|
RUN apt-get update
|
||||||
|
|||||||
Reference in New Issue
Block a user