docker pull error: stdout: stderr: lchown ... invalid argument
Problem occurs when Docker is running inside unprivileged LXC (e.g. Proxmox container). It is not possible to pull or load image. During applying last layers error occurs:
387e2170064c: Pull complete
d8d8859fa010: Pull complete
8f8de87b1693: Pull complete
fcc5e0524282: Extracting 67.27MB/67.27MB
04f26efc025f: Download complete
e8637dd53f07: Download complete
eb68441e3be8: Download complete
failed to register layer: ApplyLayer exit status 1 stdout: stderr: lchown /home/Shinobi/node_modules/buffer-equal-constant-time/.npmignore: invalid argument
Problem is located in buffer-equal-constant-time-1.0.1.tgz
which contains some random UIDs/GIDs:
-rw-r--r-- 718322462/454177323 484 2013-12-16 21:10 package/package.json
-rw-r--r-- 718322462/454177323 26 2013-12-16 20:18 package/.npmignore
-rw-r--r-- 718322462/454177323 1101 2013-12-16 20:47 package/README.md
-rw-r--r-- 718322462/454177323 1045 2013-12-16 20:30 package/index.js
-rw-r--r-- 718322462/454177323 1013 2013-12-16 20:38 package/test.js
-rw-r--r-- 718322462/454177323 45 2013-12-16 20:43 package/.travis.yml
-rw-r--r-- 718322462/454177323 1518 2013-12-16 20:18 package/LICENSE.txt
in default configuration of LXC, there is only a range from 0 to 65536 UID allowed, so it is not possible to create files with above permissions. Other node modules doesn't have this problem and all files inside archives have UID/GID equals 0.
Additionally, this module is now obsolete. Please see Publish deprecation notice #6