kylemanna
12/18/2014 - 6:36 PM

0001-Docker-Tweak-to-work-with-upstream-docker.patch

From d50c9ed12f38cf70ef1530de49d23d9d79098257 Mon Sep 17 00:00:00 2001
From: Kyle Manna <kmanna@fan.tv>
Date: Thu, 18 Dec 2014 18:25:09 +0000
Subject: [PATCH] Docker: Tweak to work with upstream docker

* Leverage the upstream docker image as there is nothing special about this Dockerfile
---
 .gitignore |  1 +
 Dockerfile | 16 ----------------
 README.md  |  5 +++++
 app.js     | 17 -----------------
 server.js  | 17 +++++++++++++++++
 5 files changed, 23 insertions(+), 33 deletions(-)
 create mode 100644 .gitignore
 delete mode 100644 Dockerfile
 create mode 100644 README.md
 delete mode 100644 app.js
 create mode 100644 server.js

diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..07e6e47
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+/node_modules
diff --git a/Dockerfile b/Dockerfile
deleted file mode 100644
index b28de8e..0000000
--- a/Dockerfile
+++ /dev/null
@@ -1,16 +0,0 @@
-FROM ubuntu:14.04
-
-RUN apt-get update && apt-get install -y nodejs npm \
-    && npm install express
-
-
-ADD . /srv
-
-WORKDIR /srv
-
-RUN npm install
-
-EXPOSE 8888
-
-CMD [ "nodejs", "app.js"]
-
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..318e6e1
--- /dev/null
+++ b/README.md
@@ -0,0 +1,5 @@
+# README
+
+# Example Invocation Using Upstream Docker Image
+
+    docker run --rm -v $PWD:/srv -p 8080:8080 node sh -c 'cd /srv && npm install && npm start'
diff --git a/app.js b/app.js
deleted file mode 100644
index 8690336..0000000
--- a/app.js
+++ /dev/null
@@ -1,17 +0,0 @@
-var express = require('express');
-var app = express();
-
-// Use compress middleware to gzip content
-app.use(express.compress());
-
-// Serve up content from public directory
-app.use(express.static(__dirname + '/public'));
-
-app.get('/', function(req, res) {
-    res.sendfile(__dirname + '/public/index.html');    
-});
-
-var port = process.env.PORT || 8888;
-app.listen(port);
-
-console.log('listening on port ' + port);
diff --git a/server.js b/server.js
new file mode 100644
index 0000000..8690336
--- /dev/null
+++ b/server.js
@@ -0,0 +1,17 @@
+var express = require('express');
+var app = express();
+
+// Use compress middleware to gzip content
+app.use(express.compress());
+
+// Serve up content from public directory
+app.use(express.static(__dirname + '/public'));
+
+app.get('/', function(req, res) {
+    res.sendfile(__dirname + '/public/index.html');    
+});
+
+var port = process.env.PORT || 8888;
+app.listen(port);
+
+console.log('listening on port ' + port);
-- 
1.9.1