这是indexloc提供的服务,不要输入任何密码
Skip to content

Official nodejs Docker images need to be rewritten to support roots #735

@roytruelove

Description

@roytruelove

I spent the day today working on Dockerizing a roots build based off of the official node images. Every install attempt, however, ended in EACCES: permission denied. The most basic attempt was this:

FROM node:6.7.0
RUN npm install roots -g 

Which gave me:

Error: EACCES: permission denied, mkdir '/root/.config/roots'
  at Error (native)
  at Object.fs.mkdirSync (fs.js:922:18)
  at Function.sync (/usr/local/lib/node_modules/roots/node_modules/mkdirp/index.js:71:13)
  at Object.<anonymous> (/usr/local/lib/node_modules/roots/post_install.js:19:8)
  <snip>

I couldn't figure out how this could happen since I was running as root. I finally happened upon this from the roots docs:

This error pops up frequently for people that are new to the unix command line. Contrary to popular belief, it is not an error with roots, it's an error with the permissions on your computer.

Then it recommends that you read an introduction to UNIX permissioning.

I immediately contacted the maintainers of the node Docker images letting them know about the errors with the permissions in their containers. They didn't seem to share my concern so I figured they were new to the unix command line and I sent them the link that you recommended. They told me that they don't see this issue in other installs and perhaps there might be something unique in Roots' installation. I told them that was impossible and again pointed them to your docs.

I tried installing a handful of the most commonly used node tools and they all installed fine, so this issue seems to be hitting roots the hardest which is why I'm reaching out. I was hoping you could help them determine what might be wrong in their images and perhaps post your findings here, or in the documentation itself?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions