2

Here is my Dockerfile:

FROM arm32v7/node:8
RUN npm --version
RUN npm install -g yarn

And here is output log:

Sending build context to Docker daemon  65.25MB
Step 1/5 : FROM arm32v7/node:8
 ---> 1e66bc1fab80
Step 2/5 : RUN npm --version
 ---> Running in c62ffb8ecc56
Unknown host QEMU_IFLA type: 40
Unknown host QEMU_IFLA type: 41
Unknown host QEMU_IFLA type: 40
Unknown host QEMU_IFLA type: 41
Unknown QEMU_IFLA_INFO_KIND ipip
Unknown host QEMU_IFLA type: 40
Unknown host QEMU_IFLA type: 41
Unknown QEMU_IFLA_INFO_KIND ip6tnl
Unknown host QEMU_IFLA type: 40
Unknown host QEMU_IFLA type: 41
6.4.1
Removing intermediate container c62ffb8ecc56
 ---> 69f0396a3742
Step 3/5 : RUN npm install -g yarn
 ---> Running in d173b95e284c
Unknown host QEMU_IFLA type: 40
Unknown host QEMU_IFLA type: 41
Unknown host QEMU_IFLA type: 40
Unknown host QEMU_IFLA type: 41
Unknown QEMU_IFLA_INFO_KIND ipip
Unknown host QEMU_IFLA type: 40
Unknown host QEMU_IFLA type: 41
Unknown QEMU_IFLA_INFO_KIND ip6tnl
Unknown host QEMU_IFLA type: 40
Unknown host QEMU_IFLA type: 41
Error: could not get uid/gid
[ 'nobody', 0 ]

    at /usr/local/lib/node_modules/npm/node_modules/uid-number/uid-number.js:37:16
    at ChildProcess.exithandler (child_process.js:283:5)
    at emitTwo (events.js:126:13)
    at ChildProcess.emit (events.js:214:7)
    at maybeClose (internal/child_process.js:915:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
TypeError: Cannot read property 'get' of undefined
    at errorHandler (/usr/local/lib/node_modules/npm/lib/utils/error-handler.js:205:18)
    at /usr/local/lib/node_modules/npm/bin/npm-cli.js:78:20
    at cb (/usr/local/lib/node_modules/npm/lib/npm.js:228:22)
    at /usr/local/lib/node_modules/npm/lib/npm.js:266:24
    at /usr/local/lib/node_modules/npm/lib/config/core.js:83:7
    at Array.forEach (<anonymous>)
    at /usr/local/lib/node_modules/npm/lib/config/core.js:82:13
    at f (/usr/local/lib/node_modules/npm/node_modules/once/once.js:25:25)
    at afterExtras (/usr/local/lib/node_modules/npm/lib/config/core.js:173:20)
    at Conf.<anonymous> (/usr/local/lib/node_modules/npm/lib/config/core.js:231:22)
/usr/local/lib/node_modules/npm/lib/utils/error-handler.js:205
  if (npm.config.get('json')) {
                 ^

TypeError: Cannot read property 'get' of undefined
    at process.errorHandler (/usr/local/lib/node_modules/npm/lib/utils/error-handler.js:205:18)
    at emitOne (events.js:116:13)
    at process.emit (events.js:211:7)
    at process._fatalException (bootstrap_node.js:391:26)
The command '/bin/sh -c npm install -g yarn' returned a non-zero code: 7

Any ideas why it's failing? I building image with with commad docker build . -t myimage (I am running docker on Mac OS X).


Please not that it works when installing yarn without "-g" flag.

user606521
  • 14,486
  • 30
  • 113
  • 204
  • Also observed with arm64v8/node:carbon on ubuntu-18.04 ... I will update my investigations at: https://github.com/rzr/webthing-iotjs/wiki/Docker – RzR Mar 01 '19 at 14:57
  • 2
    Possible duplicate of [Could not get uid/gid when building Node/Docker](https://stackoverflow.com/questions/52196518/could-not-get-uid-gid-when-building-node-docker) – Pait May 24 '19 at 08:41

0 Answers0