[mc] Add python package and improve Forge install robustness

For #148
This commit is contained in:
Geoff Bourne 2017-05-08 22:35:37 -05:00
parent 20385507d8
commit d86f034e96
2 changed files with 13 additions and 2 deletions

View File

@ -15,7 +15,8 @@ RUN echo "http://dl-3.alpinelinux.org/alpine/v3.5/community/" >> /etc/apk/reposi
curl \
git \
jq \
mysql-client &&\
mysql-client \
python python-dev && \
rm -rf /var/cache/apk/*
RUN addgroup -g 1000 minecraft \

View File

@ -159,7 +159,17 @@ function installForge {
echo "Downloading $FORGE_INSTALLER ..."
wget -q $downloadUrl
echo "Installing $SERVER"
java -jar $FORGE_INSTALLER --installServer
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
fi
}