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" ]