Tag: node.js

Cant reach node server running in docker container in vm

I have a dockerized node app running inside a container on an ubuntu-vm-host with static address, but can only reach it through localhost. I use the command: sudo docker run -d -p 49160:3000 8a5ccd9f4cca to start the app. I can reach running node servers on the vm without any trouble when they are run in […]

Express does not run on docker, but on localhost

I am struggling on deploying my backend to the docker container. I found out, that my ploblem is the express framework. First of all, I must say, that everything works on my localhost fine. But when I deploy my app to the server I am getting the 503 Error (service is not availible). If I […]

Can and should Node/NPM be used in a separate container for a dockerized PHP application

I am creating a dockerized PHP application and would like to separate the services as much as possible. I so far have separate nginx, mysql and php containers (which are all working correctly). However I am wondering where node/npm fits into this? I have npm packages for the the frontend and gulp tasks for the […]

debugging nodejs docker image inside vagrant

to run my node server i use: babel-watch ./src/index.js –inspect 9229 this is my docker compose: intercom: image: intercom working_dir: /service command: npm run intercom volumes: – ./intercom/service/src/:/service/src:rw ports: – “9229:9229” code that runs the container: docker run -i -t -v `pwd`/service/src:/service/src -p 9229:9229 intercom but i cant see the debug instance in chrome://inspect/#devices any […]

Expressjs app started with PM2 in Docker dies with SIGINT

I have a VERY SIMPLE Expressjs app – basically a library wrapper with the single post call. Here is the app.js conents: var compression = require(‘compression’); var express = require(‘express’); var path = require(‘path’); var bodyParser = require(‘body-parser’); var convert = require(‘./routes/convert’); var app = express(); app.use(bodyParser.json()); app.use(bodyParser.urlencoded({ extended: false })); app.use(compression()); app.use(‘/’, convert); module.exports […]

Running NodeJS server in virtual docker-machine – Cannot access running VM app

I am going through this docker tutorial in order to get my electrode app working in a VM. When I run node server.js in the VM it logs a message indicating the Hapi server is running: Hapi.js server running at http://10cc6b467731:3000 However, when I try to navigate to http://10cc6b467731:3000 in my browser I am unable […]

Why would I need Docker for nodejs?

I am relatively new to Docker. And it’s pretty amazing. Well, I understand that for language like PHP. I think it does really make sense to use Docker, because of the PHP environment. But why would i need to use docker for Node.js while i can simply ‘npm install’ and ‘npm start’ and I am […]

Selenium Test Execution in Docker with UI

I tried running selenium test (Node Js) on docker machine but it says “TypeError: module.exports.browser.isElementPresent is not a function“. Note: I can successfully run this same selenium test on my local machine I tried running the same test on docker then i encountered the error above root@6cd7ab2eb6f7:/usr/src# npm run kongaezv2 npm info it worked if […]

Mapping node_modules in a Dockerrun.aws.json for use in a container_command

I was wondering what the correct path structure is for doing a Volume mapping in a Dockerrun.aws.json to that I could reference installed node_modules in a ‘/opt/elasticbeanstalk/hooks/appdeploy/post’ bash file. In short, I am trying to run Sequelize migrations after a deploy and cannot seem to expose the node_modules path to the host environment. My Dockerfile […]

Docker build error with vue-cli Webpack boilerplate

I’m getting an error when trying to create a Docker build using vue-cli Webpack boilerplate. I can build locally just fine with the following versions of Node and npm Node v7.10.0 npm v4.6 The command to do a production build npm run build is successful on my local machine. The same command in docker produces […]

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