Skip to content

Conversation

@heggland
Copy link

@heggland heggland commented Jan 3, 2025

While setting up my server again, I created a docker compose file for my own server using your dockerfile.

I have some other ideas in mind to implement on my own server- if one downloads the paper server .jar file on the server and place it in the directory- then the dockerfile will copy it to the container, if the bash script finds a .jar file then it uses that one- skipping the download from papermc.

Below is a brief documentation for Docker Compose, which can be included either in the main README.md file or in a separate
.md file

Docker compose

This is a simple setup for running a PaperMC Minecraft server using docker compose.
This docker Compose configuration stores a persistent volume alongside the server data in the specified directory. To switch to Docker's volume management, edit the docker-compose file, remove the relative path under volumes: ./papermc:/papermc to papermc:/papermc

Requirements

  • Docker
  • Docker Compose

Setup

  1. Generate a .env file with the following command:
  • echo -e "MC_VERSION=latest\nPAPER_BUILD=latest\nEULA=true\nMC_RAM=2G\nJAVA_OPTS=" > .env
  • modify these values if needed
  1. Run
  • docker-compose up -d

Docker Compose Commands

To build the server:

  • docker-compose build

To run the server:

  • docker-compose up -d

To stop the server:

  • docker-compose down

View the server logs:

To view the server logs, run one of the following commands:

  • docker logs <container-name> -f
  • docker-compose logs -f - requires you to go into the papermc directory

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant