Giter VIP home page Giter VIP logo

felixklauke / paper-docker Goto Github PK

View Code? Open in Web Editor NEW
54.0 8.0 30.0 104 KB

PaperSpigot Docker. Easy to use and clean docker image for running paper spigot servers in docker containers using OpenJDK. WIP

Home Page: https://www.felix-klauke.com

License: MIT License

Dockerfile 84.29% Shell 15.71%
paperspigot spigot docker dockerized dockerized-spigot dockerized-paperspigot spigot-docker paper spigot-container container

paper-docker's People

Contributors

aviortheking avatar dependabot-preview[bot] avatar felixklauke avatar fisherthewol avatar jetseverschuren avatar oschlueter avatar t3rminus 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

paper-docker's Issues

Plugin folder issues

As there are some devs out there who doesn't use the supplied plugin folder but hard code it, we should bring a workaround here. Further information: #14

Possible solution:

  • Symlink plugin folder

Track Paper builds

Is your feature request related to a problem? Please describe.
Right now the current image for 1.14.2 contains paper build v58, while the current build is v68

Describe the solution you'd like
Ideally, TravisCI could publish updated builds as they're available (or perhaps just republish frequently/daily)

It would be too much to ask for you to do this manually, but 1.14.2 is evolving quickly and bug and performance fixes are being released often, and it would be nice to stay up-to-date.

Support for snapshot and latests paper build

Describe the solution you'd like
To have the possibility of loading the Paper docker image with the latest release of Paper.

Describe alternatives you've considered
Spin up a new docker image automatically for every paper.jar release

DockerHub - Missing 1.16.1 tag

As said in the title, the current most recent tag on GitHub is 1.16.1, but it haven't been added to DockerHub (most recent is 1.15.2), which makes me unable to update my container.
The "latest" tag is also a year old, which could be changed to 1.16.1.
The Markdown on DockerHub also misses the 1.15.2 tag in the "Tags and Versions" section.

(cf https://hub.docker.com/r/felixklauke/paperspigot)

Thank you for your great work, I've been using your image for a year now and I haven't encountered any issue related to your configuration.

Still no "Bleeding Edge" release

The current 1.14.4 tag is still using build 156, while the current release is 176.
Is there any way I can help get this set-up?

python2 pip bootstrap no longer works, breaking the build

You can no longer build the image as is, because python2 deprecation has reached critical phase.

So the build breaks like this:

Step 27/47 : ADD https://bootstrap.pypa.io/get-pip.py .
Downloading [==================================================>]  1.928MB/1.928MB
 ---> d05e942e4ad2
Step 28/47 : RUN python get-pip.py
 ---> Running in 915447ce00d7
ERROR: This script does not work on Python 2.7 The minimum supported Python version is 3.6. Please use https://bootstrap.pypa.io/pip/2.7/get-pip.py instead.
The command '/bin/sh -c python get-pip.py' returned a non-zero code: 1

and apparently the openjdk image doesn't have python3 in it

Add EULA Consent

The user should express their consent via an environment flag at runtime. Consent should NOT be hard coded.

Server doesn't start, error appears

Describe the bug
The server does not start and an error gets printed.
To Reproduce

  1. Run docker run -it -v ~/minecraft/config:/opt/minecraft/config -v ~/minecraft/worlds:/opt/minecraft/worlds -v ~/minecraft/plugins:/opt/minecraft/plugins -v ~/minecraft/data:/opt/minecraft/data -v ~/minecraft/logs:/opt/minecraft/logs felixklauke/paperspigot:1.16.3
  2. See error

Expected behavior
The server should start.
Error

System Info: Java 11 (OpenJDK 64-Bit Server VM 11.0.9+11) Host: Linux 4.19.0-12-amd64 (amd64)
Loading libraries, please wait...
2020-11-03 18:16:03,791 main ERROR Cannot access RandomAccessFile java.io.FileNotFoundException: logs/latest.log (Permission denied) java.io.FileNotFoundException: logs/latest.log (Permission denied)
	at java.base/java.io.RandomAccessFile.open0(Native Method)
	at java.base/java.io.RandomAccessFile.open(RandomAccessFile.java:345)
	at java.base/java.io.RandomAccessFile.<init>(RandomAccessFile.java:259)
	at java.base/java.io.RandomAccessFile.<init>(RandomAccessFile.java:214)
	at java.base/java.io.RandomAccessFile.<init>(RandomAccessFile.java:127)
	at org.apache.logging.log4j.core.appender.rolling.RollingRandomAccessFileManager$RollingRandomAccessFileManagerFactory.createManager(RollingRandomAccessFileManager.java:180)
	at org.apache.logging.log4j.core.appender.rolling.RollingRandomAccessFileManager$RollingRandomAccessFileManagerFactory.createManager(RollingRandomAccessFileManager.java:156)
	at org.apache.logging.log4j.core.appender.AbstractManager.getManager(AbstractManager.java:112)
	at org.apache.logging.log4j.core.appender.OutputStreamManager.getManager(OutputStreamManager.java:114)
	at org.apache.logging.log4j.core.appender.rolling.RollingRandomAccessFileManager.getRollingRandomAccessFileManager(RollingRandomAccessFileManager.java:87)
	at org.apache.logging.log4j.core.appender.RollingRandomAccessFileAppender$Builder.build(RollingRandomAccessFileAppender.java:115)
	at org.apache.logging.log4j.core.appender.RollingRandomAccessFileAppender$Builder.build(RollingRandomAccessFileAppender.java:52)
	at org.apache.logging.log4j.core.config.plugins.util.PluginBuilder.build(PluginBuilder.java:122)
	at org.apache.logging.log4j.core.config.AbstractConfiguration.createPluginObject(AbstractConfiguration.java:952)
	at org.apache.logging.log4j.core.config.AbstractConfiguration.createConfiguration(AbstractConfiguration.java:892)
	at org.apache.logging.log4j.core.config.AbstractConfiguration.createConfiguration(AbstractConfiguration.java:884)
	at org.apache.logging.log4j.core.config.AbstractConfiguration.doConfigure(AbstractConfiguration.java:508)
	at org.apache.logging.log4j.core.config.AbstractConfiguration.initialize(AbstractConfiguration.java:232)
	at org.apache.logging.log4j.core.config.AbstractConfiguration.start(AbstractConfiguration.java:244)
	at org.apache.logging.log4j.core.LoggerContext.setConfiguration(LoggerContext.java:545)
	at org.apache.logging.log4j.core.LoggerContext.reconfigure(LoggerContext.java:617)
	at org.apache.logging.log4j.core.LoggerContext.reconfigure(LoggerContext.java:634)
	at org.apache.logging.log4j.core.LoggerContext.start(LoggerContext.java:229)
	at org.apache.logging.log4j.core.async.AsyncLoggerContext.start(AsyncLoggerContext.java:76)
	at org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(Log4jContextFactory.java:152)
	at org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(Log4jContextFactory.java:45)
	at org.apache.logging.log4j.LogManager.getContext(LogManager.java:194)
	at org.apache.logging.log4j.LogManager.getLogger(LogManager.java:551)
	at org.apache.logging.log4j.LogManager.getLogger(LogManager.java:537)
	at net.minecraft.server.v1_16_R2.Main.<clinit>(Main.java:27)
	at org.bukkit.craftbukkit.Main.main(Main.java:276)

2020-11-03 18:16:03,794 main ERROR Unable to inject fields into builder class for plugin type class org.apache.logging.log4j.core.appender.RollingRandomAccessFileAppender, element RollingRandomAccessFile. java.lang.IllegalStateException: ManagerFactory [org.apache.logging.log4j.core.appender.rolling.RollingRandomAccessFileManager$RollingRandomAccessFileManagerFactory@480d3575] unable to create manager for [logs/latest.log] with data [org.apache.logging.log4j.core.appender.rolling.RollingRandomAccessFileManager$FactoryData@f1da57d]
	at org.apache.logging.log4j.core.appender.AbstractManager.getManager(AbstractManager.java:114)
	at org.apache.logging.log4j.core.appender.OutputStreamManager.getManager(OutputStreamManager.java:114)
	at org.apache.logging.log4j.core.appender.rolling.RollingRandomAccessFileManager.getRollingRandomAccessFileManager(RollingRandomAccessFileManager.java:87)
	at org.apache.logging.log4j.core.appender.RollingRandomAccessFileAppender$Builder.build(RollingRandomAccessFileAppender.java:115)
	at org.apache.logging.log4j.core.appender.RollingRandomAccessFileAppender$Builder.build(RollingRandomAccessFileAppender.java:52)
	at org.apache.logging.log4j.core.config.plugins.util.PluginBuilder.build(PluginBuilder.java:122)
	at org.apache.logging.log4j.core.config.AbstractConfiguration.createPluginObject(AbstractConfiguration.java:952)
	at org.apache.logging.log4j.core.config.AbstractConfiguration.createConfiguration(AbstractConfiguration.java:892)
	at org.apache.logging.log4j.core.config.AbstractConfiguration.createConfiguration(AbstractConfiguration.java:884)
	at org.apache.logging.log4j.core.config.AbstractConfiguration.doConfigure(AbstractConfiguration.java:508)
	at org.apache.logging.log4j.core.config.AbstractConfiguration.initialize(AbstractConfiguration.java:232)
	at org.apache.logging.log4j.core.config.AbstractConfiguration.start(AbstractConfiguration.java:244)
	at org.apache.logging.log4j.core.LoggerContext.setConfiguration(LoggerContext.java:545)
	at org.apache.logging.log4j.core.LoggerContext.reconfigure(LoggerContext.java:617)
	at org.apache.logging.log4j.core.LoggerContext.reconfigure(LoggerContext.java:634)
	at org.apache.logging.log4j.core.LoggerContext.start(LoggerContext.java:229)
	at org.apache.logging.log4j.core.async.AsyncLoggerContext.start(AsyncLoggerContext.java:76)
	at org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(Log4jContextFactory.java:152)
	at org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(Log4jContextFactory.java:45)
	at org.apache.logging.log4j.LogManager.getContext(LogManager.java:194)
	at org.apache.logging.log4j.LogManager.getLogger(LogManager.java:551)
	at org.apache.logging.log4j.LogManager.getLogger(LogManager.java:537)
	at net.minecraft.server.v1_16_R2.Main.<clinit>(Main.java:27)
	at org.bukkit.craftbukkit.Main.main(Main.java:276)

2020-11-03 18:16:03,797 main ERROR Unable to invoke factory method in class class org.apache.logging.log4j.core.appender.RollingRandomAccessFileAppender for element RollingRandomAccessFile. java.lang.IllegalStateException: No factory method found for class org.apache.logging.log4j.core.appender.RollingRandomAccessFileAppender
	at org.apache.logging.log4j.core.config.plugins.util.PluginBuilder.findFactoryMethod(PluginBuilder.java:224)
	at org.apache.logging.log4j.core.config.plugins.util.PluginBuilder.build(PluginBuilder.java:130)
	at org.apache.logging.log4j.core.config.AbstractConfiguration.createPluginObject(AbstractConfiguration.java:952)
	at org.apache.logging.log4j.core.config.AbstractConfiguration.createConfiguration(AbstractConfiguration.java:892)
	at org.apache.logging.log4j.core.config.AbstractConfiguration.createConfiguration(AbstractConfiguration.java:884)
	at org.apache.logging.log4j.core.config.AbstractConfiguration.doConfigure(AbstractConfiguration.java:508)
	at org.apache.logging.log4j.core.config.AbstractConfiguration.initialize(AbstractConfiguration.java:232)
	at org.apache.logging.log4j.core.config.AbstractConfiguration.start(AbstractConfiguration.java:244)
	at org.apache.logging.log4j.core.LoggerContext.setConfiguration(LoggerContext.java:545)
	at org.apache.logging.log4j.core.LoggerContext.reconfigure(LoggerContext.java:617)
	at org.apache.logging.log4j.core.LoggerContext.reconfigure(LoggerContext.java:634)
	at org.apache.logging.log4j.core.LoggerContext.start(LoggerContext.java:229)
	at org.apache.logging.log4j.core.async.AsyncLoggerContext.start(AsyncLoggerContext.java:76)
	at org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(Log4jContextFactory.java:152)
	at org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(Log4jContextFactory.java:45)
	at org.apache.logging.log4j.LogManager.getContext(LogManager.java:194)
	at org.apache.logging.log4j.LogManager.getLogger(LogManager.java:551)
	at org.apache.logging.log4j.LogManager.getLogger(LogManager.java:537)
	at net.minecraft.server.v1_16_R2.Main.<clinit>(Main.java:27)
	at org.bukkit.craftbukkit.Main.main(Main.java:276)

2020-11-03 18:16:03,798 main ERROR Null object returned for RollingRandomAccessFile in Appenders.
2020-11-03 18:16:03,802 main ERROR Unable to locate appender "File" for logger config "root"
[18:16:06 ERROR]: Failed to load properties from file: /opt/minecraft/config/server.properties
[18:16:06 ERROR]: Failed to store properties to file: /opt/minecraft/config/server.properties
[18:16:06 WARN]: Failed to load eula.txt
[18:16:06 INFO]: [STDERR]: You have used the Spigot command line EULA agreement flag.
[18:16:06 INFO]: [STDERR]: By using this setting you are indicating your agreement to Mojang's EULA (https://account.mojang.com/documents/minecraft_eula).
[18:16:06 INFO]: [STDERR]: If you do not agree to the above EULA please stop your server and remove this flag immediately.
[18:16:06 INFO]: Environment: authHost='https://authserver.mojang.com', accountsHost='https://api.mojang.com', sessionHost='https://sessionserver.mojang.com', name='PROD'
[18:16:06 FATAL]: Failed to start the minecraft server
java.nio.file.AccessDeniedException: /opt/minecraft/worlds/world
	at sun.nio.fs.UnixException.translateToIOException(UnixException.java:90) ~[?:?]
	at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:111) ~[?:?]
	at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:116) ~[?:?]
	at sun.nio.fs.UnixFileSystemProvider.createDirectory(UnixFileSystemProvider.java:389) ~[?:?]
	at java.nio.file.Files.createDirectory(Files.java:689) ~[?:?]
	at java.nio.file.Files.createAndCheckIsDirectory(Files.java:796) ~[?:?]
	at java.nio.file.Files.createDirectories(Files.java:782) ~[?:?]
	at net.minecraft.server.v1_16_R2.SessionLock.a(SourceFile:35) ~[paper.jar:git-Paper-253]
	at net.minecraft.server.v1_16_R2.Convertable$ConversionSession.<init>(Convertable.java:218) ~[paper.jar:git-Paper-253]
	at net.minecraft.server.v1_16_R2.Convertable.c(Convertable.java:200) ~[paper.jar:git-Paper-253]
	at net.minecraft.server.v1_16_R2.Main.main(Main.java:114) ~[paper.jar:git-Paper-253]
	at org.bukkit.craftbukkit.Main.main(Main.java:276) ~[paper.jar:git-Paper-253]

Desktop (please complete the following information):

  • OS: Debian
  • Version: 10
    Additional context
    I investigated the problem with a bash shell, and it seems like the /opt/minecraft folder belongs to root, so the server running under the minecraft user can't create the necessary folders. Changing the folder owner to minecraft would probably suffice to fix this issue.

Push image version 1.16.4

Hey there,

it looks like version 1.16.4 got already included (cf. .travis.yml).
Could you release a new push to DockerHub? This would be great.

Greetings, Paul.

Reconsidering Single Volumes

Is your feature request related to a problem? Please describe.
The complexity of juggling multiple volumes at once is entirely redundant. For the end user they have multiple different folders to juggle, all of which add unneeded complexity to a solution designed to reduce it. On the development side of things, it adds more folders and files to juggle for no explicate benefit.

Describe the solution you'd like
I would like the 5 volumes to be consolidated down into 1 simpler to manager volume.

Describe alternatives you've considered
A system could be implemented that allows for the end user to choose between a single volume or multiple volumes. I serious doubt this is a viable option, considering how it would have to be implemented, but none the less it is an alternative.

Additional context
This issue was discussed in issue #39. The reason why it was closed was very unclear, only stating it wasn't going to happen. Not going back to a single volume is a little beyond me at this moment. I understand it would take some refactoring of the Dockerfile, but in the end I feel this change would be of the upmost benefit in the long run.

command history and tab key don't work

Describe the bug

Hi, your project is good, but unfortunately not fully usable yet. Indeed there is a slight interaction issue once the server launched using

docker run -it \                                                                                                        root@electroncloud
    -p 25565:25565 \
    -v config:/opt/minecraft/config \
    -v worlds:/opt/minecraft/worlds \
    -v plugins:/opt/minecraft/plugins \
    -v data:/opt/minecraft/data \
    -v logs:/opt/minecraft/logs \
    felixklauke/paperspigot:1.16.1

The Up arrow key doesn't go back in the command history but print ^[[A and ^[[B for the Down arrow key. Do you have anything in mind to fix it?
I tried this from zsh and bash

1.14.2 Image won't start

Describe the bug
1.14.2 Image won't start

To Reproduce
docker run -it -p 25566:25565 felixklauke/paperspigot:1.14.2

Expected behavior
I expected the server to start

  • OS: Ubuntu 18.04 LTS

Log Output:

ln: failed to create symbolic link '/usr/src/app/server/plugins': No such file or directory
ln: failed to create symbolic link '/usr/src/app/server/banned-ips.json': No such file or directory
ln: failed to create symbolic link '/usr/src/app/server/banned-players.json': No such file or directory
ln: failed to create symbolic link '/usr/src/app/server/help.yml': No such file or directory
ln: failed to create symbolic link '/usr/src/app/server/ops.json': No such file or directory
ln: failed to create symbolic link '/usr/src/app/server/permissions.yml': No such file or directory
ln: failed to create symbolic link '/usr/src/app/server/whitelist.json': No such file or directory
ln: failed to create symbolic link '/usr/src/app/server/logs': No such file or directory
openjdk version "11.0.3" 2019-04-16
OpenJDK Runtime Environment 18.9 (build 11.0.3+7)
OpenJDK 64-Bit Server VM 18.9 (build 11.0.3+7, mixed mode)
Starting with Java Args: -Xmx2G -Xms2G -XX:+UseConcMarkSweepGC -server -Dcom.mojang.eula.agree=true
Starting with Spigot Args: --nojline --bukkit-settings /usr/src/app/config/bukkit.yml --plugins /usr/src/app/plugins --world-dir /usr/src/app/worlds --spigot-settings /usr/src/app/config/spigot.yml --commands-settings /usr/src/app/config/commands.yml --config /usr/src/app/config/server.properties
Starting with Paper Args: --paper-settings /usr/src/app/config/paper.yml
Error: Unable to access jarfile /usr/src/app/server/paperspigot.jar

Add JAVA_OPTS environment variable

Is your feature request related to a problem? Please describe.
I would like to add remote debugging java opts to the docker container, which need to go between "java" and "-jar" in the beginning of the startup command.

Describe the solution you'd like
I think a solution would be to add "JAVA_OPTS" to the environment variables and place it betweed "java" and "-jar" in the docker-entrypoint.sh

Describe alternatives you've considered
An alternative would be to use a custom entrypoint script, which I did not really get to work for me (container did not start, even with copied standard entrypoint script.

Additional context
I am using felixklauke/paperspigot:1.14.4

Example debug options: -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005

If you have any other possible solutions on how to add debug options for remote debugging, please let me know!

container exits on stops/restarts

Describe the bug

When attempting to stop or restart the server, container exits

To Reproduce
Steps to reproduce the behavior:

  1. launch the server with recommended docker run command
  2. wait until server finishes starting up
  3. enter a stop or even better, a restart command
  4. See error:
restart
[12:49:07 INFO]: Startup script './start.sh' does not exist! Stopping server.
[12:49:07 INFO]: Stopping server
[12:49:07 INFO]: Saving players
[12:49:07 INFO]: Saving worlds
[12:49:07 INFO]: Saving chunks for level 'world'/minecraft:overworld
[12:49:08 INFO]: ThreadedAnvilChunkStorage (world): All chunks are saved
[12:49:08 INFO]: Saving chunks for level 'world_nether'/minecraft:the_nether
[12:49:08 INFO]: ThreadedAnvilChunkStorage (DIM-1): All chunks are saved
[12:49:08 INFO]: Saving chunks for level 'world_the_end'/minecraft:the_end
[12:49:08 INFO]: ThreadedAnvilChunkStorage (DIM1): All chunks are saved
[12:49:08 INFO]: ThreadedAnvilChunkStorage (world): All chunks are saved
[12:49:08 INFO]: ThreadedAnvilChunkStorage (DIM-1): All chunks are saved
[12:49:09 INFO]: ThreadedAnvilChunkStorage (DIM1): All chunks are saved
./docker-entrypoint.sh: line 16: exec: serve: not found

Expected behavior
Expected behaviour is for server to restart

Additional context
FWIW, this is happening on Debian 10 but I don't think it's relevant. I can see two parts here. About start.sh I'm not sure where that is coming from. But about serve not found I'm pretty sure that's because you use CMD+ENTRYPOINT format and thus $@ doesn't contain the name of the script itself, only the serve parameter.

Can we fix this, because otherwise a simple thing such as a server restart becomes quite involved?

Unable to add a server icon

Currently there appears to be no way to add a server icon.
Right now the process involves adding a file named server-icon.png in the working directory (which is inaccessible).

Back to single volume

At the moment there are 5 volumes. I would like to merge them back to one to reduce complexity.

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.