From 593ec667a469653e75e5ac6494188e05cf9eef02 Mon Sep 17 00:00:00 2001 From: Kevin Brey Date: Wed, 29 Oct 2014 12:46:28 -0500 Subject: [PATCH] feat: Simplify dockerfile significantly - Use docker library version of node - Assume dockerfile lives with sourcecode - Assume server can be started with `npm start` aka `node server.js` - Assumes all dependencies are listed in `package.json` --- Dockerfile | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/Dockerfile b/Dockerfile index b3ec3676..d0482486 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,13 +1,7 @@ -FROM debian:jessie +# Pull base image. +FROM node:0.10-onbuild -RUN apt-get update -RUN apt-get upgrade -yq -RUN apt-get install -yq git nodejs-legacy npm -RUN git clone https://github.com/benweet/stackedit.git - -WORKDIR stackedit -RUN npm install -RUN node_modules/bower/bin/bower install --allow-root --production --config.interactive=false -CMD nodejs server.js +# Node base will default the command to `node server.js`. +# Expose port. EXPOSE 3000