A Docker image for setting up a PaperMC Minecraft Server.
557
A Docker image for setting up a PaperMC Minecraft Server. This image is based off of openjdk:21-slim from Docker Hub for minimal resources required for a Minecraft Server to run.
Firstly, you will need to have Docker on your machine that you will be running the container on. If you do not have it installed, follow the guide here and select your Operating System of choice.
For convieneince, I have uploaded the built image to Docker Hub for easy configuration. You can pull down the image from Docker Hub by typing in docker pull tracedgod/papermc into your terminal/cmd window.
Once the image is downloaded, type docker run -p 25565:25565 tracedgod/papermc into your terminal/cmd window. This is the minimum required to start up a new PaperMC server, however there are also several environment options that can be set as well.
25565, Use this port number if you are unsure of what port you are using.25575.-p <port-of-choice>:25565-p <port-of-choice>:25565 -p <port-of-choice>:25575Note: change the "port-of-choice" to the the desired port, using 25565 as default (25575 for RCON).
Volume
-v <my_volume_name>:/papermc-v </path-to-files>:/papermcDetached
-dTerminal/Console
docker attach and input commands.-t and -i in any order-ti or -itRestart Policy
docker stop <container-id>--restart on-failure--restart unless-stoppedName
--name "<my-container-name>"MC_VERSION-e MC_VERSION="<latest>"PAPER_BUILDMC_VERSION will be used.-e PAPER_BUILD="<latest>"MC_RAMM for "Megabytes" or G for "Gigabytes".-e MC_RAM="<4G>"JAVA_OPTS-e JAVA_OPTS="<-XX:+UseConcMarkSweepGC -XX:+UseParNewGC>"git clone https://github.com/tracedgod/papermc-docker.git into your terminal/cmd window.cd papermc-dockerdocker build .docker tag <container-id> <your-new-tag>docker-compose.yml in the github repo for convienience. You may also view the file below:services:
papermc:
# Change container_name to desired name.
container_name: papermc
hostname: papermc
image: tracedgod/papermc:latest
# For docker attach functionality, both stdin_open and tty must be set to true.
stdin_open: true
tty: true
ports:
- '25565:25565/tcp'
# Uncomment below line for RCON functionality.
# - '25575:25575/tcp'
environment:
# Change below env variables to desired values, default for MC_VERSION + PAPER_BUILD is latest, MC_RAM + JAVA_OPTS are optional.
- MC_VERSION=latest
- PAPER_BUILD=latest
- MC_RAM=1G
- JAVA_OPTS=
restart: unless-stopped
volumes:
# Uncomment + Change this to server files path. For rw access on host, create a new group with GID 5000 and add yourself to said group.
# - '<path-to-server-volume>:/papermc'
papermc.sh script + variables.I am NOT affiliated with PaperMC in any way. Here is a link to the PaperMC site.
Content type
Image
Digest
sha256:3af2b1c75…
Size
244.3 MB
Last updated
almost 2 years ago
docker pull tracedgod/papermc