• Stars
    star
    143
  • Rank 257,007 (Top 6 %)
  • Language
    Shell
  • License
    Apache License 2.0
  • Created over 7 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A BungeeCord server to use in conjunction with itzg/minecraft-server

This is a Docker image of BungeeCord and is intended to be used at the front-end of a cluster of itzg/minecraft-server containers.

GitHub Workflow Status

Using with itzg/minecraft-server image

When using with the server image itzg/minecraft-server you can disable online mode, which is required by bungeecord, by setting ONLINE_MODE=FALSE, such as

docker run ... -e ONLINE_MODE=FALSE itzg/minecraft-server

Here is an example Docker Compose file.

Healthcheck

This image contains mc-monitor and uses its status command to continually check on the container's. That can be observed from the STATUS column of docker ps

CONTAINER ID    IMAGE    COMMAND                         CREATED           STATUS                     PORTS                       NAMES
b418af073764    mc       "/usr/bin/run-bungeecord.sh"    43 seconds ago    Up 41 seconds (healthy)    0.0.0.0:25577->25577/tcp    mc

You can also query the container's health in a script friendly way:

> docker container inspect -f "{{.State.Health.Status}}" mc
healthy

Environment Settings

  • TYPE=BUNGEECORD

    The type of the server. When the type is set to CUSTOM, the environment setting BUNGEE_JAR_URL is required.

    Possible values:

  • MEMORY=512m

    The Java memory heap size to specify to the JVM. Setting this to an empty string will let the JVM calculate the heap size from the container declared memory limit. Be sure to consider adding -XX:MaxRAMPercentage=<n> (with <n> replaced) to JVM_XX_OPTS, where the JVM default is 25%.

  • ICON

    Setting this to an image URL will download and (if required) convert the icon to a 64x64 PNG, and place it in /server/server-icon.png.

  • OVERRIDE_ICON

    Will override any pre-existing server-icon.png file in the /server directory if ICON is set.

  • INIT_MEMORY=${MEMORY}

    Can be set to use a different initial heap size.

  • MAX_MEMORY=${MEMORY}

    Can be set to use a different max heap size.

  • JVM_OPTS / JVM_XX_OPTS

    Additional space-separated options to pass to the JVM, where JVM_XX_OPTS will be added to the java command-line before JVM_OPTS.

  • NETWORKADDRESS_CACHE_TTL=60

    Number of seconds to cache the successful network address lookups. A lower value is helpful when Minecraft server containers are restarted and/or rescheduled and re-assigned a new container IP address.

  • PLUGINS

    Used to download a comma seperated list of *.jar urls to the plugins folder.

    -e PLUGINS=https://www.example.com/plugin1.jar,https://www.example.com/plugin2.jar
    
  • SPIGET_PLUGINS

    The SPIGET_PLUGINS variable can be set with a comma-separated list of SpigotMC resource IDs to automatically download SpigotMC plugins using the spiget API. Resources that are zip files will be expanded into the plugins directory and resources that are simply jar files will be moved there.

    NOTE: the variable is purposely spelled SPIGET with an "E"

    The resource ID can be located from the numerical part of the URL after the shortname and a dot. For example, the ID is 313 from

    https://www.spigotmc.org/resources/bungeetablistplus.313/
                                                         ===
    
  • ENABLE_RCON

    Enable the rcon server (uses a third-party plugin to work).

  • RCON_PORT

    Define the port for rcon

  • RCON_PASSWORD

    Define the password for rcon

Optional Environment Settings

  • BUNGEE_JOB_ID=lastStableBuild

    The Jenkins job ID of the artifact to download and run and is used when deriving the default value of BUNGEE_JAR_URL

  • BUNGEE_JAR_REVISION

    Defaults to the value of ${BUNGEE_JOB_ID}, but can be set to an arbitrarily incremented value to force an upgrade of the downloaded BungeeCord jar file.

  • BUNGEE_BASE_URL

    Default to:

    Used to derive the default value of BUNGEE_JAR_URL

  • BUNGEE_JAR_URL

    If set, can specify a custom, fully qualified URL of the BungeeCord.jar; however, you won't be able reference the other environment variables from within a docker run a compose file. Defaults to:

    • (type: BUNGEECORD): ${BUNGEE_BASE_URL}/${BUNGEE_JOB_ID}/artifact/bootstrap/target/BungeeCord.jar

    This takes precedence over BUNGEE_JAR_FILE.

  • BUNGEE_JAR_FILE

    For TYPE=CUSTOM, allows setting a custom BungeeCord JAR that is located inside the container.

    Must be a valid path of an existing file.

  • WATERFALL_VERSION=latest

    For TYPE=WATERFALL, allows downloading a specific release stream of Waterfall.

  • WATERFALL_BUILD_ID=latest

    For TYPE=WATERFALL, allows downloading a specific build of Waterfall within the given version.

  • VELOCITY_VERSION=latest

    For TYPE=VELOCITY, specifies the version of Velocity to download and run.

  • VELOCITY_BUILD_ID=latest

    For TYPE=VELOCITY, allows downloading a specific build of Velocity within the given version.

  • HEALTH_HOST=localhost

    Allows for configuring the host contacted for container health check.

  • HEALTH_USE_PROXY=false

    Set to "true" when using Bungeecord's proxy_protocol option

  • ENABLE_JMX=false

    To enable remote JMX, such as for profiling with VisualVM or JMC, add the environment variable ENABLE_JMX=true, set JMX_HOST to the IP/host running the Docker container, and add a port forwarding of TCP port 7091

Volumes

  • /server

    The working directory where BungeeCord is started. This is the directory where its config.yml will be loaded.

  • /plugins

    Plugins will be copied across from this directory before the server is started.

  • /config

    The contents of this directory will be synchronized into the /server directory. Variable placeholders within the files will be processed as described in the section below unless REPLACE_ENV_DURING_SYNC is set to "false".

Ports

  • 25577

    The listening port of BungeeCord, which you will typically want to port map to the standard Minecraft server port of 25565 using:

    -p 25565:25577
    

Java Versions

The following table shows the Java versions and CPU architectures supported by the image tags:

Tag Java Architectures
latest 17 amd64, arm64, armv7
java8 8 amd64, arm64, armv7
java11 11 amd64, arm64, armv7

Interacting with the server

RCON is enabled by default, so you can exec into the container to access the Bungeecord server console:

docker exec -i mc rcon-cli

Note: The -i is required for interactive use of rcon-cli.

To run a simple, one-shot command, such as stopping a Bungeecord server, pass the command as arguments to rcon-cli, such as:

docker exec mc rcon-cli en

The -i is not needed in this case.

In order to attach and interact with the Bungeecord server, add -it when starting the container, such as

docker run -d -it -p 25565:25577 --name mc itzg/bungeecord

With that you can attach and interact at any time using

docker attach mc

and then Control-p Control-q to detach.

For remote access, configure your Docker daemon to use a tcp socket (such as -H tcp://0.0.0.0:2375) and attach from another machine:

docker -H $HOST:2375 attach mc

Unless you're on a home/private LAN, you should enable TLS access.

BungeeCord Configuration

BungeeCord Configuration Guide

Generic pack files

To install all the server content (jars, mods, plugins, configs, etc.) from a zip or tgz file, then set GENERIC_PACK to the container path or URL of the archive file.

If multiple generic packs need to be applied together, set GENERIC_PACKS instead, with a comma separated list of archive file paths and/or URLs to files.

To avoid repetition, each entry will be prefixed by the value of GENERIC_PACKS_PREFIX and suffixed by the value of GENERIC_PACKS_SUFFIX, both of which are optional. For example, the following variables

GENERIC_PACKS=configs-v9.0.1,mods-v4.3.6
GENERIC_PACKS_PREFIX=https://cdn.example.org/
GENERIC_PACKS_SUFFIX=.zip

would expand to https://cdn.example.org/configs-v9.0.1.zip,https://cdn.example.org/mods-v4.3.6.zip.

Replacing variables inside configs

Sometimes you have mods or plugins that require configuration information that is only available at runtime. For example if you need to configure a plugin to connect to a database, you don't want to include this information in your Git repository or Docker image. Or maybe you have some runtime information like the server name that needs to be set in your config files after the container starts.

For those cases there is the option to replace defined variables inside your configs with environment variables defined at container runtime.

If you set the environment variable REPLACE_ENV_VARIABLES to TRUE the startup script will go through all files inside your /server volume and replace variables that match your defined environment variables. Variables that you want to replace need to be declared as ${YOUR_VARIABLE}, which is common with shell scripting languages.

With REPLACE_ENV_VARIABLE_PREFIX you can define a prefix, where the default is CFG_, to only match predefined environment variables.

If you want to use a file for a value (such as when using Docker secrets) you can add suffix _FILE to your variable name (in run command). For example, ${CFG_PASSWORD_FILE} would be replaced with the contents of the file specified by the CFG_PASSWORD_FILE environment variable.

Here is a full example where we want to replace values inside a database.yml.

---
database:
  host: ${CFG_DB_HOST}
  name: ${CFG_DB_NAME}
  password: ${CFG_DB_PASSWORD}

This is how your docker-compose.yml file could look like:

version: "3.8"
# Other docker-compose examples in /examples

services:
  proxy:
    image: itzg/bungeecord
    ports:
      - "25577:25577"
    volumes:
      - "proxy:/server"
    environment:
      # enable env variable replacement
      REPLACE_ENV_VARIABLES: "TRUE"
      # define an optional prefix for your env variables you want to replace
      ENV_VARIABLE_PREFIX: "CFG_"
      # and here are the actual variables
      CFG_DB_HOST: "http://localhost:3306"
      CFG_DB_NAME: "minecraft"
      CFG_DB_PASSWORD_FILE: "/run/secrets/db_password"
    restart: always

volumes:
  proxy:

secrets:
  db_password:
    file: ./db_password

The content of db_password:

ug23u3bg39o-ogADSs

Scenarios

Running non-root

This image may be run as a non-root user but does require an attached /server volume that is writable by that uid, such as:

docker run ... -u $uid -v $(pwd)/data:/server itzg/bungeecord

More Repositories

1

docker-minecraft-server

Docker image that provides a Minecraft Server that will automatically download selected version at startup
Shell
7,144
star
2

docker-minecraft-bedrock-server

Containerized Minecraft Bedrock Dedicated Server with selectable version
Shell
756
star
3

mc-router

Routes Minecraft client connections to backend servers based upon the requested server address
Go
338
star
4

minecraft-server-charts

Smarty
260
star
5

docker-mc-backup

Provides a side-car container to backup itzg/minecraft-server world data
Shell
190
star
6

mc-monitor

Monitor the status of Minecraft servers and provides Prometheus exporter and Influx line protocol output
Go
165
star
7

rcon-cli

A little RCON cli based on james4k's RCON library for golang
Go
122
star
8

docker-rcon-web-admin

A Docker image that runs rcon-web-admin
Dockerfile
69
star
9

saml-auth-proxy

Provides a SAML SP authentication proxy for backend web services
Go
42
star
10

react-mui-login-register

A user login/register React component styled with Material UI that includes options to use an authentication provider
JavaScript
41
star
11

restify

Enables REST-like access to HTML pages by scraping and parsing them into JSON.
Go
37
star
12

mc-image-helper

This tool does the complicated bits for the itzg/minecraft-server image
Java
27
star
13

mc-server-runner

A container entry point to manage graceful shutdown of a Minecraft server
Go
26
star
14

easy-add

A utility for easily adding a file from a downloaded archive during Docker builds
Go
22
star
15

mc-status

A web application that serves up a little REST API to query and convey the status of Minecraft servers using the native MC protocol
Java
18
star
16

go-flagsfiller

Bring your own struct and make Go's flag package pleasant to use
Go
15
star
17

redis-stomp-relay

This Spring Boot application implements a STOMP relay that delegates to Redis pub/sub.
Java
14
star
18

haproxy-gen

Generate an haproxy.cfg file for multi-domain proxying
Go
12
star
19

websocket-stomp-user-queues

A little Spring Boot application to demonstrate the use of several technologies and techniques
Java
11
star
20

kidsbank-js

kids bank is a totally virtual way for parents and kids to keep track of allowance, etc
Java
11
star
21

rcon-hub

Provides an SSH server that enables rcon connections to configured game servers
Go
10
star
22

entrypoint-demoter

Container entry point that can demote uid and gid from environment variables or matching directory
Go
9
star
23

kube-metrics-exporter

Simple application that accesses the Kubernetes metrics API and exports the pod metrics for Prometheus scraping
Go
6
star
24

docker-minecraft-docs

Documentation hub for all the itzg Docker Minecraft images
5
star
25

web-debug-server

A very minimal web server that responds with a page containing the request headers and content
Go
5
star
26

mc-modpacks-starter

5
star
27

kita

An easy-to-deploy and easy-to-use ACME client service for Kubernetes Ingress instances
Java
4
star
28

simple-boot-image-gradle-plugin

A simple Gradle plugin to build very simple Spring Boot application Docker images
Java
4
star
29

try-oauth2-login

This application tests out Spring Boot's OAuth2 support for pre-defined providers
Java
3
star
30

try-luckperms-with-db

3
star
31

go-ssh-shell

Go module that serves SSH sessions with an interactive shell
Go
3
star
32

docker-grakn

This Docker image packages the GRAKN.AI knowledge graph database
Shell
3
star
33

try-nextjs-auth0

React frontend, rendered by Next.js, authenticated by Auth0, and backend API by Spring Boot
JavaScript
3
star
34

example-self-monitor-kafka-app

An example Spring Boot application that is both a Kafka producer and consumer that reports out its own kakfa performance metrics to InfluxDB
Java
3
star
35

discord-github-melder-bot

Discord bot that provides a command for users to link their Github user and apply contributor role
Java
3
star
36

junit-rule-docker

A JUnit rule that manages a Docker container lifecycle around test statements.
Java
3
star
37

itzg

3
star
38

go-tcp-relay

A little experiment to write a Go application that can relay incoming TCP connections to a dynamically requested endpoint
Go
3
star
39

alexa-notes

An Amazon Alexa (aka Echo) skill that provides very basic note taking capability.
Java
3
star
40

cert-helper

A Docker image that helps with self-signed/cluster signed certificate creation for use in other Docker containers
Shell
3
star
41

github-release-watcher

A Spring Boot + React web app that shows most recent releases of repositories you have starred.
Java
3
star
42

draw-legra

Trying out the Legra library in a React app
JavaScript
2
star
43

docker-kafka-multiarch

Shell
2
star
44

maven-metadata-release

A little utility to output the release identified by a maven-metadata.xml local/remote file
Go
2
star
45

kafka-slurp

Java
2
star
46

docker-rabbitmq-stomp

Extension of the official rabbitmq image that enables the rabbitmq_stomp plugin
2
star
47

file-tree-as-json

Walks one or more directories capturing the file/directory tree into a JSON format
Java
2
star
48

docker-apacheds

This image provides a streamlined ApacheDS server
2
star
49

docker-znc

A ZNC, an IRC bouncer, image with an easy option to switch between SSL and non-SSL serving
Shell
2
star
50

alt-codes

Little next.js web app that shows alt codes
JavaScript
2
star
51

prune-branches

CLI that prunes local git branches that have been merged
Java
2
star
52

test-github-releaser-plugin

Ruby
2
star
53

docker-mongo-backups

A very simplistic container to perform periodic backups of an adjacent mongo container
Shell
2
star
54

homebrew-tap

Homebrew tap for itzg's apps
Ruby
2
star
55

jsonschema2pojo-rules-bettermaps

Custom RuleFactory for the jsonschema2pojo facility that identifies additionalProperties that only declare a simple type and generates a Map without an intermediate property POJO.
Java
2
star
56

forge-downloader

A simple utility for downloading Forge installers
Go
1
star
57

spring-etcd

etcd v2 client based on Spring's RestTemplate
Java
1
star
58

getter

A little Java program that is useful inside containers where curl is not yet installed
Java
1
star
59

spring-boot-with-reactjs

JavaScript
1
star
60

docker-protoc2

This Google Protobuf compiler image is for projects that need an "ancient" version of the protoc compiler.
1
star
61

scoop-bucket

My apps published for installation via scoop
1
star
62

openstack-utils

Helper scripts install OpenStack on Ubuntu
Shell
1
star
63

carina-cli

This is a Dockerization of the Carina CLI, which is used to manage your Rackspace Carina clusters from the command-line.
Shell
1
star
64

artifactory-settings-gen

Java
1
star
65

try-spring-boot-with-jib

Java
1
star
66

go-metrics

This library provides Go applications a simple way to report dimensional statistics with optional support for Influx line protocol
Go
1
star
67

pom-tweaker

A simple Java tool to perform version, etc tweaking of Maven pom.xml files.
Java
1
star
68

try-nextjs-jwt-boot-api

Next.js web application that uses JWT issued by Auth0 to access authenticated Spring Boot API
JavaScript
1
star
69

libvirt-tools

A repo of some tools to simplify working with libvirt, kvm, qemu
Shell
1
star
70

test-webhooks

1
star
71

example-spring-security-impersonate

An example Spring MVC Security application that introduces a custom security filter to allow for user impersonation during development/testing.
Shell
1
star
72

mc-bds-helper

Go
1
star
73

LearningJava

Contains material teaching Java for new programmers
HTML
1
star
74

test-workflows

1
star
75

nextjs-bootstrap-validation

JavaScript
1
star
76

try-jpa-pk-and-fk

Spring Data JPA app that tries out an entity that uses a OneToOne relationship as primary key
Java
1
star
77

mcadmin-versions

Extracts the Spigot and CraftBukkit versions published by mcadmin site.
Java
1
star
78

try-oauth2-validate-aud

Java
1
star
79

utils

Java
1
star
80

img-hacker

A little golang tool to run some image manipulation
Go
1
star
81

spring-security-spa

Provides Spring Security filters and supporting classes that streamline the use of authentication and registration within Single Page web Applications
Java
1
star
82

docker-kodexplorer

This image runs KodExplorer
Dockerfile
1
star
83

logstash-filter-docker_container

A Logstash (>1.5) filter plugin to resolve Docker container IDs into the container's name
Ruby
1
star
84

docker-thrift

A Docker image for running the thrift generator
1
star
85

try-sb-test-properties-loading

This Spring Boot code demonstrates several ways of using a type-safe configuration class during unit testing
Java
1
star
86

imdb-warzat

JavaScript
1
star
87

docker-ubuntu-remote-dev

Shell
1
star
88

spring-security-vault-provider-example

Example Spring Boot web app using Vault as the Spring Security authentication provider
Java
1
star
89

atom-greppen-grok

An Atom editor package to grep and grok text into just what you want
CoffeeScript
1
star
90

nuc-es

My home NUC setup for ES and friends
1
star
91

stackdriver-spring-boot-autoconfigure

Provides a Spring Boot auto-configuration to export actuator metrics to Google Cloud's Stackdriver
Java
1
star
92

try-thanos

Contains a set of Kubernetes manifest files to try out a "single node" deployment of Thanos using MinIO as an S3 object store.
1
star
93

try-spring-jta-rollback-listener

This application tests the use of a @TransactionalEventListener in order to perform custom rollback processing.
Java
1
star
94

try-nextjs-cookie-auth-api

Very contrived Next.js application to simulate an authentication flow that uses next-cookies to provide server and client side with auth code
JavaScript
1
star
95

logstash-output-elasticsearch-groom

A logstash output plugin that will perform event triggered grooming (aka pruning) of time-series indices especially those created by logstash-output-elasticsearch.
Ruby
1
star
96

jenkins-vagrant-example

Brings up three Vagrant VMs with one Jenkins master and two slaves configured to run Docker pipeline jobs
1
star
97

chef-slurper

A little utility to bridge the worlds of Ansible and Chef
Go
1
star