initial
This commit is contained in:
commit
9ecadedb69
3 changed files with 64 additions and 0 deletions
27
Dockerfile
Normal file
27
Dockerfile
Normal file
|
@ -0,0 +1,27 @@
|
|||
FROM zombi/base
|
||||
MAINTAINER Chris <chris@zom.bi>
|
||||
EXPOSE 8123
|
||||
EXPOSE 25565
|
||||
EXPOSE 25565/udp
|
||||
|
||||
ENV \
|
||||
DEPENDENCIES="openjdk-7-jre-headless git wget tar"
|
||||
|
||||
RUN \
|
||||
apt-get update &&\
|
||||
apt-get -y install ${DEPENDENCIES} &&\
|
||||
apt-get clean
|
||||
|
||||
WORKDIR /usr/games
|
||||
VOLUME ["/usr/games/mcserv"]
|
||||
RUN \
|
||||
chown -R games: . &&\
|
||||
chmod 775 mcserv
|
||||
|
||||
USER games
|
||||
WORKDIR /usr/games/mcserv
|
||||
|
||||
ADD start.sh /opt/start.sh
|
||||
|
||||
ENTRYPOINT [ "/opt/start.sh" ]
|
||||
|
21
README.md
Normal file
21
README.md
Normal file
|
@ -0,0 +1,21 @@
|
|||
## bukkit server
|
||||
bukkit server
|
||||
|
||||
### Building bukkit-server
|
||||
|
||||
```
|
||||
docker build -t zombi/spigot-server .
|
||||
```
|
||||
|
||||
### Running bukkit-server
|
||||
|
||||
```
|
||||
docker run -it -d \
|
||||
-v /data/minecraft/mc-basti-new:/usr/games/mcserv \
|
||||
--name bukkit-basti \
|
||||
-p 8123:8123/tcp \
|
||||
-p 25569:25565/udp \
|
||||
-p 25569:25565/tcp \
|
||||
zombi/spigot-server
|
||||
```
|
||||
|
16
start.sh
Executable file
16
start.sh
Executable file
|
@ -0,0 +1,16 @@
|
|||
#!/bin/bash
|
||||
|
||||
# check if the spigot is alredy built
|
||||
cd /usr/games/mcserv
|
||||
|
||||
if ls /usr/games/mcserv/spigot*.jar &> /dev/null
|
||||
then
|
||||
spigot_filename="$(ls -1 /usr/games/mcserv/spigot*.jar)"
|
||||
echo "eula=true" > /usr/games/mcserv/eula.txt
|
||||
java -Xms512M -Xmx1G -XX:MaxPermSize=128M -XX:+UseConcMarkSweepGC -jar "${spigot_filename}"
|
||||
else
|
||||
echo "spigot not built yet. rebuilding it"
|
||||
wget -O /usr/games/mcserv/BuildTools.jar "https://hub.spigotmc.org/jenkins/job/BuildTools/lastSuccessfulBuild/artifact/target/BuildTools.jar"
|
||||
java -jar BuildTools.jar
|
||||
fi
|
||||
|
Loading…
Reference in a new issue