From 23e7da958a9c0b6047573817dfcaf768fe3813ae Mon Sep 17 00:00:00 2001 From: Shankar Ganesh Jayaraman <3478542+shangan23@users.noreply.github.com> Date: Fri, 14 Sep 2018 19:32:47 -0700 Subject: [PATCH 1/5] installation error fix apt-get update and installing made a trick --- nodejs/Dockerfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/nodejs/Dockerfile b/nodejs/Dockerfile index f1eb264..1dced97 100644 --- a/nodejs/Dockerfile +++ b/nodejs/Dockerfile @@ -1,11 +1,11 @@ FROM ubuntu MAINTAINER Kimbro Staken - -RUN apt-get install -y software-properties-common python +RUN apt-get update +RUN apt-get --yes install software-properties-common python RUN add-apt-repository ppa:chris-lea/node.js RUN echo "deb http://us.archive.ubuntu.com/ubuntu/ precise universe" >> /etc/apt/sources.list RUN apt-get update -RUN apt-get install -y nodejs +RUN apt-get --yes install nodejs #RUN apt-get install -y nodejs=0.6.12~dfsg1-1ubuntu1 RUN mkdir /var/www From ddeb9cd8b6343df8b1fadc2d3e28a46dc58b09d3 Mon Sep 17 00:00:00 2001 From: Shankar Ganesh Jayaraman <3478542+shangan23@users.noreply.github.com> Date: Fri, 14 Sep 2018 19:35:52 -0700 Subject: [PATCH 2/5] nodejs 10 support nodejs 10 support --- nodejs10/Dockerfile | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 nodejs10/Dockerfile diff --git a/nodejs10/Dockerfile b/nodejs10/Dockerfile new file mode 100644 index 0000000..0476274 --- /dev/null +++ b/nodejs10/Dockerfile @@ -0,0 +1,13 @@ +FROM ubuntu +MAINTAINER Kimbro Staken + +RUN apt-get update +RUN apt-get --yes install software-properties-common python curl +RUN curl -sL https://deb.nodesource.com/setup_10.x | bash - +RUN apt-get update +RUN apt-get --yes install nodejs +RUN mkdir /var/www + +ADD app.js /var/www/app.js + +CMD ["/usr/bin/node", "/var/www/app.js"] From b112d620950845fc4df6164799a10654043c8179 Mon Sep 17 00:00:00 2001 From: Shankar Ganesh Jayaraman <3478542+shangan23@users.noreply.github.com> Date: Fri, 14 Sep 2018 19:37:26 -0700 Subject: [PATCH 3/5] app.js app.js file --- nodejs10/app.js | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 nodejs10/app.js diff --git a/nodejs10/app.js b/nodejs10/app.js new file mode 100644 index 0000000..6885180 --- /dev/null +++ b/nodejs10/app.js @@ -0,0 +1,16 @@ +// Load the http module to create an http server. +var http = require('http'); + +// Configure our HTTP server to respond with Hello World to all requests. +var server = http.createServer(function (request, response) { + response.writeHead(200, {"Content-Type": "text/plain"}); + text = "Running Node.js:" + process.versions.node + response.end(text); + +}); + +var port = process.env.PORT || 8080; +server.listen(port); + +// Put a friendly message on the terminal +console.log("Server running at http://127.0.0.1:" + port + "/"); From 2615a877f5448cfb710ef3d9f1f17abf8980fcb8 Mon Sep 17 00:00:00 2001 From: Shankar Ganesh Jayaraman <3478542+shangan23@users.noreply.github.com> Date: Fri, 14 Sep 2018 19:53:58 -0700 Subject: [PATCH 4/5] EXPOSE 8080 EXPOSE 8080 --- nodejs/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nodejs/Dockerfile b/nodejs/Dockerfile index 1dced97..2ee51ab 100644 --- a/nodejs/Dockerfile +++ b/nodejs/Dockerfile @@ -10,5 +10,5 @@ RUN apt-get --yes install nodejs RUN mkdir /var/www ADD app.js /var/www/app.js - +EXPOSE 8080 CMD ["/usr/bin/node", "/var/www/app.js"] From 59476e189223ade417d802e39e8e2fee453be48a Mon Sep 17 00:00:00 2001 From: Shankar Ganesh Jayaraman <3478542+shangan23@users.noreply.github.com> Date: Fri, 14 Sep 2018 19:54:22 -0700 Subject: [PATCH 5/5] EXPOSE 8080 EXPOSE 8080 --- nodejs10/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nodejs10/Dockerfile b/nodejs10/Dockerfile index 0476274..72b2aa7 100644 --- a/nodejs10/Dockerfile +++ b/nodejs10/Dockerfile @@ -9,5 +9,5 @@ RUN apt-get --yes install nodejs RUN mkdir /var/www ADD app.js /var/www/app.js - +EXPOSE 8080 CMD ["/usr/bin/node", "/var/www/app.js"]