Tag: node.js

How can I attach VS Code to a node process running in a docker container

I’m trying to attach the Visual Studio Code debugger to a node.js app that is running inside a Docker container. I start the app like: node –debug-brk app.js I expose the debugger port in docker-compose.yml: app: build: . working_dir: /code volumes: – .:/code command: npm run debug ports: – “3004:3000” – “5858:5858” My launch.json looks […]

How do I access a server on localhost with nginx docker container?

I’m trying to use a dockerized version of nginx as a proxy server for my node (ExpressJS) application. Without any configuration to nginx and publishing port 80 for the container, I am able to see the default nginx landing page. So I know that much is working. Now I can mount my sites-enabled directory that […]

Installing a web application in a Docker container: dial unix /var/run/docker.sock: no such file or directory

I’m trying to install a web application in a Docker container. I’m using OS X Yosemite version 10.10.1 I’ve been following the tutorial on Dockerizing a Node.js Web App here: https://docs.docker.com/examples/nodejs_web_app/ I downloaded and set up the boot2docker osx-installer at: github.com/boot2docker/osx-installer/releases/tag/v1.4.1 I entered these commands in the console in the following order: $ boot2docker init […]

Within Docker VM, Gulp-Watch Seems to not work well on volumes hosted from the host OS

So I have a setup, probably as most people have, where their app code is mounted into a Docker container through a separate volume. The problem is that if I run gulp, and specifically gulp-watch, to watch for file modifications etc. within docker, on the app code mounted within the docker container, to properly build […]

Performing a npm install via Docker on a windows host

I’m trying to create a docker dev tools container for a devlopement environment on a windows host via docker toolbox but I have some trouble running the npm install command. It worked fine on a linux host but on the windows host I got the following error : npm ERR! Linux 4.1.13-boot2docker npm ERR! argv […]

Difference between nodejs v0.12 and v5.x distributions

I’m looking to install nodejs via Dockerfile to a debian based container. I’m a little confused about the different distributions out there. I’ve come to the conclusion that I want the latest STABLE distribution. Now, in nodesource/distributions#deb there are four different distributions (v0.10, v0.12, v4.x, v5.x). As far as I understand, I need v5.x (by […]

anyway to setup npm credentials over `npm login` without reading input from STDIN?

I’m trying to automate npm publish inside a docker container but I got trouble when $npm login command tries to read username and email from prompts: npm login << EOF username password email EOF it works in terminal bash but not in container without STDIN open and show the following error message: Username: Password: npm […]

Error starting node with forever in docker container

i have a problem when start node with forever in docker container, if i launch manually works, instead the same command in Dockerfile, when build and start the container, exited. The command works in bash: docker run -it container_name bash forever start -c ‘node –harmony’ /my/path/app.js I tried to put command in Dockerfile but the […]

ECONNREFUSED for Postgres on nodeJS with dockers

I’m building an app running on NodeJS using postgresql. I’m using SequelizeJS as ORM. To avoid using real postgres daemon and having nodejs on my own device, i’m using containers with docker-compose. when I run docker-compose up it starts the pg database database system is ready to accept connections and the nodejs server. but the […]

Docker – no such file or directory

I’m receiving an error from docker when I run my docker file. It’s saying the /var/lib/docker/aufs/layers/xxxx: no such file or directory when I run Docker build . I have tried numerous ways to remove containers and images so I’m pretty much stock on this one. Any The Docker file is: FROM node:6 RUN git clone […]

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