Skip to content

Commit ee24d37

Browse files
committed
initial commit
0 parents  commit ee24d37

File tree

3 files changed

+35
-0
lines changed

3 files changed

+35
-0
lines changed

Dockerfile

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
FROM ubuntu:14.04
2+
3+
COPY . /src
4+
5+
RUN apt-get install -y curl
6+
RUN curl -sL https://deb.nodesource.com/setup | sudo bash -
7+
RUN apt-get install -y nodejs
8+
RUN cd /src; npm install
9+
10+
CMD ["node", "/src/index.js"]
11+
12+
EXPOSE 8080

index.js

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
var express = require('express');
2+
3+
// Constants
4+
var PORT = 8080;
5+
6+
// App
7+
var app = express();
8+
app.get('/', function (req, res) {
9+
res.send('Dockerized!!!\n');
10+
});
11+
12+
app.listen(PORT);
13+
console.log('Running on http://localhost:' + PORT);

package.json

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"name": "dockerized-node-ns",
3+
"private": true,
4+
"version": "1.0.0",
5+
"description": "Sample dockerized Node.js app",
6+
"author": "Charlie Crawford III <[email protected]>",
7+
"dependencies": {
8+
"express": "4.12.0"
9+
}
10+
}

0 commit comments

Comments
 (0)