forked from yujiod/docker-mineos
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
53 lines (42 loc) · 1.62 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
51
52
53
FROM ubuntu:impish
#update and accept all prompts
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y \
supervisor \
rdiff-backup \
screen \
rsync \
git \
curl \
rlwrap \
openjdk-17-jre-headless \
ca-certificates-java \
build-essential \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
RUN curl https://nodejs.org/dist/v8.9.4/node-v8.9.4-linux-x64.tar.gz -o /tmp/node.tar.gz
RUN mkdir -p /usr/nodejs && cd /usr/nodejs && tar -xf /tmp/node.tar.gz
RUN ln -s /usr/nodejs/node-v8.9.4-linux-x64/bin/node /usr/bin/node
RUN ln -s /usr/nodejs/node-v8.9.4-linux-x64/bin/npm /usr/bin/npm
RUN ln -s /usr/nodejs/node-v8.9.4-linux-x64/bin/npx /usr/bin/npx
RUN npm i -g npm@6
#download mineos from github
RUN mkdir /usr/games/minecraft \
&& cd /usr/games/minecraft \
&& git clone --depth=1 https://github.com/hexparrot/mineos-node.git -b 1.4.0 . \
&& cp mineos.conf /etc/mineos.conf \
&& chmod +x webui.js mineos_console.js service.js
WORKDIR /usr/games/minecraft
RUN npm config set unsafe-perm true
#build npm deps and clean up apt for image minimalization
RUN chmod 777 -R /usr/games/minecraft && chmod 777 -R /root && npm install
#configure and run supervisor
# RUN cp /usr/games/minecraft/init/supervisor_conf /etc/supervisor/conf.d/mineos.conf
WORKDIR /usr/games/minecraft
CMD ["node", "webui.js"]
# CMD ["/usr/bin/supervisord", "-n", "-c", "/etc/supervisor/supervisord.conf"]
#entrypoint allowing for setting of mc password
COPY entrypoint.sh /entrypoint.sh
RUN chmod 777 /entrypoint.sh && chmod +x /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]
EXPOSE 8443 25565-25570
VOLUME /var/games/minecraft