-
Notifications
You must be signed in to change notification settings - Fork 81
/
Copy pathDockerfile
38 lines (25 loc) · 974 Bytes
/
Dockerfile
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
FROM nimmis/java:openjdk-8-jdk
MAINTAINER nimmis <[email protected]>
# SPIGOT_HOME default directory for SPIGOT-server
# SPIGOT_VER default minecraft version to compile
# SPIGOT_AUTORESTART set to yes to restart if minecraft stop command is executed
ENV SPIGOT_HOME=/minecraft \
SPIGOT_VER=latest \
SPIGOT_AUTORESTART=yes
# add extra files needed
COPY rootfs /
RUN apt-get update && \
# upgrade OS
apt-get -y dist-upgrade && \
# Make info file about this build
printf "Build of nimmis/spigot:latest, date: %s\n" `date -u +"%Y-%m-%dT%H:%M:%SZ"` > /etc/BUILDS/spigot && \
# install application
apt-get install -y wget git && \
# Make special user for minecraft to run in
/usr/sbin/useradd -s /bin/bash -d /minecraft -m minecraft && \
# remove apt cache from image
apt-get clean all
# Docker Healthcheck:
HEALTHCHECK CMD /usr/local/bin/healthcheck.sh
# expose minecraft port
EXPOSE 25565