node.JS application in docker container

I have my node.JS application running in a docker container. While most of the functioning of this setup is normal but it fails to work with kafka-node module. Exception thrown is

        throw e
Error: Module did not self-register.
    at Error (native)
    at Object.Module._extensions..node (module.js:434:18)
    at Module.load (module.js:343:32)
    at Function.Module._load (module.js:300:12)
    at Module.require (module.js:353:17)
    at require (internal/module.js:12:17)
    at bindings (/app/node_modules/kafka-node/node_modules/snappy/node_modules/bindings/bindings.js:76:44)
    at Object.<anonymous> (/app/node_modules/kafka-node/node_modules/snappy/snappy.js:2:34)
    at Module._compile (module.js:409:26)
    at Object.Module._extensions..js (module.js:416:10)

My Dockerfile is as follows

  • chmod not work with virtualbox share folder
  • Linking two applications in Cloud Foundry
  • Docker: Can't get up networking
  • I can't get red5-hls-plugin to build
  • Have to set up eval $(dinghy env) everytime. Cannot connect to the Docker daemon. Is the docker daemon running on this host?
  • Cloudfront returning 502 errors
  • FROM node:4
    RUN mkdir -p /app
    WORKDIR /app
    COPY package.json /app/package.json
    RUN npm cache clean
    RUN npm install
    RUN npm rebuild
    COPY . /app
    EXPOSE 8085
    CMD []
    ENTRYPOINT ["bash", ""]

    And for further information, Kafka is running on separate server. All relevant ports are opened and I can telnet successfully for checking them.

  • Is Volume in Docker a security hole?
  • Docker LVM thinpool meta data sizing
  • After stopping docker containers , previously running containers cannot be started
  • Moving app to docker from host increases HTTP lag by 5 seconds
  • Spring Boot in Docker
  • Docker-compose mongoose
  • Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.