From b49c634f074fbc0b40527190e93e104409862113 Mon Sep 17 00:00:00 2001 From: William Dizon Date: Wed, 2 Mar 2016 16:24:14 -0700 Subject: [PATCH] changed dockerfile to debian jessie, added node --- Dockerfile | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index f8b38a22..fe2a48be 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM node:5 +FROM debian:jessie MAINTAINER William Dizon #arbitrarily assigned ports for 5 servers. change if you need to. @@ -12,25 +12,35 @@ RUN echo "deb http://http.debian.net/debian jessie-backports main" >> /etc/apt/s #update and accept all prompts RUN apt-get update && apt-get install -y \ + build-essential \ supervisor \ rdiff-backup \ screen \ openjdk-8-jre-headless \ rsync \ git \ - && apt-get clean \ - && rm -rf /var/lib/apt/lists/* + curl \ + rlwrap +#install node from nodesource +RUN curl https://deb.nodesource.com/node_4.x/pool/main/n/nodejs/nodejs_4.3.1-1nodesource1~jessie1_amd64.deb > node.deb \ + && dpkg -i node.deb \ + && rm node.deb + +#create mineos directories RUN mkdir -p /var/games/minecraft \ && mkdir -p /usr/games/minecraft +#download mineos and setup supervisor init RUN cd /usr/games/minecraft \ - && git clone https://github.com/hexparrot/mineos-node.git . \ + && git clone --depth=1 https://github.com/hexparrot/mineos-node.git . \ && sh generate-sslcert.sh \ && npm install \ && chmod +x webui.js mineos_console.js service.js \ - && cp init/supervisor_conf /etc/supervisor/conf.d/mineos.conf \ - && sed -i -e 's/\/usr\/bin\/node/\/usr\/local\/bin\/node/' /etc/supervisor/conf.d/mineos.conf + && cp init/supervisor_conf /etc/supervisor/conf.d/mineos.conf + +RUN apt-get clean \ + && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* VOLUME /var/games/minecraft CMD ["/usr/bin/supervisord", "-n", "-c", "/etc/supervisor/supervisord.conf"]