专属域名
文档搜索
轩辕助手
Run助手
邀请有礼
返回顶部
快速返回页面顶部
收起
收起工具栏
轩辕镜像 官方专业版
轩辕镜像 官方专业版轩辕镜像 官方专业版官方专业版
首页个人中心搜索镜像

交易
充值流量我的订单
工具
提交工单镜像收录一键安装
Npm 源Pip 源Homebrew 源
帮助
常见问题
其他
关于我们网站地图

官方QQ群: 1072982923

nimmis/spigot Docker 镜像 - 轩辕镜像

spigot
nimmis/spigot
自动构建
nimmis
Minecraft server SPIGOT on Ubuntu 20.04 with Java (Eclipse Adoptium) 8/11/16/17/18/20/21
56 收藏0 次下载
🚀 稳定镜像源 = 更少宕机 + 更低运维成本
镜像简介版本下载
🚀 稳定镜像源 = 更少宕机 + 更低运维成本

Minecraft server SPIGOT on Ubuntu 20.04 with Java (Eclipse Adoptium) 8/11/16/17/18/20/21

![]([***]

NOW works with Minecraft 1.20

This is a major change in logic to build the correct version of spigot so some combination of conditions may not compile correctly. Please make an issue so I can correct it. There will be another build shortly with another feature

Java bug on version 1.17 with 1 core add -e OTHER_JAVA_OPTS=-Djava.util.concurrent.ForkJoinPool.common.parallelism=1 as workaround

This docker image builds and runs the spigot version of minecraft.

If the spigot.jar is not found in the minecraft directory the system pulls down BuildTool and builds a new spigot.jar from the latest released minecraft.jar

Each time the container is started the presence of the file /minecraft/spigot.jar, if the file is missing a build of spigot.jar is started.

The spigot daemon is started with supervisord, see my Ubuntu container for a more detailed description of my implementation of an init-process in ubuntu, see nimmis/ubuntu

What's new is

  • Possibility to change spigot versions i running containers
  • Detects version if mc-directory already has a precompiled version active
  • Adjust java version depending of MC version, downloads additional java version if needed
  • Support for Minecraft version 1.20
  • Support for legacy 1.8 (from 1.8.3) with java 8 (use on you own risk)

Why not a precompiled version of spigot is included

Due to legal reasons you can build it yourself but you can't redistribute the finished jar file.

Starting the container

To run the latest stable version of this docker image run

docker run -d -p 25565:25565 -e EULA=true nimmis/spigot

the parameter

-e EULA=true

The is because Mojang now requires the end user to access their EULA, located at [***] the be able to start the server.

the parameter

-p 25565:25565

specifies on which external port the internal 25565 should be connected, in this case the same. If you only type -p 25565 it will connect to a random port on the machine.

Giving the container a name

To make it easier to handle you container you can give it a name instead of the long number that's normally given to it, add a

--name spigot

to the run command to give it the name minecraft, then you can start it easier with

docker start spigot
docker stop spigot

First time run

This will take a couple of minutes depending on computer and network speed. It will pull down the selected version on BuildTools and build a spigot.jar from the selected minecraft version. This is done in numerous steps so be patient.

You can follow the output from the compilation with this command (assuming that you gave the container the name spigot)

docker logs -f spigot
*** open logfile
*** Run files in /etc/my_runonce/
*** Running /etc/my_runonce/00_dump_info.sh...
Build of nimmis/spigot:latest, date: 2021-12-06T12:54:26Z
Build of nimmis/ubuntu:20.04, date: 2021-07-04T09:06:36Z
*** Running /etc/my_runonce/50_set_timezone...
timezone not set, trying to autodetect
external ip is 95.192.***.***
timezone should be Europe/Stockholm
setting timezone to Europe/Stockholm
*** Running /etc/my_runonce/90_autorestart...
*** Run files in /etc/my_runalways/
*** Running /etc/my_runalways/00_minecraft_owner...
missmatch between directory owner and minecraft user
Changed owner of minecraft to UID 0
*** Running /etc/my_runalways/10_set_mc_version...
*** Running /etc/my_runalways/50_do_build_spigot...
checking 1.18
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  135k  100  135k    0     0   436k      0 --:--:-- --:--:-- --:--:--  434k
Setting version to 1.18
set java version to 17
Building spigot version (1.18) jar file, be patient

Once the compilation completes the server will start and you will see something like

Success! Everything completed successfully. Copying final .jar files now.
Copying spigot-1.18-R0.1-SNAPSHOT-bootstrap.jar to /build-mc/./spigot-1.18.jar
Saved as ./spigot-1.18.jar
Successfull build of spigot version 1.18
Setting 1.18 as current spigot version
*** Running /etc/my_runalways/85_fix_startsh...
start.sh missing, creating link for /minecraft/start.sh
*** Running /etc/my_runalways/90_eula...
*** Booting supervisor daemon...
*** Supervisor started as PID 781
*** Started processes via Supervisor......
crond                            RUNNING   pid 783, uptime 0:00:04
spigot                           RUNNING   pid 784, uptime 0:00:04
syslog-ng                        RUNNING   pid 785, uptime 0:00:03

you can then exit from the log with CTRL-C

Selecting version to compile

You can now change the minecraft version after you started the container the first time.

defining version on first start

If you don't specify this parameter it will check the minecraft directory in the container to see if there is a previous compiled version linked. If so the container will use that version.

If no version of spigot is linked (like first time) it will always compile the latest version but if you want a specific version you can specify it by adding

-e SPIGOT_VER=<version>

where is the version you would like to use, to build it with version 1.18 add

-e SPIGOT_VER=1.18

to the docker run line.

change version in a running container

There is a command to change minecraft version in a running container

docker exec -it spigot set_mc_ver <version>

when the command is executed it will check if there is a compiled version already in the minecraft folder, if not it will build it.

It first stops the running minecraft, changes java version if needed (download if missing), compiles a new spigot if needed and then starts minecraft again.

It is not recommended to downgrade version as the world-information is not backwards compatible.

versions available

Please check the web page for BuildTools to get the latest information.

setup memory to use

There are two environment variables to set maximum and initial memory for spigot.

MC_MAXMEM

Sets the maximum memory to use m for MB or g for GB, defaulting to 1 GB. To set the maximum memory to 2 GB add this environment variable

-e MC_MAXMEM=2g
MC_MINMEM

Sets the initial memory reservation used, use m for MB or g for GB, if this parameter is not set, it is set to MC_MAXMEM. To set the initial size to 512 MB

-e MC_MINMEM=512m
SPIGOT_AUTORESTART

This variable controls the behavior of the container when the stop command is issued inside minecraft

-e SPIGOT_AUTORESTART=yes

Which is the default behavior and does not need to be specified, the minecraft server will autostart if the stop command is issued.

-e SPIGOT_AUTORESTART=no

If the stop command is issued the minecraft server will stay down until the container is restarted or the command mc_start is issued

OTHER_JAVA_OPS

Allows adding other Java options when starting minecraft

-e OTHER_JAVA_OPS=

look at the last output from the spigot server

To get an output of the latest events from the spigot server type

docker exec spigot mc_log

and you will see the last 10 lines from the output, this is what you will see after startup

Abort with CTRL-C
[13:02:15 INFO]: Zombie Aggressive Towards Villager: true
[13:02:15 INFO]: Experience Merge Radius: 3.0
[13:02:15 INFO]: Preparing start region for level 0 (Seed: 506255305130990210)
[13:02:16 INFO]: Preparing spawn area: 22%
[13:02:17 INFO]: Preparing spawn area: 99%
[13:02:17 INFO]: Preparing start region for level 1 (Seed: 506255305130990210)
[13:02:18 INFO]: Preparing spawn area: 95%
[13:02:18 INFO]: Preparing start region for level 2 (Seed: 506255305130990210)
[13:02:18 INFO]: Server permissions file permissions.yml is empty, ignoring it
[13:02:18 INFO]: Done (3.650s)! For help, type "help" or "?"

It will continue to output everything from the console until you press CTRL-C

sending commands to the server console

You don't need to have an interactive container to be able to send commands to the console. To send a command to set the time to day you type

docker exec spigot mc_send "time set day"

If this was the first command issued after a start the output should look like

[13:02:15 INFO]: Zombie Aggressive Towards Villager: true
[13:02:15 INFO]: Experience Merge Radius: 3.0
[13:02:15 INFO]: Preparing start region for level 0 (Seed: 506255305130990210)
[13:02:16 INFO]: Preparing spawn area: 22%
[13:02:17 INFO]: Preparing spawn area: 99%
[13:02:17 INFO]: Preparing start region for level 1 (Seed: 506255305130990210)
[13:02:18 INFO]: Preparing spawn area: 95%
[13:02:18 INFO]: Preparing start region for level 2 (Seed: 506255305130990210)
[13:02:18 INFO]: Server permissions file permissions.yml is empty, ignoring it
[13:02:18 INFO]: Done (3.650s)! For help, type "help" or "?"
[13:12:35 INFO]: Set the time to 1000

It will continue to output everything from the console until you press CTRL-C

using the minecraft op command

To make yourself operator in the game use mc_send command, for example give the user myuser op use the command.

docker exec spigot mc_send op myuser
using the minecraft stop command

By default the minecraft server will automatically restart on a stop inside the minecraft application. You can override this behavior by using

-e SPIGOT_AUTORESTART=no

This will prevent the server automatically restarting and minecraft has to be started again with the mc_start command

starting and stopping the server

To stop the server but not the container do

docker exec spigot mc_stop

To start it after being stopped do

docker exec spigot mc_start

Finally to restart it do

docker exec spigot mc_restart

stopping the container

When the container is stopped with the command

docker stop spigot

the spigot server is shutdown nicely with a console stop command to give it time to save everything before stopping the container. If you look in the output from the server you will see something like

[13:01:51 INFO]: Stopping the server
[13:01:51 INFO]: Stopping server
[13:01:51 INFO]: Saving players
[13:01:51 INFO]: nimmis lost connection: Server closed
[13:01:51 INFO]: nimmis left the game.
[13:01:51 INFO]: Saving worlds
[13:01:51 INFO]: Saving chunks for level 'world'/Overworld
[13:01:51 INFO]: Saving chunks for level 'world_nether'/Nether
[13:01:51 INFO]: Saving chunks for level 'world_the_end'/The End

Having the minecraft files on the host machine

If you delete the container all your files in minecraft will be gone. To save them where it's easier to edit and do a backup of the files you can attach a directory from the host machine (where you run the docker command) and attach it to the local file system in the container. The syntax for it is

-v /host/path/to/dir:/container/path/to/dir

To attach the minecraft directory in the container to directory /home/nimmis/mc-srv you add

-v /home/nimmis/mc-srv:/minecraft
problems with external mounted volumes

When a external volume is mounted the UID of the owner of the volume may not match the UID of the minecraft user (1000). This can result in problems with write/read access to the files.

To address this problem a check is done between UID of the owner of /minecraft and the UID of the user minecraft. If there is a mismatch the UID of the minecraft user is changed to match the UID of the directory.

If you don't want to do this and want to manually set the UID of the minecraft user there is a variable named SPIGOT_UID which defines the minecraft user UID, adding

-e SPIGOT_UID=1132

sets the minecraft user UID to 1132.

Other commands available to container

The syntax is

docker exec -ti <spigot container name> <command> <paramaters>
command: get_mc_versions

If you get minecraft version not found and it is a version released after to started the container the first time. You need to update the list of available versions, do

docker exec -it <spigotverson> get_mc_versions

and you should get an output simular to

docker exec -it spigot get_mc_versions
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                             Dload  Upload   Total   Spent    Left  Speed
100  135k  100  135k    0     0   498k      0 --:--:-- --:--:-- --:--:--  498k

and the versionlist is updated.

Old versions news

  • Updated java version to 17 which is a LTS version
  • Adopt moved to Eclipe Foundation and changed name to Adoptium
  • Updated java version to 16 to compile minecraft 1.17
  • Switched to Adopt OpenJDK
  • Fix for problem introduced during fall of 2017 for both Windows 10 and MacOS versions of docker, failed to build new versions of spigot
  • Autodetection of timezone if container has access to internet
  • adjust minecraft user UID to match mounted volume
  • selectable memory size for the Java process
  • selectable spigot version
  • do a nice shutdown of the server when the docker stop command is issued
  • docker accessible commands to
    • start/stop/restart the spigot server
    • send console commands to the server
    • look at console output from the server

Issues

If you have any problems with or questions about this image, please contact us by submitting a ticket through a GitHub issue

  1. Look to see if someone already filled the bug, if not add a new one.
  2. Add a good title and description with the following information.
  • if possible an copy of the output from cat /etc/BUILDS/* from inside the container
  • any logs relevant for the problem
  • how the container was started (flags, environment variables, mounted volumes etc)
  • any other information that can be helpful

Contributing

You are invited to contribute new features, fixes, or updates, large or small; we are always thrilled to receive pull requests, and do our best to process them as fast as we can.

Future features

  • automatic backup
  • plugins
  • more....
查看更多 spigot 相关镜像 →
hapewe/spigot logo
hapewe/spigot
多平台(树莓派/PC等)Spigot服务器Docker镜像,支持Kubernetes部署。
100K+ pulls
上次更新:未知
cmunroe/spigot logo
cmunroe/spigot
基于Alpine的Docker镜像,用于部署和运行Bukkit、Spigot及PaperMC Minecraft服务器。
3100K+ pulls
上次更新:未知
buddyspencer/spigot logo
buddyspencer/spigot
用于构建并运行最新版本Minecraft Spigot服务器的Docker镜像,支持AMD64和ARM64架构,便于快速部署和管理Minecraft服务器。
110K+ pulls
上次更新:未知

轩辕镜像配置手册

探索更多轩辕镜像的使用方法,找到最适合您系统的配置方式

登录仓库拉取

通过 Docker 登录认证访问私有仓库

Linux

在 Linux 系统配置镜像服务

Windows/Mac

在 Docker Desktop 配置镜像

Docker Compose

Docker Compose 项目配置

K8s Containerd

Kubernetes 集群配置 Containerd

K3s

K3s 轻量级 Kubernetes 镜像加速

Dev Containers

VS Code Dev Containers 配置

MacOS OrbStack

MacOS OrbStack 容器配置

宝塔面板

在宝塔面板一键配置镜像

群晖

Synology 群晖 NAS 配置

飞牛

飞牛 fnOS 系统配置镜像

极空间

极空间 NAS 系统配置服务

爱快路由

爱快 iKuai 路由系统配置

绿联

绿联 NAS 系统配置镜像

威联通

QNAP 威联通 NAS 配置

Podman

Podman 容器引擎配置

Singularity/Apptainer

HPC 科学计算容器配置

其他仓库配置

ghcr、Quay、nvcr 等镜像仓库

专属域名拉取

无需登录使用专属域名

需要其他帮助?请查看我们的 常见问题Docker 镜像访问常见问题解答 或 提交工单

镜像拉取常见问题

轩辕镜像免费版与专业版有什么区别?

免费版仅支持 Docker Hub 访问,不承诺可用性和速度;专业版支持更多镜像源,保证可用性和稳定速度,提供优先客服响应。

轩辕镜像支持哪些镜像仓库?

专业版支持 docker.io、gcr.io、ghcr.io、registry.k8s.io、nvcr.io、quay.io、mcr.microsoft.com、docker.elastic.co 等;免费版仅支持 docker.io。

流量耗尽错误提示

当返回 402 Payment Required 错误时,表示流量已耗尽,需要充值流量包以恢复服务。

410 错误问题

通常由 Docker 版本过低导致,需要升级到 20.x 或更高版本以支持 V2 协议。

manifest unknown 错误

先检查 Docker 版本,版本过低则升级;版本正常则验证镜像信息是否正确。

镜像拉取成功后,如何去掉轩辕镜像域名前缀?

使用 docker tag 命令为镜像打上新标签,去掉域名前缀,使镜像名称更简洁。

查看全部问题→

用户好评

来自真实用户的反馈,见证轩辕镜像的优质服务

用户头像

oldzhang

运维工程师

Linux服务器

5

"Docker访问体验非常流畅,大镜像也能快速完成下载。"

轩辕镜像
镜像详情
...
nimmis/spigot
官方博客Docker 镜像使用技巧与技术博客
热门镜像查看热门 Docker 镜像推荐
一键安装一键安装 Docker 并配置镜像源
咨询镜像拉取问题请 提交工单,官方技术交流群:1072982923
轩辕镜像面向开发者与科研用户,提供开源镜像的搜索和访问支持。所有镜像均来源于原始仓库,本站不存储、不修改、不传播任何镜像内容。
咨询镜像拉取问题请提交工单,官方技术交流群:
轩辕镜像面向开发者与科研用户,提供开源镜像的搜索和访问支持。所有镜像均来源于原始仓库,本站不存储、不修改、不传播任何镜像内容。
官方邮箱:点击复制邮箱
©2024-2026 源码跳动
官方邮箱:点击复制邮箱Copyright © 2024-2026 杭州源码跳动科技有限公司. All rights reserved.