Skip to content

Commit

Permalink
Test Server Dockerfile (#1775)
Browse files Browse the repository at this point in the history
## Docker
A Dockerfile has been added for a test server image. This can be spun up
using the compose.yml file with `docker-compose up`

## Aliases in plugin.yml
Some aliases in the plugin.yml were modified to not use special
characters, as this can result in the plugin being unusable on some
servers due to the plugin.yml being unable to be parsed.
  • Loading branch information
dmccoystephenson authored Jan 19, 2024
1 parent 7168da8 commit c7b1f26
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 2 deletions.
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

0 comments on commit c7b1f26

Please sign in to comment.