#Dockerfile for Node App
Here is sample dockerfile for a basic express app
FROM ubuntu:14.04
RUN apt-get update
RUN apt-get install -qy curl
RUN curl -sL https://deb.nodesource.com/setup | sudo bash -
RUN apt-get install -qy nodejs
RUN npm install -g forever
# ...put your own build instructions here...
RUN mkdir -p /apps/production/node
ADD nodeapp /apps/production/node
ADD start_server.sh /usr/bin/start_server
RUN chmod +x /usr/bin/start_server
# Clean up APT when done.
RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
EXPOSE 3000
ENTRYPOINT /usr/bin/start_server
And here is what inside the start_server.sh
#!/bin/bash
cd /apps/production/node
forever app.js
Everything inside nodeapp folder is an express app with app.js as it's starting point.