forked from CenturyLinkLabs/panamax-contest-templates
-
Notifications
You must be signed in to change notification settings - Fork 2
/
minecraft_server_annsonn.pmx
42 lines (31 loc) · 1.54 KB
/
minecraft_server_annsonn.pmx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
---
name: Minecraft Server
description: "Minecraft server.\r\n\r\nForward port: 25565"
keywords: ''
type: Default
documentation: |-
Minecraft Server
========
Expose port 25565.
This docker image provides a Minecraft Server that will automatically download the latest stable, latest snapshot, or any specific server version.
Here are a list of commands you an run with the template:
To simply use the latest stable version, run
docker run -d -p 25565:25565 minecraft-server
where the default server port, 25565, will be exposed on your host machine.
In order to persist the Minecraft data, which you probably want to do for a real server setup, use the -v argument to map a local path to the /data' path in the container, such as
docker run -d -v /path/on/host:/data -p 25565:25565 minecraft-server
To use a different Minecraft version, pass the VERSION environment variable, which can have the value * LATEST * SNAPSHOT * (or a specific version, such as “1.7.9”)
For example, to use the latest snapshot:
docker run -d -e VERSION=SNAPSHOT -p 25565:25565 minecraft-server
or a specific version:
docker run -d -e VERSION=1.7.9 -p 25565:25565 minecraft-server
The message of the day, shown below each server entry in the UI, can be changed with the MOTD environment variable, such as
docker run -d -e 'MOTD=My Server' -p 25565:25565 minecraft-server
images:
- name: itzg_minecraft-server_latest
source: itzg/minecraft-server:latest
type: Default
ports:
- host_port: '25565'
container_port: '25565'
proto: TCP