-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
## Changes A dockerfile including a dynmap installation has been added for testing purposes. This is intended to make testing the plugin with dynmap easier. ### Why build from source? I would have downloaded the JAR, but it cannot be retrieved with 'wget' and the developers prohibit redistribution. ## Relevant Issue closes #1782
- Loading branch information
1 parent
b842b77
commit dd86742
Showing
3 changed files
with
59 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
FROM ubuntu | ||
|
||
# Install dependencies | ||
RUN apt-get update | ||
RUN apt-get install -y git \ | ||
openjdk-17-jdk \ | ||
openjdk-17-jre \ | ||
wget \ | ||
git | ||
|
||
# Create server directory | ||
WORKDIR /testmcserver | ||
|
||
# Clone & build dynmap (placed here to take advantage of docker caching) | ||
RUN git clone https://github.com/webbukkit/dynmap | ||
WORKDIR /testmcserver/dynmap | ||
RUN /testmcserver/dynmap/gradlew :spigot:build | ||
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 | ||
|
||
# Build plugin | ||
COPY . /testmcserver/MedievalFactions | ||
WORKDIR /testmcserver/MedievalFactions | ||
RUN /testmcserver/MedievalFactions/gradlew build | ||
WORKDIR /testmcserver | ||
|
||
# Install plugin | ||
RUN cp /testmcserver/MedievalFactions/build/libs/*-all.jar /testmcserver/plugins | ||
|
||
# Install dynmap | ||
RUN cp /testmcserver/dynmap/target/Dynmap-*.jar /testmcserver/plugins | ||
|
||
# Run server | ||
EXPOSE 25565 | ||
ENTRYPOINT java -jar spigot-1.20.4.jar |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
services: | ||
testmcserver: | ||
build: | ||
context: . | ||
dockerfile: Dockerfile.dynmap | ||
image: mf-test-mc-server-with-dynmap | ||
container_name: mf-test-mc-server-with-dynmap | ||
ports: | ||
- "25565:25565" | ||
- "8123:8123" |