Tag: node.js

Installing mongo client in a Docker container

I am using fig to build and run my app within various Docker containers and so-far, so good. I have a container for my app and a db container with mongo in it. But now I am trying to connect to the mongo server to seed it with a user and database and I can’t […]

NPM install via git+https//x-oauth-basic within Docker container fails

I have a node project that I have stood up on my host server (Ubuntu 14.04), I can pull my repo and perform the NPM install without issue on the host. My package.json includes some private repos where we use the with https to have npm pull in our private dependencies. like so in our […]

connecting to services on docker host from docker container

Apologies for asking two unrelated questions. what is the best way of accessing the host machine of the docker container (i.e. I am trying to access a kafka instance running on the host, from my docker container so that I can publish some messages) when I run docker run ….. on an image which I’ve […]

SSHFS Mount for Docker Container / Node Server needs to access files on an external server

How do I execute a SSHFS Mount to mount a volume on a different server into my docker image / docker container ? The docker container contains a simple NodeJS web server. This web-page displays pictures. I have to get those image-files from a different server with different IP. So far I had this without […]

unable to launch dockerized node app in browser

I am not able to launch dockorize node app. I have removed docker toolkit and installed docker native to MAC docker-compose.yml web setting services: web: image: node:boron ports: – “3000:3000” volumes: – .:/apicode depends_on: – db entrypoint: /bin/bash tty: true when I run docker-compose run web on command line , I can see the container […]

nodejs express doesn't render html page with ect templating engine when it runs as a docker daemon

am trying to run a node js application that renders HTML pages on ECT templating engine on Docker, the case is that it works just fine once am interacting directly with the running container as below command and run node inside it. docker run -p 80:5000 -it abdullahshahin/admin-panel bash but when I run it as […]

Running Bottle (back end) + Nodejs (front end) on Google App Engine

I have my Python/bottle backend running on app engine and decided to use Nodejs/ember for the front end. I haven’t used Google Cloud a lot but the Managed VMs beta seems to allow me to deploy my project using Docker. Question: How do I run both back end and front end on the Google cloud […]

Docker API : Show container logs in a webpage

I’m working on a project for a docker web client in node.js using the docker.io package from Appersonlabs https://github.com/appersonlabs/docker.io. In order to build a complete client, I want to stream the container logs to a webpage. Here’s my route using the api : app.get(‘/containers/:id’,function(req,res){ console.log(‘INSPECT CONTAINER WITH ID ‘+req.params.id); docker.containers.inspect(req.params.id,function(err,infos){ docker.containers.attach(req.params.id, {stream: true, stdout: true, […]

How to run docker images (nodejs server) without exiting

Created docker image which will run perl script which internally triggers node servers using pm2 command. Image created using dockerfile FROM rm/node:4.0 EXPOSE 3000 EXPOSE 3030 EXPOSE 7030 WORKDIR /Reader_Manager/SISPlatform CMD perl build_scripts/devdeploy.pl When i run image in background using below command, it is executing the script. but after script completes it exits. [dkanagaraj@localhost docker_test]$ […]

How to recreate containers with Docker Compose on a Swarm Cluster of multiple nodes?

I ran into this issue when I had only 1 node in my Swarm cluster and when I tried to recreate my web app container on this node (I want to deploy a new version of my Node.JS web app which is listening on port 80) The problem is that Swarm stops the old container […]

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