mirror of
https://github.com/itzg/docker-minecraft-server.git
synced 2026-02-22 17:16:23 +00:00
Compare commits
47 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
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,10 +1,10 @@
|
|||||||
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
|
ENV ES_VERSION=5.4.0
|
||||||
|
|
||||||
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 && \
|
||||||
|
|||||||
@@ -181,12 +181,13 @@ 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
|
* `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 eligble
|
||||||
|
|
||||||
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 +210,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
|
||||||
|
|||||||
44
elasticsearch/docker-compose-localbuild.yml
Normal file
44
elasticsearch/docker-compose-localbuild.yml
Normal file
@@ -0,0 +1,44 @@
|
|||||||
|
version: '3'
|
||||||
|
|
||||||
|
services:
|
||||||
|
master:
|
||||||
|
build: .
|
||||||
|
environment:
|
||||||
|
TYPE: MASTER
|
||||||
|
UNICAST_HOSTS: master
|
||||||
|
MIN_MASTERS: 1
|
||||||
|
deploy:
|
||||||
|
replicas: 1
|
||||||
|
update_config:
|
||||||
|
parallelism: 1
|
||||||
|
data:
|
||||||
|
build: .
|
||||||
|
environment:
|
||||||
|
TYPE: DATA
|
||||||
|
UNICAST_HOSTS: master
|
||||||
|
deploy:
|
||||||
|
replicas: 2
|
||||||
|
update_config:
|
||||||
|
parallelism: 1
|
||||||
|
delay: 60s
|
||||||
|
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
|
||||||
|
ports:
|
||||||
|
- "5601:5601"
|
||||||
|
environment:
|
||||||
|
ELASTICSEARCH_URL: http://gateway: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,19 @@ 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"
|
||||||
|
;;
|
||||||
|
|
||||||
|
INGEST)
|
||||||
|
OPTS="$OPTS -E node.master=false -E node.data=false -E node.ingest=true"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
DATA|NON_MASTER)
|
DATA|NON_MASTER)
|
||||||
OPTS="$OPTS -E node.master=false -E node.data=true"
|
OPTS="$OPTS -E node.master=false -E node.data=true -E node.ingest=false"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
*)
|
*)
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
FROM java:8
|
FROM java:8
|
||||||
|
|
||||||
MAINTAINER itzg
|
LABEL maintainer "itzg"
|
||||||
|
|
||||||
ENV GITBLIT_VERSION 1.7.1
|
ENV GITBLIT_VERSION 1.7.1
|
||||||
|
|
||||||
|
|||||||
@@ -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 alpine
|
||||||
|
|
||||||
MAINTAINER itzg
|
|
||||||
|
|
||||||
ENV APT_GET_UPDATE 2016-04-23
|
LABEL maintainer "itzg"
|
||||||
RUN apt-get update
|
|
||||||
|
|
||||||
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y \
|
RUN echo "http://dl-3.alpinelinux.org/alpine/v3.5/community/" >> /etc/apk/repositories &&\
|
||||||
imagemagick \
|
apk update && \
|
||||||
lsof \
|
apk add \
|
||||||
nano \
|
openjdk8-jre-base \
|
||||||
sudo \
|
openssl \
|
||||||
vim \
|
imagemagick \
|
||||||
jq \
|
lsof \
|
||||||
&& apt-get clean
|
su-exec \
|
||||||
|
bash \
|
||||||
|
curl \
|
||||||
|
git \
|
||||||
|
jq \
|
||||||
|
mysql-client \
|
||||||
|
python python-dev && \
|
||||||
|
rm -rf /var/cache/apk/*
|
||||||
|
|
||||||
RUN useradd -s /bin/false --uid 1000 minecraft \
|
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>
|
||||||
@@ -35,6 +35,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
|
||||||
@@ -159,6 +177,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 +246,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 +307,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 +381,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.
|
||||||
@@ -608,11 +640,16 @@ 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
|
||||||
|
|
||||||
|
|||||||
@@ -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:
|
||||||
|
|||||||
@@ -18,21 +18,23 @@ if [ ! -e /data/eula.txt ]; then
|
|||||||
fi
|
fi
|
||||||
fi
|
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 +58,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 +104,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
|
||||||
@@ -117,15 +123,22 @@ function installForge {
|
|||||||
TYPE=FORGE
|
TYPE=FORGE
|
||||||
norm=$VANILLA_VERSION
|
norm=$VANILLA_VERSION
|
||||||
|
|
||||||
|
case $VANILLA_VERSION in
|
||||||
|
*.*.*)
|
||||||
|
norm=$VANILLA_VERSION ;;
|
||||||
|
*.*)
|
||||||
|
norm=${VANILLA_VERSION}.0 ;;
|
||||||
|
esac
|
||||||
|
|
||||||
echo "Checking Forge version information."
|
echo "Checking Forge version information."
|
||||||
case $FORGEVERSION in
|
case $FORGEVERSION in
|
||||||
RECOMMENDED)
|
RECOMMENDED)
|
||||||
curl -o /tmp/forge.json -sSL http://files.minecraftforge.net/maven/net/minecraftforge/forge/promotions_slim.json
|
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[\"$norm-recommended\"]")
|
FORGE_VERSION=$(cat /tmp/forge.json | jq -r ".promos[\"$VANILLA_VERSION-recommended\"]")
|
||||||
if [ $FORGE_VERSION = null ]; then
|
if [ $FORGE_VERSION = null ]; then
|
||||||
FORGE_VERSION=$(cat /tmp/forge.json | jq -r ".promos[\"$norm-latest\"]")
|
FORGE_VERSION=$(cat /tmp/forge.json | jq -r ".promos[\"$VANILLA_VERSION-latest\"]")
|
||||||
if [ $FORGE_VERSION = null ]; then
|
if [ $FORGE_VERSION = null ]; then
|
||||||
echo "ERROR: Version $FORGE_VERSION is not supported by Forge"
|
echo "ERROR: Version $VANILLA_VERSION is not supported by Forge"
|
||||||
echo " Refer to http://files.minecraftforge.net/ for supported versions"
|
echo " Refer to http://files.minecraftforge.net/ for supported versions"
|
||||||
exit 2
|
exit 2
|
||||||
fi
|
fi
|
||||||
@@ -137,23 +150,67 @@ function installForge {
|
|||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
# URL format changed for 1.7.10 from 10.13.2.1300
|
normForgeVersion=$VANILLA_VERSION-$FORGE_VERSION-$norm
|
||||||
sorted=$((echo $FORGE_VERSION; echo 10.13.2.1300) | sort -V | head -1)
|
shortForgeVersion=$VANILLA_VERSION-$FORGE_VERSION
|
||||||
if [[ $norm == '1.7.10' && $sorted == '10.13.2.1300' ]]; then
|
|
||||||
# if $FORGEVERSION >= 10.13.2.1300
|
forgeFileNames="
|
||||||
normForgeVersion="$norm-$FORGE_VERSION-$norm"
|
$normForgeVersion/forge-$normForgeVersion-installer.jar
|
||||||
|
$shortForgeVersion/forge-$shortForgeVersion-installer.jar
|
||||||
|
END
|
||||||
|
"
|
||||||
|
|
||||||
|
FORGE_INSTALLER="/tmp/forge-$shortForgeVersion-installer.jar"
|
||||||
|
installMarker=".forge-installed-$shortForgeVersion"
|
||||||
|
|
||||||
|
if [ ! -e $installMarker ]; then
|
||||||
|
if [ ! -e $FORGE_INSTALLER ]; then
|
||||||
|
echo "Downloading $normForgeVersion"
|
||||||
|
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
|
||||||
|
|
||||||
|
echo "Installing Forge $shortForgeVersion"
|
||||||
|
mkdir -p mods
|
||||||
|
tries=3
|
||||||
|
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
|
||||||
|
SERVER=$(ls *forge*$shortForgeVersion*.jar)
|
||||||
|
if [ -z $SERVER ]; then
|
||||||
|
echo "Unable to derive server jar for Forge $shortForgeVersion"
|
||||||
|
exit 2
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "Using server $SERVER"
|
||||||
|
echo $SERVER > $installMarker
|
||||||
|
fi
|
||||||
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 +225,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 +258,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,8 +368,8 @@ 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
|
||||||
mkdir -p /data/plugins
|
mkdir -p /data/plugins
|
||||||
unzip -o -d /data/plugins /tmp/modpack.zip
|
unzip -o -d /data/plugins /tmp/modpack.zip
|
||||||
@@ -363,7 +434,7 @@ 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
|
||||||
@@ -402,7 +473,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 +495,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
|
||||||
|
|
||||||
@@ -460,12 +532,12 @@ if [ ! -e banned-ips.json ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# 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 +556,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