Compare commits

...

21 Commits

Author SHA1 Message Date
Geoff Bourne
5c6a2cf44f [mc] Use a probing approach to find Forge URL and launcher name
For #91 and #153
2017-05-28 20:55:09 -05:00
Geoff Bourne
536a7f6095 [mc] Adapt Forge install run for 1.6-1.10
For #153
2017-05-28 11:37:08 -05:00
Geoff Bourne
df9e725baf [es] Add kibana to the compose example 2017-05-27 10:21:59 -05:00
Geoff Bourne
156716a7d8 Merge branch 'feat/ftb-download-config'
Fixes #151
2017-05-26 20:09:03 -05:00
Geoff Bourne
0876ef7704 Copy additional meta files into FTB directory 2017-05-26 20:07:26 -05:00
Geoff Bourne
5c3ea25ff3 Merge pull request #152 from dschaper/patch-3
Add optional `nogui`
2017-05-20 11:20:20 -05:00
Geoff Bourne
bd8e0cf5d2 Fix FTB download and copy adjusted properties into FTB dir 2017-05-20 10:56:32 -05:00
Dan Schaper
1d5c4e3b0b Check both upper and lower arguments 2017-05-19 21:32:52 -07:00
Dan Schaper
6a565692a0 Add optional nogui
If set via ENV, disable GUI on server.
2017-05-19 19:53:45 -07:00
Geoff Bourne
cf68446a00 Add option to download FTB server zip 2017-05-19 20:44:59 -05:00
Geoff Bourne
c4a92f6706 Merge pull request #150 from jackwilsdon/curl-insecure
Use cURL insecurely when downloading
2017-05-12 17:14:50 -05:00
Jack Wilsdon
7bb397a031 Use cURL insecurely when downloading
This fixes an error caused by the expired certificate on ci.mcadmin.net.
2017-05-12 21:10:57 +01:00
Geoff Bourne
d86f034e96 [mc] Add python package and improve Forge install robustness
For #148
2017-05-08 22:35:37 -05:00
Geoff Bourne
20385507d8 [mc] Add mysql-client package for mods that need it
For #145
2017-05-05 20:46:35 -05:00
Geoff Bourne
91def1176d [mc] Run FTB server in its directory to support legacy
For #144
2017-05-05 20:18:31 -05:00
Geoff Bourne
2e03ee4197 [es] Upgrade to 5.4.0 2017-05-04 21:43:01 -05:00
Geoff Bourne
e8dd60a831 [cass] Remove deprecated image from build script 2017-05-02 19:49:40 -05:00
Geoff Bourne
dc15094b8a [gremlin] Switch to openjdk:8 base 2017-05-02 19:42:47 -05:00
Geoff Bourne
fc807429e4 Merge pull request #143 from ben-st/label
change deprecated maintainer to label
2017-05-02 19:24:12 -05:00
Benjamin
5ec21fc0ba change deprecated maintainer to label 2017-05-02 21:29:17 +02:00
Geoff Bourne
3a0a8a9ced [es] avoid auto-test for now 2017-04-29 14:16:08 -05:00
17 changed files with 152 additions and 65 deletions

2
build
View File

@@ -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

View File

@@ -1,10 +1,10 @@
FROM openjdk:8u121-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.3.2 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 && \

View File

@@ -187,7 +187,7 @@ large cluster
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:
@@ -210,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

View File

@@ -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"]

View File

@@ -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

View File

@@ -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"]

View File

@@ -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 \

View File

@@ -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

View File

@@ -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

View File

@@ -1,7 +1,7 @@
FROM alpine FROM alpine
MAINTAINER itzg LABEL maintainer "itzg"
RUN echo "http://dl-3.alpinelinux.org/alpine/v3.5/community/" >> /etc/apk/repositories &&\ RUN echo "http://dl-3.alpinelinux.org/alpine/v3.5/community/" >> /etc/apk/repositories &&\
apk update && \ apk update && \
@@ -14,7 +14,9 @@ RUN echo "http://dl-3.alpinelinux.org/alpine/v3.5/community/" >> /etc/apk/reposi
bash \ bash \
curl \ curl \
git \ git \
jq &&\ jq \
mysql-client \
python python-dev && \
rm -rf /var/cache/apk/* rm -rf /var/cache/apk/*
RUN addgroup -g 1000 minecraft \ RUN addgroup -g 1000 minecraft \

View File

@@ -307,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.

View File

@@ -18,6 +18,8 @@ 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."
@@ -75,7 +77,7 @@ function downloadSpigot {
fi fi
echo "Downloading $match" echo "Downloading $match"
curl -fsSL -o $SERVER "$downloadUrl" curl -kfsSL -o $SERVER "$downloadUrl"
status=$? status=$?
if [ ! -f $SERVER ]; then if [ ! -f $SERVER ]; then
echo "ERROR: failed to download from $downloadUrl (status=$status)" echo "ERROR: failed to download from $downloadUrl (status=$status)"
@@ -121,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 -fsSL -o /tmp/forge.json 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
@@ -141,25 +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 | 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
downloadUrl="http://files.minecraftforge.net/maven/net/minecraftforge/forge/$normForgeVersion/$FORGE_INSTALLER" if [[ ${value:0:8} == "https://" || ${value:0:7} = "http://" ]]; then
return 0
if [ ! -e "$SERVER" ]; then else
echo "Downloading $FORGE_INSTALLER ..." return 1
wget -q $downloadUrl
echo "Installing $SERVER"
java -jar $FORGE_INSTALLER --installServer
fi fi
} }
@@ -174,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}
@@ -193,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 -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 {
@@ -303,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
@@ -430,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
@@ -467,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
@@ -491,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
# Optional disable GUI for headless servers
if [[ ${GUI} = false || ${GUI} = FALSE ]]; then
EXTRA_ARGS="${EXTRA_ARGS} nogui"
fi fi
# put these prior JVM_OPTS at the end to give any memory settings there higher precedence # 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}}" 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}" JVM_OPTS="-Xms${INIT_MEMORY:-${MEMORY}} -Xmx${MAX_MEMORY:-${MEMORY}} ${JVM_OPTS}"
set -x
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

View File

@@ -1,6 +1,6 @@
FROM itzg/gvm FROM itzg/gvm
MAINTAINER itzg LABEL maintainer "itzg"
RUN ["/run", "install", "springboot"] RUN ["/run", "install", "springboot"]

View File

@@ -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

View File

@@ -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

View File

@@ -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