Tag: node.js

npm install errors out saying ' Error: getaddrinfo ENOTFOUND npm.lab.myorg.com'

Before you mark my question duplicate ..I tried the everything else I could find on google STORY: We are using a npm Enterprise private Repo. Docker + Vagrant are used for build Env Setup. Setup scripts contain npm installs referencing packages from private repo. And npm installs are failing with below error npm http request […]

Creating a mongoose model containing array types return undefined for those in my docker container

I have a mongoose model containing 2 properties Array of String and some others: var Model = new Schema({ _id: {type: Number, required: true, unique: true}, name: {type: String, required: true}, oneList: [String], anotherList: [String] }); I create the model: var model = new Model({ _id: 1, name: ‘model’, oneList: [‘a’, ‘b’], anotherList: [‘c’, ‘d’] […]

Strange errors when running npm install on alpine linux

Dockerfile: FROM iron/node RUN apk add –update bash && rm -rf /var/cache/apk/* RUN apk add –update curl && rm -rf /var/cache/apk/* WORKDIR /usr/src/app COPY . /usr/src/app RUN npm install CMD [ “node”, “index.js” ] docker build log: Sending build context to Docker daemon 198.2 MB Step 1 : FROM iron/node —> 9ca501065d18 Step 2 : […]

Cannot Compile the typescript in Docker

I want to use typescript in my node.js Web Server. However, the Web Sever is in a Docker Container. I use the the Dockerfile like the blow: FROM node:latest COPY code/ /usr/local/lib WORKDIR /usr/local/lib RUN npm install -g koa@2 RUN npm install -g sequelize RUN npm install -g mysql RUN npm install -g typescript CMD […]

Deploying node.js web app along with docker

WE have a node.js web app.We have deployed it on server with docker. Its working fine with node version 0.10.25. But right now i have decided it to run on latest version of node 6.5.0 To accomplish this i modified the docker file which is now looking like below FROM ubuntu:14.04 RUN echo ‘deb http://security.ubuntu.com/ubuntu […]

Node.js modules not building in Docker

I’m building this dockerfile using docker-compose and I need it to build native modules in docker (not just copy them from local). This only works when my local modules are built (npm install) As soon as I delete them this runs but there is no node_modules directory and it gives an error: Error: Cannot find […]

dockerfile npm start with harmony

Due to a new npm package I installed I recently started to receive SyntaxErrors concerning the use of the keyword ‘const‘. After some research, I came across this topic on StackOverflow, saying that ECMAScript2015 isn’t enabled by default on the older Node.js As I’m using Docker to host my web application, I’m wondering how to […]

running nodejs app in docker with redirecting standard output to a file

i have created a Dockerfile to run a nodejs app and would like to redirect its standard output to a file like that: CMD [ “node”, “app.js”, “>”, “/usr/src/kuku.out”, “2>&1”] but the file kuku.out is not being created.

Scaling a two-tier MEAN application with Docker on AWS

So my current set-up is a Node.js application that serves up an Angular front-end, a second Node.js application that has Express and serves as an API, and a MongoDB instance. Simply, the client-side app talks to the back-end app and the back-end app talks to MongoDB. I was looking into how to Dockerize these applications […]

Node container fails to run using docker for windows

I am unable to get my container to run after switching from using docker toolbox to docker for windows. After starting the container it just immediately fails with state EXIT 254. This setup was working previously using virtualbox and I am quite stumped at what the problem could be. The build completes successfully. This is […]

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