first commit
This commit is contained in:
commit
1841433d01
3
.gitignore
vendored
Executable file
3
.gitignore
vendored
Executable file
@ -0,0 +1,3 @@
|
||||
*~
|
||||
.DS_Store
|
||||
*.swp
|
24
Dockerfile
Normal file
24
Dockerfile
Normal file
@ -0,0 +1,24 @@
|
||||
FROM thallian/confd-env:latest
|
||||
|
||||
RUN apk add --no-cache openjdk8 git openssl bash
|
||||
|
||||
RUN addgroup minecraft
|
||||
RUN adduser -h /var/lib/minecraft -D -G minecraft minecraft
|
||||
|
||||
RUN mkdir /tmp/minecraft/
|
||||
RUN wget "https://hub.spigotmc.org/jenkins/job/BuildTools/lastSuccessfulBuild/artifact/target/BuildTools.jar" -O /tmp/minecraft/BuildTools.jar
|
||||
RUN cd /tmp/minecraft && bash -c 'java -jar BuildTools.jar'
|
||||
|
||||
RUN cp /tmp/minecraft/spigot*.jar /var/lib/minecraft/spigot.jar
|
||||
RUN cp /tmp/minecraft/craftbukkit*.jar /var/lib/minecraft/craftbukkit.jar
|
||||
|
||||
RUN rm -r /tmp/minecraft
|
||||
RUN apk del git bash
|
||||
|
||||
ADD /rootfs /
|
||||
|
||||
RUN chown -R minecraft:minecraft /var/lib/minecraft
|
||||
|
||||
VOLUME /var/lib/minecraft/world /var/lib/minecraft/world_nether /var/lib/minecraft/world_the_end /var/lib/minecraft/plugins
|
||||
|
||||
EXPOSE 25565
|
6
rootfs/etc/confd/conf.d/server.properties.toml
Normal file
6
rootfs/etc/confd/conf.d/server.properties.toml
Normal file
@ -0,0 +1,6 @@
|
||||
[template]
|
||||
src = "server.properties.tmpl"
|
||||
dest = "/var/lib/minecraft/server.properties"
|
||||
gid = 1000
|
||||
uid = 1000
|
||||
mode = "0660"
|
33
rootfs/etc/confd/templates/server.properties.tmpl
Normal file
33
rootfs/etc/confd/templates/server.properties.tmpl
Normal file
@ -0,0 +1,33 @@
|
||||
generator-settings=
|
||||
use-native-transport=true
|
||||
op-permission-level={{getenv "OP_PERMISSION_LEVEL"}}
|
||||
allow-nether={{getenv "ALLOW_NETHER"}}
|
||||
level-name={{getenv "LEVEL_NAME"}}
|
||||
allow-flight={{getenv "ALLOW_FLIGHT"}}
|
||||
announce-player-achievements={{getenv "ANNOUNCE_PLAYER_ACHIEVEMENTS"}}
|
||||
server-port=25565
|
||||
max-world-size={{getenv "MAX_WORLDSIZE"}}
|
||||
level-type={{getenv "LEVEL_TYPE"}}
|
||||
level-seed={{getenv "LEVEL_SEED"}}
|
||||
force-gamemode=false
|
||||
server-ip=
|
||||
network-compression-threshold=256
|
||||
max-build-height={{getenv "MAX_BUILD_HEIGHT"}}
|
||||
spawn-npcs={{getenv "SPAWN_NPCS"}}
|
||||
white-list={{getenv "WHITELIST"}}
|
||||
spawn-animals={{getenv "SPAWN_ANIMALS"}}
|
||||
hardcore={{getenv "HARDCORE"}}
|
||||
snooper-enabled=true
|
||||
resource-pack-sha1=
|
||||
online-mode={{getenv "ONLINE_MODE"}}
|
||||
resource-pack=
|
||||
pvp={{getenv "PVP"}}
|
||||
difficulty={{getenv "DIFFICULTY"}}
|
||||
enable-command-block=false
|
||||
gamemode={{getenv "GAMEMODE"}}
|
||||
player-idle-timeout={{getenv "PLAYER_IDLE_TIMEOUT"}}
|
||||
max-players={{getenv "MAX_PLAYERS"}}
|
||||
spawn-monsters={{getenv "SPAWN_MONSTERS"}}
|
||||
generate-structures={{getenv "GENERATE_STRUCTURES"}}
|
||||
view-distance={{getenv "VIEW_DISTANCE"}}
|
||||
motd={{getenv "MOTD"}}
|
1
rootfs/etc/fix-attrs.d/01-minecraft
Normal file
1
rootfs/etc/fix-attrs.d/01-minecraft
Normal file
@ -0,0 +1 @@
|
||||
/var/lib/minecraft/ true minecraft 0640 0750
|
4
rootfs/etc/services.d/minecraft/run
Normal file
4
rootfs/etc/services.d/minecraft/run
Normal file
@ -0,0 +1,4 @@
|
||||
#!/usr/bin/with-contenv sh
|
||||
|
||||
cd /var/lib/minecraft
|
||||
exec s6-setuidgid minecraft java -jar /var/lib/minecraft/spigot.jar
|
1
rootfs/var/lib/minecraft/eula.txt
Normal file
1
rootfs/var/lib/minecraft/eula.txt
Normal file
@ -0,0 +1 @@
|
||||
eula=true
|
Loading…
Reference in New Issue
Block a user