Browse Source

Initial commit

master
Dave Pedu 5 years ago
commit
a92ae575b9
  1. 17
      Dockerfile
  2. 22
      README.md
  3. 3
      copyjars.sh
  4. 3
      eula.txt
  5. BIN
      spigot-1.9.2.jar
  6. 13
      spigot.conf
  7. 2
      supervisor.conf

17
Dockerfile

@ -0,0 +1,17 @@
FROM ubuntu:trusty
RUN useradd --uid 1000 mcserver && \
apt-get update && \
apt-get install -y openjdk-7-jre-headless supervisor && \
mkdir -p /srv/spigot/ /srv/spigot-default/ && \
chown -R mcserver:mcserver /srv/spigot/
ENV MEMLIMIT=1024m
ADD copyjars.sh /usr/local/bin/
ADD spigot-1.9.2.jar /srv/spigot-default/spigot.jar
ADD eula.txt /srv/spigot-default/
ADD supervisor.conf /etc/supervisor/conf.d/
ADD spigot.conf /etc/supervisor/conf.d/
ENTRYPOINT ["supervisord"]

22
README.md

@ -0,0 +1,22 @@
# docker-spigot
**A setup for spigot within docker.**
Currently minecraft 1.9.2.
## Quick start
* Clone: `git clone ssh://git@gitlab.davepedu.com:222/dave/docker-spigot.git`
* Build: `cd docker-nexus ; docker build -t spigot .`
* Run: `docker run nexus`
## Persistence
Mount `/srv/spigot/` to the host. This dir should be owned by UID 1000:
* `-v /host/path/data/:/srv/spigot/`
## Protips
* Memory limit: `-e MEMLIMIT=512m`. Defaults to 1024m.

3
copyjars.sh

@ -0,0 +1,3 @@
#!/bin/bash
test ! -f /srv/spigot/spigot.jar && mv /srv/spigot-default/spigot.jar /srv/spigot/
test ! -f /srv/spigot/eula.txt && mv /srv/spigot-default/eula.txt /srv/spigot/

3
eula.txt

@ -0,0 +1,3 @@
#By changing the setting below to TRUE you are indicating your agreement to our EULA (https://account.mojang.com/documents/minecraft_eula).
#Sat Apr 16 19:36:40 PDT 2016
eula=true

BIN
spigot-1.9.2.jar

Binary file not shown.

13
spigot.conf

@ -0,0 +1,13 @@
[program:copyjar]
command=/usr/local/bin/copyjars.sh
priority=1
autorestart=false
startretries=0
[program:spigot]
command=java -Xmx%(ENV_MEMLIMIT)s -jar spigot.jar --nojline
user=mcserver
priority=10
redirect_stderr=true
directory=/srv/spigot/

2
supervisor.conf

@ -0,0 +1,2 @@
[supervisord]
nodaemon=true
Loading…
Cancel
Save