mtoensing / docker-minecraft-papermc-server Goto Github PK
View Code? Open in Web Editor NEWStarts a Minecraft PaperMC server
Home Page: https://hub.docker.com/r/marctv/minecraft-papermc-server
License: MIT License
Starts a Minecraft PaperMC server
Home Page: https://hub.docker.com/r/marctv/minecraft-papermc-server
License: MIT License
It'd be nice to set custom pid and gid id's. The data is created as root user no matter what environment variables you declare.
Also specifing user and group in Dockerfile with groupadd/useradd doesn't seem to work.
When running it on a raspberry pi, I get the following error
standard_init_linux.go:207: exec user process caused "exec format error"
This is how I run it
sudo docker run --rm --name papermc -e MEMORYSIZE='500M' -p 25565:25565 -p 25575:25575 -i marctv/minecraft-papermc-server:latest
By the error description it sounds like an x86 program is trying to run on arm, which shouldn't be the case since it's Java.
If that's the case, can you add arm support?
Hey,
auf deinem Blog kommen ja viele Nachfragen nach Problemen, Updates, aktuellen Versionen und so weiter. Als du diese wirklich frühe Version meines Images übernommen hast waren auch mir viele Probleme noch gar nicht klar oder aufgefallen. Zum Beispiel nutzt du aktuell den Root User.
So fehlen deinen run scripts zum Beispiel die TTY's, sodass man sie eigentlich kaum benutzen kann. Außerdem solltest du dir mal angucken, dass du eine neuere Java Version für die Runtime benutzt. Dieses komische alte Java Dingens da gibt es mittlerweile vernünftig direkt vom OpenJDK. Auch meinen Healtcheck kannst du gerne einbauen.
Momentan baust du auf Java 11 und "runst" unter einem 8er.
Du kannst dir gerne meine aktuelle Version ansehen, an der ich wirklich viel verändert habe.
https://github.com/FelixKlauke/paperspigot-docker
Auch würde ich gerne deine Meinung hören. Findest du den Ansatz mit einem Volume oder mehreren besser? Ich werde vermutlich wieder auf ein Volume zurückbauen, ich habe bei mir mittlerweile einige Befürchtungen durch die Unmengen von Sym Links :)
Wenn du Fragen oder Probleme hast kannst du dich gerne an mich wenden.
Aber schöner Blog Artikel!
Was just wondering how much effort it might take to get 1.16.1 working in a docker container - still new to this docker thing here. Wondering if just modifying the Dockerfile is all that's needed, or if there might be more work involved. I see some diffs where some modifications happened and got reverted. Hints/tips gladly received!
There's a pretty severe vulnerability in log4j with working exploits already showing up. I suggest adding the JVM flag -Dlog4j2.formatMsgNoLookups=true
to all branches, especially since paper will not be fixing versions older than 1.16.5.
while there is a -nojline
here:
according to bukkit wiki:
Disables the JLine console, removes the '>', sets the timestamp to vanilla's and sets the language to English.
This is useful for users who do not have the Visual C++ 2008 redistributable on Windows.
Linux and UNIX users can safely ignore this option
JLine is like gnu readline library, which handles basic console editing, if you disable it, arrow-keys/color/emacs-binds/tab-complete will not work, this is related to #37
it's a linux environment inside docker container, so we can "ignore this option" safely
to resolve it, either remove this option (IMO this is better) or make it configurable via an env var
Hi there, is there any chance you can update for the v1.8 launcher please ?
Autocompletion dont work properly when tab is pressed(it just prints tab, and no colors.
container was launched without --nojline flag
The docker-entrypoint.sh script runs fine on AMD64, but fails with
exec /opt/minecraft/docker-entrypoint.sh: exec format error
on ARM64
I was just looking into the shell files in the root of the project, and they seem to align pretty perfectly with the new Makefile.
For example:
build_docker.sh
which just contains:
docker build -t marctv/minecraft-papermc-server .
can be moved into the Makefile:
.PHONY: build_docker
build_docker: ## Docker build in prep for updating Docker Hub ##
@echo "Building..."
docker build -t marctv/minecraft-papermc-server .;
And then later ran by simply typing:
make build_docker
If you like that idea, I can create a PR to implement this and remove the shell files and update the README.
Let me know, thanks
Experienced a server crash due to the openjdk:17-alpine docker image not using the actual 17 release version of java at this time
When trying to use WebConsole Spigot plugin (https://www.spigotmc.org/resources/webconsole.70370/). I get an 404 WebSocket Upgrade Failure when trying to connect. The plugin config is probably not the issue. Does this image contain WebSocket support?
Using the basic "read me" command line to launch the latest image of the PaperMC-Server via Docker on Ubuntu Server 20.04, with an empty data folder, results in:
[0.023s][warning][os,thread] Failed to start thread "GC Thread#0" - pthread_create failed (EPERM) for attributes:
stacksize: 1024k, guardsize: 4k, detached.
#
# There is insufficient memory for the Java Runtime Environment to continue.
# Cannot create worker GC thread. Out of system resources.
# An error report file with more information is saved as:
# /data/hs_err_pid1.log
Reverting to the tagged 1.18 version runs fine on the same machine and O/S, again with an empty data directory.
Something significant has changed in the current build that makes it no longer compatible with previous installs.
Hey there, thanks for the awesome Minecraft server docker image! It runs so smoothly on a NAS and is really easy to set up! Right now I'm just having a little trouble updating, when I run icanhasbukkit
I get this output saying I'm 60 versions behind:
I've redownloaded from docker, stopped the container, reset, and started again but get the same output. I'm running this on a Synology DS920+ using the docker package in DSM. Any assistance would be greatly appreciated!
even if i type 1.19 version, it downloads newest, pls help
I can't find a way to access the console through docker. Is there a system in place for this?
Hi, again a question for you....... Sorry !
OLD LAYOUT
NEW LAYOUT
QUESTION
Finally the question you say.......
Is there an ability to setup a Docker Paper MC container via the Synology Docker UI that I can assign a static IP / MAC address using the Environment or Command Variables ?
A question rather than an issue.
Is it possible to set up email notification when Users login to the Minecraft World providing the date, time, Username and outcome / error message?
It looks like the logs are in logs.db file?
Hey,
Wouldn't it be a lot easier if you had docker-compose.yml prepared for using with this server? I wouldn't have to write one myself
update to 1.18.1 ?
https://www.minecraft.net/sv-se/article/important-message--security-vulnerability-java-edition
GAME SERVER
If you’re hosting your own Minecraft: Java Edition server, you'll need to take different steps depending on which version you’re using, in order to secure it.
1.18: Upgrade to 1.18.1, if possible. If not, use the same approach as for 1.17.x:
1.17: Add the following JVM arguments to your startup command line:
-Dlog4j2.formatMsgNoLookups=true
Total docker newb here, so I appreciate any assistance! Struggling to work out what seems to me like a file permissions issue:
OMV ver 5.6.26.1
Docker ver 5:20.10.14-4-0-debian-buster
Portainer ver 2.11.1
Created a CIFS share in order to have the container run on a separate disk than my OMV/Docker installation, which appears to authenticate without issue. Starting the container prompts a quick shutdown with the docker logs below. Executing ls -l on the directory shows that the corresponding user has read/write/edit access as well, so I'm not sure where to turn here.
Portainer is able to successfully deploy the container if I do not specify the volume, which is a problem when i'm trying to direct the volume to a different drive with the CIFS share. Should I be using "Bind" instead of "Volume" for the host path?
docker logs:
First start of the docker container, start initialization process.
Starting with 9001:9001 (UID:GID)
changed ownership of '/opt/minecraft/paperspigot.jar' to 9001:9001
changed ownership of '/opt/minecraft/docker-entrypoint.sh' to 9001:9001
changed ownership of '/opt/minecraft' to 9001:9001
mode of '/opt/minecraft' changed to 0775 (rwxrwxr-x)
mode of '/opt/minecraft/paperspigot.jar' changed to 0774 (rwxrwxr--)
mode of '/opt/minecraft/docker-entrypoint.sh' changed to 0777 (rwxrwxrwx)
changed ownership of '/data/.DS_Store' to 9001:9001
changed ownership of '/data/._.DS_Store' to 9001:9001
changed ownership of '/data/data' to 9001:9001
changed ownership of '/data' to 9001:9001
Failed to download original jar
java.nio.file.AccessDeniedException: /data/cache
at java.base/sun.nio.fs.UnixException.translateToIOException(UnixException.java:90)
at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:106)
at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:111)
at java.base/sun.nio.fs.UnixFileSystemProvider.createDirectory(UnixFileSystemProvider.java:398)
at java.base/java.nio.file.Files.createDirectory(Files.java:700)
at java.base/java.nio.file.Files.createAndCheckIsDirectory(Files.java:807)
at java.base/java.nio.file.Files.createDirectories(Files.java:793)
at io.papermc.paperclip.DownloadContext.download(DownloadContext.java:47)
at io.papermc.paperclip.Paperclip.setupClasspath(Paperclip.java:63)
at io.papermc.paperclip.Paperclip.main(Paperclip.java:28)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at io.papermc.paperclip.Main.main(Main.java:26)
OMV syslogs:
kernel: [53825.412297] CIFS: Attempting to mount //192.168.1.69/ffminecraft
smbd[25293]: [2022/04/05 12:11:10.034544, 2] ../source3/param/loadparm.c:2805(lp_do_section)
smbd[25293]: Processing section "[ffminecraft]"
smbd[25293]: [2022/04/05 12:11:10.035156, 2] ../source3/param/loadparm.c:2805(lp_do_section)
smbd[25293]: [2022/04/05 12:11:10.036556, 2] ../source3/auth/auth.c:316(auth_check_ntlm_password)
smbd[25293]: check_ntlm_password: authentication for user [FFMinecraft] -> [FFMinecraft] -> [ffminecraft] succeeded
smbd[25293]: [2022/04/05 12:11:10.039332, 2] ../source3/smbd/service.c:849(make_connection_snum)
smbd[25293]: (ipv4:192.168.1.69:55502) connect to service ffminecraft initially as user ffminecraft (uid=1003, gid=100) (pid 25293)
smbd[25293]: [2022/04/05 12:11:10.039913, 2] ../source3/smbd/dosmode.c:136(unix_mode)
smbd[25293]: unix_mode(.) inheriting from .
smbd[25293]: [2022/04/05 12:11:10.039970, 2] ../source3/smbd/dosmode.c:161(unix_mode)
smbd[25293]: unix_mode(.) inherit mode 42777
smbd[25293]: [2022/04/05 12:11:10.041056, 2] ../source3/smbd/dosmode.c:136(unix_mode)
smbd[25293]: unix_mode(.) inheriting from .
smbd[25293]: [2022/04/05 12:11:10.041100, 2] ../source3/smbd/dosmode.c:161(unix_mode)
smbd[25293]: unix_mode(.) inherit mode 42777
smbd[25293]: [2022/04/05 12:11:10.042067, 2] ../source3/smbd/dosmode.c:136(unix_mode)
smbd[25293]: unix_mode(.) inheriting from .
smbd[25293]: [2022/04/05 12:11:10.042184, 2] ../source3/smbd/dosmode.c:161(unix_mode)
smbd[25293]: unix_mode(.) inherit mode 42777
smbd[25293]: [2022/04/05 12:11:10.043476, 2] ../source3/smbd/dosmode.c:136(unix_mode)
smbd[25293]: unix_mode(.) inheriting from .
smbd[25293]: [2022/04/05 12:11:10.043593, 2] ../source3/smbd/dosmode.c:161(unix_mode)
smbd[25293]: unix_mode(.) inherit mode 42777
containerd[500]: time="2022-04-05T12:11:10.082090488-04:00" level=info msg="starting signal loop" namespace=moby path=/run/containerd/io.containerd.runtime.v2.task/moby/6bcb4b27b848a83531e304b15d8c082766969a270390480aecaaa1e770644933 pid=10224
Hi, thank you for maintaining this project!
I was wondering if there is a way to gracefully stop the server using docker. If I'm not mistaken, docker stop
sends a SIGTERM to the container, but when inspecting the server output using docker attach
it seems there is not the usual output I expect from a stopping Minecraft server (saving world, stopping server).
Am I correct in assuming that this does not stop the server gracefully? If so, would this be an issue that could be fixed by this project or should it be directed at PaperMC?
while there is a -nojline
here:
according to bukkit wiki:
Disables the JLine console, removes the '>', sets the timestamp to vanilla's and sets the language to English.
This is useful for users who do not have the Visual C++ 2008 redistributable on Windows.
Linux and UNIX users can safely ignore this option
JLine is like gnu readline library, which handles basic console editing, if you disable it, arrow-keys/color/emacs-binds/tab-complete will not work, this is related to #37
it's a linux environment inside docker container, so we can "ignore this option" safely
to resolve it, either remove this option (IMO this is better) or make it configurable via an env var
Error response from daemon: manifest for marctv/minecraft-papermc-server:1.16.5 not found: manifest unknown: manifest unknown
When will you launch Docker Minecraft PaperMC Server 1.17? Please :)
When execute the command
docker run -d
--restart unless-stopped
--name mcserver
-e MEMORYSIZE='1G'
-e PAPERMC_FLAGS=''
-v /home/pi/mcserver:/data:rw
-p 25565:25565
-it marctv/minecraft-papermc-server:latest
This is the Error:
Unable to find image 'marctv/minecraft-papermc-server:latest' locally
latest: Pulling from marctv/minecraft-papermc-server
docker: no matching manifest for linux/arm/v7 in the manifest list entries.
This is the result of my "uname -a"
Linux raspberrypi 5.15.56-v8+ #1575 SMP PREEMPT Fri Jul 22 20:31:26 BST 2022 aarch64 GNU/Linux
It would be great if there was a 1.15 tag as well as 1.14 and 1.13 - that way when a new version comes out the server won't automatically update if set to stay on 1.15!
Updated to 1.18 and unfortunately the Tab-Complete function is not working.
Die neuste Vollversion ist 1.16.2
This is more like a question than an issue but it would be nice to hear, how everyone else is handling this:
I'm using watchtower to keep the docker images I run up2date. Due to the daily rebuild of this image (and the new ref), watchtower is updating the container every single day - even if there are no changes inside the image.
How do you do this in your setup? Just live with it, update manually, ...?
Hello!
I get the above error when running the docker container. I found this information:
livenessProbe: Indicates whether the Container is running. If the liveness probe fails, the kubelet kills the Container, and the Container is subjected to its restart policy. If a Container does not provide a liveness probe, the default state is Success.
readinessProbe: Indicates whether the Container is ready to service requests. If the readiness probe fails, the endpoints controller removes the Pod’s IP address from the endpoints of all Services that match the Pod. The default state of readiness before the initial delay is Failure. If a Container does not provide a readiness probe, the default state is Success.
I found a few resolutions on stack overflow that I can share if needed.
Thank you!
So, I recently installed PaperMC through Docker Hub and ran it once. Then I ran it again the next day just to see this error. (https://pastebin.com/dAbk2mnF)
The PaperMC tag I was using is 1.16.
I was sure to add 'sudo' to the command.
Thank you for helping me.
Im using the container image to run a papermc server on a vps using ssh. When my client connection crashes (for example if im attached to the container in the background via ssh and my wifi disconnects) The container itself stops and deletes itself. It works fine in the background if i disconnect from the container using ctrl p + ctrl q. Starting command:
docker run \
--rm \
--name vanilla-18 \
-e MEMORYSIZE='4G' \
-v /path/to/data:/data:rw \
-p 1.1.1.1:19132/tcp -p 1.1.1.1:19132:19132/udp -p 1.1.1.1:25565:25565/tcp -p 1.1.1.1:25565:25565/udp \
-ti marctv/minecraft-papermc-server:latest;
Changed the path and ip address for privacy but those are not related to the issue pretty sure. Is this an issue with the --rm flag?
Hi, I would like to ask how to access the Minecraft server console in Portainer or in the Linux terminal.
Hello, i just installed your docker to my ds416play (upgraded with 8gb ram) and while the generated world worked like a charm, when i migrated my single player world to the /data folder, i get errors and the server keeps restarting.
Delete the old entry in the Synology Docker UI and make a new one.
When I migrate installtions with Watchtower from alpine to temurir I get
error: exec: "java": executable file not found in $PATH
If I start from scratch it works. So we still have a problem @automate-this ... Any idea? Something with the permissions? I reverted everything for now
This may be more of a request for support or a feature request than an issue.
I'm running 1.16.3 version of the docker image successfully on a Synology DS218+ (with RAM upgrade.) However, the log files are timestamped using UTC. When examining logs at a later date to determine what the cause of an error or warning was, it's inconvenient to convert these UTC timestamps into a local time zone.
I've attempted to set the local time zone myself by editing the /etc/localtime file in the container, but of course, this change will not be persistent across reboot without mounting the file properly, which I was unable to do.
I believe there are a few other methods, but I am a novice with docker containers, and even more so using the Synology Diskstation Docker package. If the docker image could be modified to allow persistent timezone changes or instructions could be given in the documentation for how to make a timezone change persistent, this would be a large usability improvement.
Probably 3 or 3.9
Hi, I'm facing this error when running docker-compose as the root user:
mcserver | First start of the docker container, start initialization process.
mcserver | Starting with 9001:9001 (UID:GID)
mcserver | changed ownership of '/opt/minecraft/paperspigot.jar' to 9001:9001
mcserver | changed ownership of '/opt/minecraft/docker-entrypoint.sh' to 9001:9001
mcserver | changed ownership of '/opt/minecraft' to 9001:9001
mcserver | mode of '/opt/minecraft' changed to 0775 (rwxrwxr-x)
mcserver | mode of '/opt/minecraft/paperspigot.jar' changed to 0774 (rwxrwxr--)
mcserver | mode of '/opt/minecraft/docker-entrypoint.sh' changed to 0777 (rwxrwxrwx)
mcserver | changed ownership of '/data' to 9001:9001
mcserver exited with code 137
Hey. Would it be possible to also release arm64 images?
I hosted a server for me and my friends on my synology ds1019+ but when they try to join it only says
Here is a link to a picture: https://ibb.co/6P78Bn0
Hi, I was wondering it if was possible to add WebP support to the docker image. This is used for Dynmap.
It looks like this is an Ubuntu image behind the scenes, so you should just be able to apt-get install -y webp
Thanks!
Hi,
I would like to start a docker container on a specific minecraft version (1.16.3). but i don't know how to make it.
Thanks in advance
i would like a way to run commands non-interactively so an automated update script can warn the players about the update, wait a minute, then stop the container, destroy it, pull the new image, and then start the server again.
the other docker image, has an "mc-send-to-console" script bundled with the image, but i don't use it because it isn't updated as often as this one.
could we get something like this?
How do get into the java terminal from your project ?
Tests 1.17: https://papermc.io/downloads
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.