This is a Velocity docker image with optimized Java flag provided by official docs.
We use GitHub Actions to track Velocity builds and automatically build Docker image.
Velocity is a next-generation Minecraft proxy focused on scalability and flexibility. It allows server owners to link together multiple Minecraft servers so they may appear as one.
Velocity is blazing fast. Fast logins, fast server switches, optimizations to get the most from your server's hardware, and a focus on security means you can finally have plugins, a highly optimized proxy resilient to attacks, and protection against your backend servers being accessed by malicious users — no compromises required.
Velocity powers some of the world's largest Minecraft networks along with numerous small networks. Velocity can scale to thousands of players per proxy instance. Best of all, it works with Paper, Sponge, Forge, Fabric, and all versions of Minecraft from 1.7.2 to 1.18.1.
For more information, please reach to Velocity official documentation.
With this image, you can create a new Velocity Minecraft proxy server with one command. Here is an example:
sudo docker run -p 25577:25577 dockcenter/velocity:stable
While this command will work just fine in many cases, it is only the bare minimum required to start a functional server and can be vastly improved by specifying some options.
There are many ways to extend the dockcenter/velocity
image. Without trying to support every possible use case, here are just a few that we have found useful.
The dockcenter/velocity
image uses several environment variables which are easy to miss.
JAVA_MEMORY
environment variable is not required, but it is highly recommended to set an appropriate value according to your usage.
This variable is not required, but is highly recommended.
By setting this value, you set the java -Xms
and Xmx
flag.
For more information about JVM memory size, refer to this Oracle guide.
Default: 512M
This optional environment variable is used in conjunction with JAVA_MEMORY
to provide additional java flag.
We use Velocity officially recommended value as the default value.
Default: -XX:+UseStringDeduplication -XX:+UseG1GC -XX:G1HeapRegionSize=4M -XX:+UnlockExperimentalVMOptions -XX:+ParallelRefProcEnabled -XX:+AlwaysPreTouch
The server data is stored in /data
folder, and we create a volume for you.
To use your host directory to store data, please mount volume by adding the following options:
Using volume:
-v <my_volume_name>:/data
Using bind mount:
-v </path/to/folders>:/data
The dockcenter/velocity
images come in many flavors, each designed for a specific use case.
This is the stable image. If you are unsure about what your needs are, you probably want to use this one. It is designed to be used both as a throw away container (mount your source code and start the container to start your app), as well as the base to build other images off of.
This is the development build of the image. Only use this image when you need the cutting edge features or want to try something new.
It is not recommended to run this image in production environment.
This is the snapshot image for each development build.
The latest snapshot build is tagged latest
.
It is not recommended to run these image in production environment.
Be careful using this container image as you must meet the obligations and conditions of the GPLv3 provided by the Velocity development team.
The code for the project that builds the dockcenter/velocity
image and pushes it to Docker Hub is distributed under the MIT License.
Please, don't confuse the two licenses.