I successfully build a docker image with the resin-cli inside a couple of months ago.
However, I tried again recently and it does not work. Using
RUN npm install resin-cli -g --production --unsafe-perm raises the following error:
../deps/e2fsprogs/lib/ext2fs/getsectsize.c:34:22: fatal error: linux/fd.h: No such file or directory #include <linux/fd.h>
I checked that this is a dependency project which recently changed. However, I can install the resin-cli doing the following:
- use docker run to run a /bin/bash terminal inside the container that I am building
- then, use
npm install resin-cli -g --production. That is, without
--unsafe-perm. That does not work. It reach to an infinite try-exception with the following errors:
gyp WARN EACCES user "nobody" does not have permission to access the dev dir "/usr/lib/node_modules/resin-cli/node_modules/ext2fs/.node-gyp/8.9.3" gyp WARN EACCES attempting to reinstall using temporary dev dir "/usr/lib/node_modules/resin-cli/node_modules/ext2fs/.node-gyp"
- However, if I manually stop the command at this point, and run again
npm install resin-cli -g --production --unsafe-permit works!
This is not a solution, because I cannot write a Dockerfile with this sequence of steps, but I hope it is enough information for you to debug this issue