Tag: node.js

Docker with nodeBB redis is not configured properly?

So everything is working well with my project image expect for redis. I was able to build and run, I am happy about that but inside my config.json I have tried changing the host to redis,, and the ip of my VM. When I run my nodeBB inside my container I get this issue […]

Wierd Docker DNS error referencing C file?

I am getting this really weird error from my node.js docker container all of the sudden. I tried googling it but nothing came up. Any advice? :S E0528 02:56:32.124438366 131 resolve_address_posix.c:118] getaddrinfo: Name or service not known D0528 02:56:32.124710117 131 dns_resolver.c:186] dns resolution failed: retrying in 1.000000000 seconds The only thing I can think of […]

Returning value outside of function

I’m looking to use graphQL to query a docker machine api and get a list of containers for react docker admin style project. I’m using dockerode an NPM module to make the request. The first function getCOntainerById is how I would typically return some items from rethinkdb. I can’t seem to figure out how to […]

Docker logs not showing colors (express + nodejs image)

A petty, yet interesting question (for me): I’m trying to create docker image from a small server( nodejs + express) I wrote. My server code is: var express = require(‘express’); var Inflector = require(‘inflected’); var colors = require(‘colors’); var app = express(); app.get(‘/hello/:name’, function(req, res, next){ var name = Inflector.titleize(req.params.name); console.log(“Saying hello to ” + […]

How to make request to linked container from frontend js?

I’m building application using docker-compose. One docker container is a rails api only app. Second is node.js app with angular. What I need is to make POST and GET requests to rails container in order to get data from it to my Angular app. docker-compose.yml rails_server: build: ./rails_server nodejs_server: build: ./nodejs_server ports: – “80:8080” links: […]

Installing github hosted npm dependencies with Docker

I’m trying to dockerize a project, but I’m having issues in the npm install process with my Gulp 4 dependency. I’m using Gulp 4 because we needed some of the new features, but all the instructions I’ve seen for using the prerelease version of Gulp 4 is to use the github branch url. Here is […]

Automatic rendering of changes made in code using Volumes concept (node app running in Docker VM)

Now the changes made in .Jade files are rendered automatically on web UI, however the code changes made in node.js files are not rendering, so far, here is my docker-compose.yml file www: build: . volumes: – ./:/app_ww ports: – “80:3000” expose: – “80” and here is my dockerfile FROM node:4.4.1 RUN mkdir -p app_ww WORKDIR […]

Accessing the same mongoDB instance from multiple Docker containers

I have two containers (A and B) running Node + MongoDB. A contains restricted endpoints that require a valid token in order to read + write from the database. B will contain public endpoints that have no request requirements and allow anyone to read certain documents from the database. The endpoints exposed in both A […]

Configuring Couchbase connection ports through their Node.js API [Docker]

I am using an official Couchbase Docker container. Some important ports Couchbase server uses. Those are exposed through the container as random ports on the host. Is there a way to supply those host ports on obtaining a Couchbase server connection? Something akin to how the server is configured preinstall but for the client. I […]

Swagger express gives error inside docker container

I have an app that uses the swagger-express-mw library and I start my app the following way: SwaggerExpress.create({ appRoot: __dirname }, (err, swaggerExpress) => { // initialize application, connect to db etc… } Everything works fine on my local OSX machine. But when I use boot2docker to build an image from my app and run […]

Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.