forked from External/mage
36 lines
1.2 KiB
Docker
36 lines
1.2 KiB
Docker
FROM eclipse-temurin:11
|
|
|
|
# Set XMage config defaults
|
|
ENV LANG=C.UTF-8 \
|
|
XMAGE_DOCKER_SERVER_ADDRESS="0.0.0.0" \
|
|
XMAGE_DOCKER_PORT="17171" \
|
|
XMAGE_DOCKER_SEONDARY_BIND_PORT="17179" \
|
|
XMAGE_DOCKER_MAX_SECONDS_IDLE="600" \
|
|
XMAGE_DOCKER_AUTHENTICATION_ACTIVATED="false" \
|
|
XMAGE_DOCKER_SERVER_NAME="mage-server" \
|
|
XMAGE_DOCKER_MAILGUN_API_KEY="" \
|
|
XMAGE_DOCKER_MAILGUN_DOMAIN="" \
|
|
XMAGE_DOCKER_MAIL_SMTP_HOST="" \
|
|
XMAGE_DOCKER_MAIL_SMTP_PORT="" \
|
|
XMAGE_DOCKER_MAIL_USER="" \
|
|
XMAGE_DOCKER_MAIL_PASSWORD="" \
|
|
XMAGE_DOCKER_MAIL_FROM_ADDRESS="" \
|
|
XMAGE_DOCKER_MAX_GAME_THREADS="10" \
|
|
XMAGE_DOCKER_MAX_AI_OPPONENTS="15" \
|
|
XMAGE_DOCKER_JAVA_OPTS="-Xmx1024m -XX:MaxPermSize=384m -Dlog4j.configuration=file:./config/log4j.properties"
|
|
# Install dependencies
|
|
RUN set -ex && \
|
|
apt update && \
|
|
apt install -y curl ca-certificates bash jq unzip
|
|
|
|
# Download latest xmage
|
|
WORKDIR /xmage
|
|
|
|
RUN <<EOF
|
|
wget $(curl -Ls -o /dev/null -w %{url_effective} "https://git.cef.icu/Failure/foul-magics/actions/runs/latest" | sed 's/$/\/artifacts\/server.zip/')
|
|
unzip server.zip
|
|
unzip mage-server.zip
|
|
rm server.zip mage-server.zip
|
|
EOF
|
|
|
|
CMD ["./dockerRun.sh"]
|