forked from hexparrot/mineos-node
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
50 lines (42 loc) · 1.59 KB
/
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
FROM debian:jessie
MAINTAINER William Dizon <[email protected]>
#add testing repository for OpenJDK8
RUN echo "deb http://http.debian.net/debian jessie-backports main" >> /etc/apt/sources.list
#update and accept all prompts
RUN apt-get update && apt-get install -y \
supervisor \
rdiff-backup \
screen \
rsync \
git \
curl \
rlwrap \
&& apt-get install -y -t jessie-backports openjdk-8-jre-headless ca-certificates-java \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
#install node from nodesource
RUN curl https://deb.nodesource.com/node_4.x/pool/main/n/nodejs/nodejs_4.6.2-1nodesource1~jessie1_amd64.deb > node.deb \
&& dpkg -i node.deb \
&& rm node.deb
#download mineos from github
RUN mkdir /usr/games/minecraft \
&& cd /usr/games/minecraft \
&& git clone --depth=1 https://github.com/hexparrot/mineos-node.git . \
&& cp mineos.conf /etc/mineos.conf \
&& chmod +x webui.js mineos_console.js service.js
#build npm deps and clean up apt for image minimalization
RUN cd /usr/games/minecraft \
&& apt-get update \
&& apt-get install -y build-essential \
&& npm install \
&& apt-get remove --purge -y build-essential \
&& apt-get autoremove -y \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
#configure and run supervisor
RUN cp /usr/games/minecraft/init/supervisor_conf /etc/supervisor/conf.d/mineos.conf
CMD ["/usr/bin/supervisord", "-n", "-c", "/etc/supervisor/supervisord.conf"]
#entrypoint allowing for setting of mc password
COPY entrypoint.sh /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]
EXPOSE 8443 25565-25570
VOLUME /var/games/minecraft