Git Product home page Git Product logo

docker-minecraft-papermc-server's People

Contributors

automate-this avatar deluxghost avatar gaffneyd4 avatar j4c3 avatar josxha avatar leothelocust avatar lucabazzea avatar mauricenino avatar mpnordland avatar mtoensing avatar rrvk avatar slitzo3 avatar vxlerieuwu avatar zuedev avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

docker-minecraft-papermc-server's Issues

custom pid and gid

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.

Raspberry pi problems

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?

Updates, probleme, Lizenz, Sicherheit

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!

Update to 1.16.1

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!

nojline option disables tab-complete and color output and arrow key

while there is a -nojline here:

exec su-exec $DOCKER_USER java -jar -Xms$MEMORYSIZE -Xmx$MEMORYSIZE $JAVAFLAGS /opt/minecraft/paperspigot.jar --nojline nogui

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

non interactive console

Autocompletion dont work properly when tab is pressed(it just prints tab, and no colors.
container was launched without --nojline flag

Recommendation to move shell files into Makefile

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

Version 1.19 of the Docker Hub image fails on AMD Ubuntu 20.04

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.

Can't update Paper version

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:

image

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!

version

even if i type 1.19 version, it downloads newest, pls help

QUESTION : Macvlan and static IP.

Hi, again a question for you....... Sorry !

OLD LAYOUT

  • Synology Docker installed
  • I have two standard Minecraft Paper Servers set up on separate docker containers with differing external ports to the internal MC ports
  • I have separate external subdomains set up for both MC servers
  • External users use the sub domain / external container port combination with inbound routing via Unifi Port Forwarding to the Synology NAS IP, which then does the routing to the containers based on the port number
    ISSUES
  • The containers sit on my main subnet as my Synology server and all the other core servers / PCs, I do have a separate IoT subnet
  • VLAN / Guest Access is not possible to the Servers when other people are using wifi in my house as I have blocked access to the Core network
  • Guests have to be provided with the Core Wifi credentials to play MC in our house

NEW LAYOUT

  • I have added a new Synology network interface to the IoT / non core network assigned to a single LAN port, which is VLAN tagged
  • I have set up a Macvlan using portainer (hosted in a Synology Docker container) which is linked to a specific IP Range of the IoT network (192.168.2.224 upwards)
  • Each MC Container on startup gets allocated a external IP starting from 192.168.2.224 based on container start up order........
  • I have routed the sub domain / external container port combination with inbound routing via Unifi Port Forwarding directly to the Container 192.168.2.x and use the standard internal MC ports
  • On the guest network I have allowed direct access from it's subnet to the specific IP addresses of the two containers on the IoT network
    ISSUE
  • The containers do not have either a static IP or static MAC address as they are just added in sequence from Docker.
  • I can try and control the order in which the containers a Run, to ensure that the two containers retain their specific IPs that are used in the Unifi Port Forwarding, but this requires me to remember things......

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 ?

QUESTION : Email notification when Users Log In

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?

Docker compose

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

IMPORTANT MESSAGE: SECURITY VULNERABILITY IN JAVA EDITION

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

OpenMediaVault "Failed to download original jar"

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

Stop the server gracefully with Docker

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?

nojline option disables tab-complete and color output and arrow key

while there is a -nojline here:

exec su-exec $DOCKER_USER java -jar -Xms$MEMORYSIZE -Xmx$MEMORYSIZE $JAVAFLAGS /opt/minecraft/paperspigot.jar --nojline nogui

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

Cannot pull 1.16.5 image

Error response from daemon: manifest for marctv/minecraft-papermc-server:1.16.5 not found: manifest unknown: manifest unknown

None of my friends can connect

I made a minecraft server on my nas but none of my friends can connect. I can connect but they cant. How do i fix this?
Here is a picture of thr error for them
31C7S

Minecraft 1.17

When will you launch Docker Minecraft PaperMC Server 1.17? Please :)

Raspberry PI4 error while creating container

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

Create 1.15 tag to prevent auto-updates

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!

Daily rebuild of image causes watchtower to update the container every day

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, ...?

Portainer Status Error: /bin/sh: 1: mc-health: not found

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!

Server fails to start

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.

Container shuts itself down on ssh disconnect.

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?

migrated SSP world won't load the server

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.

error: exec: "java": executable file not found in $PATH on migration from azul/zulu-openjdk-alpine to eclipse-temurin

How to solve this on Synology

Delete the old entry in the Synology Docker UI and make a new one.

  1. Action -> Delete
  2. Create -> Select "marctv/minecraft-papermc-server:latest
  3. Configure everything like the last time: ports, folders, RAM

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

Allow changes to container timezone to be persistant, or document method to make timezone changes

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.

mcserver exited with code 137

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

arm64 images

Hey. Would it be possible to also release arm64 images?

WebP Support

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!

Specific Version

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

run commands non-interactively

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?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.