Sunday, 30 April 2017

Rebuilding docker image is failing although using the same Dockerfile as shown in the hub

I would like to build this docker image by myself: chrisgeorge/nightmare-headless (https://hub.docker.com/r/chrisgeorge/nightmare-headless/~/dockerfile/)

So I used the same Dockerfile

FROM node:slim

RUN apt-get update && \
    apt-get install -y \
        xvfb \
        x11-xkb-utils \
        xfonts-100dpi \
        xfonts-75dpi \ 
        xfonts-scalable \
        xfonts-cyrillic \
        x11-apps \
        clang \
        libdbus-1-dev \
        libgtk2.0-dev \
        libnotify-dev \
        libgnome-keyring-dev \
        libgconf2-dev \
        libasound2-dev \
        libcap-dev \
        libcups2-dev \
        libxtst-dev \
        libxss1 \
        libnss3-dev \
        gcc-multilib \
        g++-multilib \
        xauth \
        git \
        sudo \
        --no-install-recommends \
    && apt-get autoclean \
    && apt-get clean \
    && rm -rf /var/lib/api/lists/*

RUN chown -R node:node /home/node
RUN echo %sudo ALL=NOPASSWD: ALL >> /etc/sudoers
WORKDIR /home/node
ENV HOME /home/node
USER node
RUN npm install nightmare

npm install nightmare will call npm install electron and this is failing:

/usr/local/lib/node_modules/electron/install.js:47
  throw err
  ^

Error: ENOENT: no such file or directory, lstat '/usr/local/lib/node_modules/electron/dist/resources'
    at Error (native)
npm ERR! Linux 4.4.0-72-generic
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "electron"
npm ERR! node v6.10.2
npm ERR! npm  v3.10.10
npm ERR! code ELIFECYCLE

npm ERR! electron@1.6.6 postinstall: `node install.js`
npm ERR! Exit status 1



via user3142695

No comments:

Post a Comment