Giter Site home page Giter Site logo

bbriggs / docker-bukkit Goto Github PK

View Code? Open in Web Editor NEW
20.0 7.0 30.0 135 KB

A bukkit and spigot minecraft server on Docker

Home Page: https://hub.docker.com/r/bbriggs/bukkit/

License: GNU General Public License v2.0

Shell 21.43% Python 54.22% Dockerfile 24.35%
bukkit spigot minecraft docker docker-bukkit alpine-linux

docker-bukkit's Introduction

NOTICE: THIS REPO IS DEPRECATED.

tl;dr: All new work and issues should be sent to cmunroe's fork.

It's been a lot of fun working on this off and on over the past few years, but this repo was really only ever intended to be an experiment in automating releases and continuous updates for a docker image. Thanks to everyone who has downloaded, opened issues, forked, starred, or otherwise contributed. This project was already somewhat poorly maintained and it's time for me to acknowledge that and hand the reins over to someone much more active.

Supported tags and respective Dockerfile links

Build Status

Simple Tags

Tag Notes
1.8
1.8.3
1.8.4
1.8.5
1.8.6
1.8.7 Tag seems to have disppeared from the upstream. This project will no longer build it, but it will remain active for historical purposes.
1.8.8
1.9
1.9.2
1.9.4
1.10 Tag seems to have disppeared from the upstream. This project will no longer build it, but it will remain active for historical purposes.
1.10.2
1.11
1.11.1
1.11.2
1.12
1.12.1
1.12.2
1.13
1.13.1
1.13.2
1.14
1.14.1
1.14.2
1.14.3
1.14.4
1.15
1.15.1
1.15.2
1.16.1 1.16 is not supported by spigot as 1.16.1 was released so quickly after it.
1.16.2
1.16.3
latest Build the latest Spigot jar (1.16.3 at the time of this writing)

Docker Bukkit

A Docker Bukkit/Spigot server based on Alpine.

Running the server

To start the server and accept the EULA in one fell swoop, just pass the EULA=true environment variable to Docker when running the container. I recommend mounting a directory from your host onto /data in the container to make map and server data persistent.

docker run -it -v /data:/data -p 25565:25565 -e EULA=true --name mc_server bbriggs/bukkit

To run in the background (recommended), add the -d flag.

NOTE: At this point in time, the -it flags are strongly recommended as without them, the server appears to try to hog 100% of the CPU. We are working on a solution.

Java Memory

To help control memory usage we have InitRAM and MaxRAM enviornmenent variables. These variables are set to 1g and 2g respectively by default. These variables map to -Xms and -Xmx.

If you wish to support more players and plugins, it is highly encourage to increase these variables. You can find more information here: https://minecraft.gamepedia.com/Server/Requirements/Dedicated

Spigot included

Yes, even though the repo's name is bukkit, we have included the lovely spigot server as well. To run the spigot server, supply it as an argument like so:

docker run -it -v /data:/data -p 25565:25565 -e EULA=true --name mc_server bbriggs/bukkit spigot

Configuration

You can bring your own existing data + configuration and mount it to the /data directory when starting the container by using the -v option. You may also pass configuration options as environment variables like so:

docker run -it -e DIFFICULTY=2 -e MOTD="A non-standard message" -e SPAWN_ANIMALS=false bbriggs/bukkit

This container will only attempt generate a server.properties file if one does not already exist. If you would like to use the configuration tool, be sure that you are not providing a configuration file or that you also set FORCE_CONFIG=true in the environment variables.

Environment Files

Because of the potentially large number of environment variables that you could pass in, you might want to consider using an environment variable file.

Example:

# env.list
ALLOW_NETHER=false
level-seed=123456789
EULA=true

docker run -d -it --env-file env.list -v $(pwd)/data:/data -p 25565:25565 bbriggs/bukkit

List of Environment Variables

A full list of server.properties settings and their corresponding environment variables is included below, along with their defaults

Configuration Option Environment Variable Default
allow-flight ALLOW_FLIGHT false
allow-nether ALLOW_NETHER true
difficulty DIFFICULTY 1
enable-command-block ENABLE_COMMAND_BLOCK false
enable-query ENABLE_QUERY false
enable-rcon ENABLE_RCON false
force-gamemode FORCE_GAMEMODE false
gamemode GAMEMODE 0
generate-structures GENERATE_STRUCTURES true
generator-settings GENERATOR_SETTINGS
hardcore HARDCORE false
level-name LEVEL_NAME world
level-seed LEVEL_SEED
level-type LEVEL_TYPE DEFAULT
max-build-height MAX_BUILD_HEIGHT 256
max-players MAX_PLAYERS 20
max-tick-time MAX_TICK_TIME 60000
max-world-size MAX_WORLD_SIZE 29999984
motd MOTD
network-compression-threshold NETWORK_COMPRESSION_THRESHOLD 256
online-mode ONLINE_MODE true
op-permission-level OP_PERMISSION_LEVEL 4
player-idle-timeout PLAYER_IDLE_TIMEOUT 0
prevent-proxy-connections PREVENT_PROXY_CONNECTIONS false
pvp PVP true
resource-pack RESOURCE_PACK
resource-pack-sha1 RESOURCE_PACK_SHA1
server-ip SERVER_IP
server-port SERVER_PORT 25565
snooper-enabled SNOOPER_ENABLED true
spawn-animals SPAWN_ANIMALS true
spawn-monsters SPAWN_MONSTERS true
spawn-npcs SPAWN_NPCS true
view-distance VIEW_DISTANCE 10
white-list WHITE_LIST false
enable-jmx-monitoring ENABLE_JMX_MONITORING false
rcon.port RCON_PORT 25575
query.port QUERY_PORT 25565
use-native-transport USE_NATIVE_TRANSPORT true
enable-status ENABLE_STATUS true
broadcast-rcon-to-ops BROADCAST_RCON_TO_OPS true
sync-chunk-writes SYNC_CHUNK_WRITES true
op-permission-level OP_PERMISSION_LEVEL 4
entity-broadcast-range-percentage ENTITY_BROADCAST_RANGE_PERCENTAGE 100
rcon.password RCON_PASSWORD
rate-limit RATE_LIMIT 0
broadcast-console-to-ops BROADCAST_CONSOLE_TO_OPS true
function-permission-level FUNCTION_PERMISSION_LEVEL 2
enforce-whitelist ENFORCE_WHITELIST false
resource-pack-sha1 RESOURCE_PACK_SHA1
spawn-protection SPAWN_PROTECTION 16

Running a specific version

To run a specific version of Bukkit or Spigot, use a docker tag.

Example: docker run -it -v /data:/data -p 25565:25565 -e EULA=true --name mc_server bbriggs/bukkit:1.9.4 spigot

docker-bukkit's People

Contributors

bbriggs avatar cameronmunroe avatar freundtech avatar realorangeone avatar

Stargazers

 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-bukkit's Issues

CPU use in idle

Hey,

I updated my hardware. Now I'm using a Intel Xeon E3-1225 v5.
Before I used a Intel Xeon E3-1225 v3.

Now I see a constant CPU usage of 100% of craftbukkit.jar. But nobody is on the server.
Is that normal? Is that a Bukkit thing or is it a bug, which caused by the docker image and bad java version?

Here they speak about lower CPU usages:
https://www.spigotmc.org/threads/bukkit-craftbukkit-spigot-bungeecord-1-13-2.344189/page-4#post-3197985

At the moment I don't have access to my server, but when I'm home I will start investigation ;) .

T

Error at startup... no changes or customization

running this:

docker run -it --name minecraft -v $(pwd)/data:/data -p 25565:25565 -e EULA=true bbriggs/bukkit

but getting this at startup. Am I doing something wrong? I'm starting with no data:

java.lang.ExceptionInInitializerError
        at net.minecraft.server.v1_13_R2.EntityTypes$a.a(EntityTypes.java:323)
        at net.minecraft.server.v1_13_R2.EntityTypes.a(EntityTypes.java:122)
        at net.minecraft.server.v1_13_R2.EntityTypes.<clinit>(EntityTypes.java:15)
        at net.minecraft.server.v1_13_R2.DispenserRegistry.c(DispenserRegistry.java:675)
        at net.minecraft.server.v1_13_R2.MinecraftServer.main(MinecraftServer.java:931)
        at org.bukkit.craftbukkit.Main.main(Main.java:194)
Caused by: java.lang.IllegalArgumentException
        at java.util.concurrent.ForkJoinPool.checkParallelism(ForkJoinPool.java:2546)
        at java.util.concurrent.ForkJoinPool.<init>(ForkJoinPool.java:2536)
        at java.util.concurrent.ForkJoinPool.<init>(ForkJoinPool.java:2505)
        at net.minecraft.server.v1_13_R2.DataConverterRegistry.b(DataConverterRegistry.java:24)
        at net.minecraft.server.v1_13_R2.DataConverterRegistry.<clinit>(DataConverterRegistry.java:17)
        ... 6 more

Execute command inside container

Hello I am trying to figure out how to execute commands inside container without attaching to it.

Container is running with docker-compose configuration

version: "3.8"
services:
  minecraft:
    image: bbriggs/bukkit:1.16.3
    stdin_open: true
    tty: true
    container_name: "MinecraftServer"
    ports:
       - "25565:25565"
    volumes:
       - "/srv/MinecraftServer/data:/data"
    environment:
       - EULA=true
    restart: on-failure
    logging:
      options:
        max-size: "10m"
        max-file: "3"

Tried docker-compose exec minecraft list, it returns

OCI runtime exec failed: exec failed: container_linux.go:349: starting container process caused "exec: \"list\": executable file not found in $PATH": unknown

Same with docker exec -it MinecraftServer list

Spigot vs Craftbukkit

In our documentation we have it shown that we have spigot included. However, ever since 1.14 it looks like we have been using spigot as the default instead of craftbukkit. Further, craftbukkit isn't even included.

The questions is why?

Environment Variables does nothing after first start

In your examples you recommend to mount /data .

If you do that and create your docker container there will be created a server.properties file.

If you remove your docker container and create a new one with the same mounted directory your new environment variables will be ignored because there is already a server.properties file in your data/ folder.

You should either change the mounted directory or you should remove the old server.properties of your server before you create a new one.

Is the server overloaded?

Hi,

I always get these error, when I start the server:
Can't keep up! Is the server overloaded? Running 2163ms or 43 ticks behind

T

OP Permissions

Hi, thank you for this real great image. unfortunately i cant get op rights on my docker server, not via ops.json not via ops.txt not via command line. How can i define myself as server owner to mage changes ingame?

Greetings from germany

Spiritual Successor

This project looks to be a bit quiet these days. As such, I've gone ahead and began working on a new repo to roll out some much needed upgrades. I hope you won't mind.

https://gitlab.com/cmunroe/docker-bukkit

If you have any questions or concerns, please feel free to reach out.

Passing Arguments

Is it possible to pass arguments that would get reflected on the server.properties file? Or at least have the option to download the file somewhere (so I could pre-configure it).

Docker Credentials on Travis are broken

This is a good time to migrate off Travis CI and into GH Actions.

Acceptance Criteria:

  • Github actions jobs for building and pushing on every merge to master
  • Periodic build and push job to Docker to keep base images up to date

Container not taking input while attached

A way I thought could make controlling the server easier, was being able to input commands by attaching using

docker attach <container>

However, once the container is attached, it will not take any input. The console just won't allow you to type. Any ideas of 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.