Skip to content

Instantly share code, notes, and snippets.

@brendanstennett
Created May 15, 2015 18:44
Show Gist options
  • Save brendanstennett/6894c1f9603e062d5e29 to your computer and use it in GitHub Desktop.
Save brendanstennett/6894c1f9603e062d5e29 to your computer and use it in GitHub Desktop.
Dockerfile for node.js ...a bit hacky but it works
FROM quay.io/thinkdataworks/node
MAINTAINER Brendan Stennett <brendan@thinkdataworks.com>
ENV PACKAGE_NAME <package> # this should match the package name in package.json
ENV NODE_PATH /usr/local/lib/node_modules/$PACKAGE_NAME/node_modules
ENV PATH /usr/local/lib/node_modules/$PACKAGE_NAME/node_modules/.bin:$PATH
WORKDIR /app
COPY package.json /app/
RUN npm install -g
CMD node app.js
COPY . /app/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment