Skip to content

Instantly share code, notes, and snippets.

@wilsontayar
Last active January 17, 2017 04:41
Show Gist options
  • Save wilsontayar/1cb21351827ba097ec00 to your computer and use it in GitHub Desktop.
Save wilsontayar/1cb21351827ba097ec00 to your computer and use it in GitHub Desktop.
Basic node.js hello world app with dockerfile
var http = require('http');
var server = http.createServer(function (req, res) {
res.end("Hello World");
});
server.listen(8000);
FROM mhart/alpine-node:6.2.2
WORKDIR /src
ADD . .
ENV NODE_ENV production
RUN npm install
EXPOSE 3000
CMD ["node", "index.js"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment