Tag: node.js

Pulling and building io.js from source using a specific version

I’m building a Dockerfile for an io.js project I’ve been working on, and I’d love to be able to do something similar to the following, but with io.js. ## Install Nodejs RUN wget http://nodejs.org/dist/v0.12.7/node-v0.12.7.tar.gz RUN tar -xvzf node-v0.12.7.tar.gz RUN cd /node-v0.12.7/ && ./configure && make && make install clean It seems to me that there […]

cssnext not write file

I run cssnext (1.3.0) with gulp (3.8.11) on docker (1.6) container (official node image) and my OS is ArchLinux (host). The node version is 0.10.38. I have a problem, i can’t solve. This is my gulpfile.js: var gulp = require(‘gulp’); var cssnext = require(“gulp-cssnext”); gulp.task(“css4Tocss”, function() { gulp.src(“css/index.css”) .pipe(cssnext({ compress: true })) .pipe(gulp.dest(“dist”)) }); When […]

On server startup NPM find start script

I’m working with docker and I’m wondering how I can get the command npm start to locate the app.js file without me doing it via the command line. my package.json (located: /srv/www) looks as so: { “name”: “dist”, “version”: “1.0.0”, “description”: “”, “main”: “app.js”, “scripts”: { “start”: “forever start -c \”nodemon –harmony\” app.js –exitcrash” }, […]

Does 'docker run' modify image state?

I have a Dockerfile that uses an ubuntu base image and installs a bunch of dependencies with apt-get and dpkg. Then it copies some javascript files and runs a node app. The node app spawns a child process and executes xvfb-run selenium-standalone start. If I build the docker image with –no-cache and run it using […]

nodejs, docker, nginx and amazon aws deployment

There have been many questions regarding docker, node and amazon aws and I have read most of them but I haven’t got my answer. I have been working on a production node.js API project for last some weeks and now that the API’s are complete I have to deploy them. There are a total of […]

Docker daemon unable to find the dockerfile

I am trying to create a node-js base image by using the following docker file Dockerfile: FROM node:0.10-onbuild # replace this with your application’s default port EXPOSE 8888 I then run the command ” sudo docker build -t nodejs-base-image .” This keeps failing with the error FATA[0000] The Dockerfile (Dockerfile) must be within the build […]

Cannot access files inside Vagrant Sync Folder

I’m running docker containers inside Vagrant VM (with Vbox 5.0.10 as provider), and here is my Vagrantfile : Vagrant.configure(2) do |config| config.ssh.insert_key = false config.vm.box = “ubuntu/trusty64” config.vm.box_check_update = false config.vm.network “forwarded_port”, guest: 80, host: 8585 config.vm.provider “virtualbox” do |vb| vb.cpus = 2 end config.ssh.shell = “bash -c ‘BASH_ENV=/etc/profile exec bash'” config.vm.provision “shell”, inline: <<-SHELL […]

always npm install locally from package.json

Although I’m running this setup inside a docker container, my project files are located in /app and /app/package.json exists When I do cd /app && npm install –production (as root or non root user), all dependencies get installed in ~/.npm folder instead of showing up in /app/node_modules I’ve also tried doing npm install –production –verbose […]

Why isn't my server restarting / code updating using Docker + Nodejs?

My docker file is super simple: FROM node:4-onbuild RUN npm install gulp -g; EXPOSE 8888 This image will automatically run the start script in package.json which I have set simply as gulp. If I run gulp on my host machine, and make a change to node file, it automatically restarts server: var gulp = require(‘gulp’); […]

Structure of Angular / NodeJS repository which will run in docker

We have repository with an application written in Angular. It needs a docker container with nginx to be hosted. The nodejs needs a docker container of nodejs so our app will be split up in 2 containers which will be linked. So to write 2 dockerfiles (one for each image) we have to split up […]

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