Tag: node.js

Dockerized app throws read operation timed out error and exits

I’ve an express application that takes data from an IronMQ push queue. I’ve Dockerized this app and on running the application in a Docker Container, after some idle time say 20-30 mins, the App throws an error and exits out: Error: read tcp> read: operation timed out My boot2docker ip –> I’ve forwarded […]

Node npm test to seeded postgres, Docker network container seeing varying results

I am running an Angular Node npm test against a seeded postgres database. This works in one environment but not another. I have exported the images to and moved them from one environment to the other, and the results indicate that there’s a difference with the environments and not the docker images. I also have […]

Deploying a Scalable Architecture of MEAN Stack on Google Compute Engine

I have deployed a MEAN Stack app (not using any MEAN frameworks) on google compute engine. Currently, it’s deployed over a single n1-standard-1 virtual machine (1 virtual CPU + 3.75GB memory). Inside of it, I’m running 4 docker containers. One each for: reverse proxy – listens on port 80(http) & 443(https) then proxy request to […]

Why doesn't the container start?

My docker-compose file is simple: npm: image: node volumes: – C:\Users\Samir\npm\:/home/dev container_name: npm When I run it: docker-compose up -d I get: Starting npm Then, nothing happens: docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES Any idea?

Not getting the IP address of the docker container from node.js code when run the container with port forwarding

I write a basic node.js code to get the IP of the Host. code looks like this: var express = require(‘express’); var os = require(‘os’); var app = express(); var interfaces = os.networkInterfaces(); app.get(‘/’,function(req,res){ var addresses = []; for (var k in interfaces) { for (var k2 in interfaces[k]) { var address = interfaces[k][k2]; if […]

Is it possible to launch a new Docker container from within a running Docker container using Docker Compose?

I have a Node.js application running inside a Docker Container. I need to launch a new container from my Node.js application (via code; e.g. child_process.spawn()) with the sole purpose of running a Python script. I also need to pass one argument (a database record ID) to this Python script. So the command is: python main.py […]

how to use digitallyseamless/nodejs-bower-grunt-runtime:compass-support in wercker?

I m using wercker to automate deployment of nodejs application. I thought digitallyseamless/nodejs-bower-grunt-runtime box with compass support will make the job. But when grunt attempts to use compass it is going to error. extract of my werker.yml box: digitallyseamless/nodejs-bower-grunt-runtime:compass-support build: steps: – wercker/npm-install – greatbeyond/bower-install@0.5.8 – wercker/grunt: stack: true fail-on-warnings: true tasks: clean ngconstant:production build […]

Nodejs development on Docker under Windows 10

I am trying to wrap my head around Docker and how to use it for development purposes. I am developing on a Windows 10 environment. I have the basic question, when doing development on Nodejs, lets say you modify a .js file. Do you modify it on the host machine (Windows machine) and then push […]

Docker for local NodeJS development

What is the right way to develop app locally in the container, when it is possible to have node_modules on my laptop file system. Currently I have following settings in the Dockerfile COPY package.json /app/ RUN npm install COPY . /app/ And the following docker-compose volumes: – “/app/node_modules” In that case I’m able to run […]

Docker container has no TMPDIR environmental variable

I’m running a Node app on node:6.3-wheezy. I noticed that os.tmpdir() returns the path to the project directory, which is probably just PWD. When I run env in the container, I see that there is no TMPDIR environmental variable. Why is this? I’d like the system to establish it’s own temp directory rather than setting […]

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