A simple Paper server for Minecraft that self terminates
6.1K
Runs a simple Alpine Linux-based Paper server for Minecraft with AWS costs in mind. Comes preinstalled with the Servinator plugin that stops the server if there are no players connected.
Deprecation Notice: As of version 1.20.4-454, the ECS features have been removed from Servinator. ECS service modifications are better handled by an external service as they would prevent the Paper server from terminating properly
To run with an interactive shell, which gives you the ability to run commands from the Paper console:
docker run --name papermc -ti -p 0.0.0.0:25565:25565 sharpscontainer/paper-mc:latest
Alternatively, you can run the container in a detached state and use docker attach later to access the shell.
docker run --name papermc -d -p 0.0.0.0:25565:25565 sharpscontainer/paper-mc:latest
docker attach papermc
Server data is stored in the container at /home/paper. To save this data, you can simply mount a volume on the container:
docker run --name papermc -d -p 0.0.0.0:25565:25565 -v server:/home/paper sharpscontainer/paper-mc:latest
SERVINATOR_INTERVALDefines the interval, in minutes, that Servinator should check for player connections starting when the plugin is enabled during server startup. The default value is 5.
ECS_ENABLED (DEPRECATED as of 1.20.4-454)Boolean used to enable ECS service updates. When enabled, Servinator will attempt to update the service an ECS Task Definition belongs to and set its desired count to zero. This functionality is disabled by default.
ECS_CLUSTER_ARN (DEPRECATED as of 1.20.4-454)The ARN of the ECS Cluster containing the Service the Task is running in. Servinator uses the cluster ARN to update the required service. The default value for this cannot be used if ECS_ENABLED is true.
ECS_SERVICE_ARN (DEPRECATED as of 1.20.4-454)The ARN of the ECS Service the Task is running in. Servinator uses the service ARN to update the service definition. The default value for this cannot be used if ECS_ENABLED is true.
Depending on what resources have been allocated to the ECS Task Definition, it may be wise to also set the JAVA_TOOL_OPTIONS to configure additional options for your server. See Aikar's Flags, for more information on recommended values.
In order to update ECS Service definitions, the Task Definition must have a Task Role (NOT A TASK EXECUTION ROLE) that grants it access to update the service. An example of an IAM policy that would allow Service updates looks like this:
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "VisualEditor0",
"Effect": "Allow",
"Action": [
"ecs:UpdateService",
"ecs:DescribeServices",
],
"Resource": [
// the service ARN to update (this should be the same as the ECS_SERVICE_ARN environment variable)
"arn:aws:ecs:us-east-1:xxxxxxxxxxxx:service/minecraft/minecraft-paper"
]
}
]
}
Content type
Image
Digest
sha256:cd8ce31ea…
Size
204.1 MB
Last updated
over 1 year ago
docker pull sharpscontainer/paper-mc