Last active
January 17, 2017 04:41
-
-
Save wilsontayar/1cb21351827ba097ec00 to your computer and use it in GitHub Desktop.
Basic node.js hello world app with dockerfile
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var http = require('http'); | |
var server = http.createServer(function (req, res) { | |
res.end("Hello World"); | |
}); | |
server.listen(8000); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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