Tag: node.js

How to mount host directory in docker container using remote api

Using the docker remote api. How can i mount a local directory from the machine that’s making the request to the the machine that’s running docker. Can someone show me an example request to “POST /containers/create” route that mounts a local directory.

How do I get node.js “live editing” to work with Docker

My weekend project was to explore Docker and I thought a simple node.js project would be good. By “live edit” I mean I’d like to be able to manipulate files on my host system and (with as little effort as possible) see the Docker container reflect those changes immediately. The Dockerizing a Node.js web app […]

How to share a host directory between multiple docker container?

This is my directory structure for docker microservices . What I need to do is to share certain files from my lib folder which is on my host machine to containers. These are lib files which are required to run the application in both of the containers.This is the content from one of my docker […]

Measure resource usage of Docker container on exit

I create containers which compile/interpret user’c code and pass the result back to the browser (just like JSFiddle). Now, I need to know how much CPU and memory has been used for executing that code. So, I don’t need it realtime but on container’s exit, so that I can pass these two parameters with the […]

Forever monitor fails to run inside a docker container [duplicate]

This question already has an answer here: Error starting node with forever in docker container 4 answers

Including node_modules in a nodejs Docker image, faster builds

We all know how slow docker builds are with NPM and node containers. My automated builds take between ~30mins and ~1hr to complete. Im caching my package.json in a layer as per usual: FROM node:6 MAINTAINER some-guy # Prepare app directory RUN mkdir -p /var/www/html # cache deps ADD package-cache.json /tmp/package.json RUN cd /tmp && […]

How to pull signed docker images using dockerode NodeJS API

I have a node js application that does basic docker operations like pull images, create, run, start and stop docker containers. I am using dockerode library. I want to enforce only trusted signed images are allowed to be pulled. According to docker documentation, setting env variable DOCKER_CONTENT_TRUST=1. This is not feasible because I am invoking […]

npm install receiving type error when using docker

I have pulled down the latest ubuntu docker image and I have installed node, npm, etc on the image. I am trying to do an npm install on my project. I keep receiving 3 errors like this. I will only show the first time it appears. path.js:7 throw new TypeError(‘Path must be a string. Received […]

npm install error with kurento – docker

I am trying to install kurento media server and one tutorial on the same in Docker container. Kurento Media server Installation guide: http://doc-kurento.readthedocs.io/en/stable/installation_guide.html Kurento Tutorial installation: (using node.js): http://doc-kurento.readthedocs.io/en/stable/tutorials/node/tutorial-one2one.html First I have tried installing the same in ubuntu machine , Manually executed each command so that I can see it is working fine. But when […]

Redis connection failing

So I have node app docker containers running, and they run fine, but I noticed over the course of 1-2 months all of my apps begun having errors with redis, seems like the connection is not making it / is being refused. This is the error: Error: Redis connection to xx.x.x.xxx:xxxx failed – connect ETIMEDOUT […]

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