Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test Server Dockerfile #1775

Merged
merged 1 commit into from
Jan 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
FROM ubuntu

# Install dependencies
RUN apt-get update
RUN apt-get install -y git \
openjdk-17-jdk \
openjdk-17-jre \
wget \
locales

# Create server directory
WORKDIR /testmcserver

# Build server
RUN wget -O BuildTools.jar https://hub.spigotmc.org/jenkins/job/BuildTools/lastSuccessfulBuild/artifact/target/BuildTools.jar
RUN git config --global --unset core.autocrlf || :
RUN java -jar BuildTools.jar --rev 1.20.4
RUN echo "eula=true" > eula.txt
RUN mkdir plugins

# set locale to support us, de, fr, & br
RUN locale-gen en_US.UTF-8 de_DE.UTF-8 fr_FR.UTF-8 pt_BR.UTF-8 && \
update-locale LANG=en_US.UTF-8 LANGUAGE=en_US.UTF-8 LC_ALL=en_US.UTF-8 && \
dpkg-reconfigure --frontend=noninteractive locales

# Build plugin
COPY . .
RUN ./gradlew build
RUN cp build/libs/*-all.jar plugins

# Run server
EXPOSE 25565
ENTRYPOINT java -jar spigot-1.20.4.jar
7 changes: 7 additions & 0 deletions compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
services:
testmcserver:
build: .
image: mf-test-mc-server
container_name: mf-test-mc-server
ports:
- "25565:25565"
4 changes: 2 additions & 2 deletions src/main/resources/plugin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,11 @@ commands:
usage: /<command> [help|ally|breakalliance|declarewar|makepeace|create|invite|join|law|role|list|claim|unclaim|checkclaim|unclaimall|power|who|invoke|leave|vassalize|swearfealty|declareindependence|grantindependence|kick|map|sethome|home|flag|bypass|chat|set|bonuspower|relationship]
lock:
description: Enables or disables lock mode. To cancel lock mode, use /lock cancel.
aliases: [verschließen, verschliessen, verrouiller]
aliases: [verschlieBen, verschliessen, verrouiller]
usage: /<command> (cancel)
unlock:
description: Enables or disables unlock mode. To cancel unlock mode, use /unlock cancel.
aliases: [aufschließen, aufschliessen, déverrouiller, deverrouiller]
aliases: [aufschlieBen, aufschliessen, deverrouiller, deverrouiller]
usage: /<command> (cancel)
accessors:
description: |
Expand Down