Skip to content

Dockerfile not up to date #88

Open
@almereyda

Description

@almereyda

In trying to reuse the existing Dockerfile, this was only possible after

  1. following the instructions in https://flaviocopes.com/update-npm-dependencies/ on the source repository
  2. removing the sudoroom-data symlink and replacing it with an empty folder Docker instructions broken by sudoroom-data symlink #75
  3. copying settings.example.js to settings.js,
  4. simplifying the build
$ diff --git a/Dockerfile b/Dockerfile
index b48265c..f612f1c 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,12 +1,9 @@
-# Start with debian jessie
-FROM debian:jessie
+FROM node:8-stretch-slim
 # Get prerequisites
+
 RUN apt-get update && apt-get install -y \
   libcairo2-dev \
-  man-db \
-  nodejs \
-  nodejs-legacy \
-  npm
+  man-db
 # Put the (symlinked) db in here
 RUN mkdir -p /usr/src/sudoroom-data
 # Put the app in here
$ docker build -t sudoroom/sudo-humans .

and running with

  1. $ docker run --rm -it -p 8082:80 -v $(pwd)/settings.js:/usr/src/app/settings.js sudoroom/sudo-humans then.

Unfortunately this yields a Node.js error from hell:


> [email protected] start /usr/src/app
> bin/cmd.js

node[17]: ../src/tcp_wrap.cc:145:static void node::TCPWrap::New(const v8::FunctionCallbackInfo<v8::Value>&): Assertion `args[0]->IsInt32()' failed.
 1: node::Abort() [node]
 2: 0x8cd37b [node]
 3: node::TCPWrap::New(v8::FunctionCallbackInfo<v8::Value> const&) [node]
 4: v8::internal::FunctionCallbackArguments::Call(void (*)(v8::FunctionCallbackInfo<v8::Value> const&)) [node]
 5: 0xb0dc4f [node]
 6: v8::internal::Builtin_HandleApiCall(int, v8::internal::Object**, v8::internal::Isolate*) [node]
 7: 0x38c4426842fd
Aborted (core dumped)
npm ERR! code ELIFECYCLE
npm ERR! errno 134
npm ERR! [email protected] start: `bin/cmd.js`
npm ERR! Exit status 134
npm ERR! 
npm ERR! Failed at the [email protected] start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2019-03-21T01_37_43_742Z-debug.log

which may be due to liberal use of Node 8 and straight updating of all packages in package.json

diff --git a/package.json b/package.json
index 6de0d02..3d2fd86 100644
--- a/package.json
+++ b/package.json
@@ -7,47 +7,47 @@
   },
   "dependencies": {
     "accountdown": "^4.1.0",
-    "accountdown-basic": "^1.0.0",
-    "async": "^1.4.2",
-    "body": "^4.5.0",
-    "changes-feed": "^1.0.0",
-    "changesdown": "^2.2.0",
-    "concat-stream": "^1.4.7",
-    "content-addressable-blob-store": "^4.1.1",
-    "cookie-auth": "^2.4.1",
-    "duplexer2": "0.0.2",
-    "ecstatic": "~0.5.8",
+    "accountdown-basic": "^1.1.0",
+    "async": "^2.6.2",
+    "body": "^5.1.0",
+    "changes-feed": "^1.1.0",
+    "changesdown": "^2.3.1",
+    "concat-stream": "^2.0.0",
+    "content-addressable-blob-store": "^4.6.0",
+    "cookie-auth": "^2.4.2",
+    "duplexer2": "0.1.4",
+    "ecstatic": "~3.3.1",
     "escape-html": "^1.0.3",
     "html-template": "^1.2.2",
-    "hyperquest": "^1.0.1",
+    "hyperquest": "^2.1.3",
     "hyperstream": "^1.2.2",
     "index-feed": "^1.0.0",
-    "is-root": "^1.0.0",
-    "leveldown": "0.10.5",
-    "level-dump": "1.0.0",
-    "level-packager": "~0.18.0",
+    "is-root": "^2.0.0",
+    "leveldown": "4.0.2",
+    "level-dump": "1.1.0",
+    "level-packager": "~5.0.0",
     "level-change-processor": "^1.0.0",
-    "marked": "^0.3.3",
-    "minimist": "^1.1.0",
-    "mkdirp": "^0.5.0",
-    "moment": "^2.10.6",
-    "nodemailer": "^1.3.4",
-    "nodemailer-smtp-transport": "^1.0.3",
-    "once": "^1.3.1",
-    "persona-id": "~0.0.2",
-    "promise": "^7.1.1",
-    "pug": "^2.0.0-rc.1",
+    "marked": "^0.6.1",
+    "minimist": "^1.2.0",
+    "mkdirp": "^0.5.1",
+    "moment": "^2.24.0",
+    "nodemailer": "^5.1.1",
+    "nodemailer-smtp-transport": "^2.7.4",
+    "once": "^1.4.0",
+    "persona-id": "~0.3.0",
+    "promise": "^8.0.3",
+    "pug": "^2.0.3",
     "retricon-without-canvas": "^1.0.0",
-    "routes": "^2.0.0",
-    "shasum": "^1.0.1",
-    "stream-combiner2": "^1.0.2",
-    "stripe": "^4.0.0",
-    "subleveldown": "^1.0.6",
-    "tcp-bind": "^1.1.1",
-    "through2": "^0.6.3",
-    "timeago": "^0.2.0",
-    "xkcd-password": "^1.2.0",
-    "xtend": "^4.0.0"
+    "routes": "^2.1.0",
+    "shasum": "^1.0.2",
+    "stream-combiner2": "^1.1.1",
+    "stripe": "^6.28.0",
+    "subleveldown": "^3.0.1",
+    "tcp-bind": "^1.2.0",
+    "through2": "^3.0.1",
+    "timeago": "^1.6.5",
+    "xkcd-password": "^2.0.0",
+    "xtend": "^4.0.1"
   },
   "scripts": {
     "start": "bin/cmd.js"

Is it worth for you to debug this occurrence?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions