Skip to content

Instantly share code, notes, and snippets.

@philpoore
Last active August 29, 2015 14:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save philpoore/f64a29ea7291ce514144 to your computer and use it in GitHub Desktop.
Save philpoore/f64a29ea7291ce514144 to your computer and use it in GitHub Desktop.
Dockerfile - nodejs
FROM node:0.10
RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app
COPY package.json /usr/src/app/
RUN npm install
COPY . /usr/src/app
CMD [ "npm", "start" ]
var app = require('express');
app.use(function (req, res){
res.end('Hello World');
});
app.listen(process.env.PORT || 8080);
{
"name": "test-docker",
"version": "0.0.1",
"scripts": {
"start": "node ."
},
"dependencies": {
"express": "*"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment