Tag: node.js

access data volume of node modules outside docker container

I have docker setup for a node.js web service which creates a data volume for node modules like this: volumes: – ./service:/usr/src/service – /usr/src/service/node_modules The solution with data volume works fine. But using a data volume, the node_modules are not accessible or visible in my host (not container) which creates other restrictions. For example: I […]

Docker cannot run on build when running container with a different user

I don’t know the specifics why the node application does not run. Basically I added a dockerfile in a nodejs app, and here is my Dockerfile FROM node:0.10-onbuild RUN mv /usr/src/app /ghost && useradd ghost –home /ghost && \ cd /ghost ENV NODE_ENV production VOLUME [“/ghost/content”] WORKDIR /ghost EXPOSE 2368 CMD [“bash”, “start.bash”] Where start.bash […]

NodeJS/Dokku/Docker: ffmpeg exited with code 127

I’m trying to run ffmpeg inside of a Docker container via Dokku. I’ve heavily modified a Dokku plugin to accomplish this as I need h264 support. I currently get an error from fluent-ffmpeg which states Error: ffmpeg exited with code 127 I’ve tried to look up what error code 127 is but haven’t found much. […]

Writting empty object with socket.io

I’m currently trying to send some information via Socket.io with Node.js but it looks like I’m doing something wrong and I really don’t know why. I have some containers on my machine using Docker and I use the Docker.io node package for my app in order to get all the information I want. Here’s the […]

How to deploy an application using Docker

I have a node.js application which depends on phantom.js. Since both node and phantom.js are not exactly a breeze to set up, I created a Docker container which does this. Now how do I deploy updates of my application to this docker container running on our production server. For me, there are two possibilities. Set […]

Running a node app as a non root user in docker

For a couple of days I’ve been trying to run a node app as a non root user inside a Docker container using docker-compose. No matter what I try, I get the same EACCES: permission denied errors, more specifically it seems to be an issue with the start scripts: Error: EACCES: permission denied, open ‘/home/dev/learn-node/public/dist/App.bundle.js’ […]

docker's VOLUME isn't mounting host files

I have this docker file: FROM node:0.10.38 VOLUME /opt/build WORKDIR /opt/build EXPOSE 8080 CMD node app.js However, when I got to run the container, I get the error that app.js does not exist, specifically /opt/build/app.js does not exist. I’ve also tried ADD and COPY to do this, both say it can’t find anything, and I’d […]

Bower dependicies with postinstall on Docker

It is possible to install bower dependicies using postinstall in package.json on docker with docker-compose? package.json file: { “name”: “mongocrud”, “version”: “0.0.0”, “private”: true, “scripts”: { “start”: “node ./config/server.js”, “postinstall”: “node ./node_modules/bower/bin/bower install”, “test”: “mocha” }, “dependencies”: { //dependicies } } Dockerfile: FROM node:7.7.2-alpine WORKDIR /application COPY package.json . COPY bower.json . COPY .bowerrc . […]

I'm unable to connect Docker Remote API using nodejs hosted in AWS

I have created t1.micro instance in Amazon web-services(AWS), and installed docker.io. I executed following commend in SSH client “sudo docker -H tcp://0.0.0.0:4243 -H unix:///var/run/docker.sock -d &”. when I am trying to get all images : myipaddres:4243/images/json. I’am getting “This webpage is not available” page.

Why do node_modules keep disappearing from docker after build?

I’m mimicking the setup found here https://github.com/mjhea0/node-docker-workflow. Using docker-compose to link 2 docker containers (node, redis). Here’s the circle ci file: machine: services: – docker dependencies: override: – sudo pip install -U docker-compose test: override: – docker-compose run -d –no-deps node – cd node; npm test And here is my node Dockerfile: FROM dockerfile/nodejs RUN […]

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