Building Container Images
When deploying BlueDragon with Docker or Kubernetes, you will need to create a container image for your Minecraft server application.
To add your games to the base BlueDragonMC/Server
image, you can create a basic Dockerfile that looks something like this:
# Build the project into an executable JARFROM docker.io/library/gradle:8.6-jdk21 as build# Copy build files and source codeCOPY . /workWORKDIR /work# Run gradle in the /work directoryRUN /usr/bin/gradle --console=plain --info --stacktrace --no-daemon build
# Use each built game to make a new image on top of the base "server" imageFROM ghcr.io/bluedragonmc/server:latest
# Copy built game JARsCOPY --from=build /work/build/all-jars/*.jar /server/games/
Then, you can build your project and push the image to your registry:
docker build . -t <your registry url>/bluedragonmc/server-full:latestdocker push <your registry url>/bluedragonmc/server-full:latest
Finally, you can start containers using this image which will have your games preinstalled.