Below is my Dockerfile my-docker-file.
FROM ubuntu:14.04 RUN apt-get update RUN apt-get -y upgrade RUN apt-get install -y python python-pip git-all python-dev libxml2-dev libxslt1-dev libmysqlclient-dev gunicorn python-pycurl libcurl4-openssl-dev RUN apt-get install -y rubygems-integration inotify-tools RUN gem install sass -v 3.3.14 RUN apt-get install -y nodejs RUN apt-get install -y npm RUN npm install jsmin -g But it fails in the last step (see below). Why is this happening and how can I fix??
$ docker build -f /path/to/my/project/my-docker-file . <... FIRST EIGHT STEPS SNIPPED ...> ---> 742601020ac5 Step 9/9 : RUN npm install jsmin -g ---> Running in 6528f8aa90cc npm http GET https://registry.npmjs.org/jsmin npm http GET https://registry.npmjs.org/jsmin npm http GET https://registry.npmjs.org/jsmin npm ERR! Error: CERT_UNTRUSTED npm ERR! at SecurePair.<anonymous> (tls.js:1370:32) npm ERR! at SecurePair.EventEmitter.emit (events.js:92:17) npm ERR! at SecurePair.maybeInitFinished (tls.js:982:10) npm ERR! at CleartextStream.read [as _read] (tls.js:469:13) npm ERR! at CleartextStream.Readable.read (_stream_readable.js:320:10) npm ERR! at EncryptedStream.write [as _write] (tls.js:366:25) npm ERR! at doWrite (_stream_writable.js:223:10) npm ERR! at writeOrBuffer (_stream_writable.js:213:5) npm ERR! at EncryptedStream.Writable.write (_stream_writable.js:180:11) npm ERR! at write (_stream_readable.js:583:24) npm ERR! If you need help, you may report this log at: npm ERR! <http://github.com/isaacs/npm/issues> npm ERR! or email it to: npm ERR! <[email protected]> npm ERR! System Linux 4.9.87-linuxkit-aufs npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install" "jsmin" "-g" npm ERR! cwd / npm ERR! node -v v0.10.25 npm ERR! npm -v 1.3.10 npm ERR! npm ERR! Additional logging details can be found in: npm ERR! /npm-debug.log npm ERR! not ok code 0 The command '/bin/sh -c npm install jsmin -g' returned a non-zero code: 1