NodeOS: "Operation not permitted" on docker image
Hey,
@piranna i managed to create a docker image by hand and got this error do think you can fix this or do you have a clue how to fix it?
The nodeos-barebones
create a invalid tar file so i unpacked barebones
and packed again with this command: tar -cf barebones.tar bin/ dev/ lib/ sbin/ init | docker import - barebones
[philipp@arch NodeOS]$ docker run -i 497fb770977e
mount: Operation not permitted
{ [Error: EPERM, Operation not permitted 'proc'] errno: 1, code: 'EPERM', path: 'proc', syscall: 'mount' }
fs.js:897
return binding.symlink(preprocessSymlinkDestination(target, type, path),
^
Error: EEXIST: file already exists, symlink '/proc/mounts' -> '/etc/mtab'
at Error (native)
at Object.fs.symlinkSync (fs.js:897:18)
at /lib/node_modules/nodeos-mount-filesystems/server.js:394:8
at /lib/node_modules/nodeos-mount-filesystems/node_modules/mkdirp/index.js:48:26
at FSReqWrap.oncomplete (fs.js:82:15)
termination: Operation not permitted
REPOSITORY TAG IMAGE ID CREATED SIZE
<none> <none> 497fb770977e 7 minutes ago 54.75 MB
usersfs latest ce2793db7999 13 minutes ago 54.75 MB
rootfs latest 5dbee56f5abb 13 minutes ago 19.77 MB
initramfs latest f209c1c10720 14 minutes ago 19.77 MB
barebones latest 05c860e2d94c 23 minutes ago 17.06 MB
The one with the “none” in it is the nodeos image
About this issue
- Original URL
- State: open
- Created 8 years ago
- Comments: 51 (51 by maintainers)
I think I’ve found it, and in fact, it’s not something new. Seems gnu
tar
(booooh…) requires the file size of the symlink entry header to be zero, while we are setting it to the length of the target path (22), and in fact it’s the only notable difference betweenfromcpio.tar
andgnu.tar
files…Probably this is due to the fact
cpio2tar
is using stream API, sincecpio-stream
module send the symlink path as it’s content. I’ll notify to @mafintosh about this and putcpio2tar
in an independent module so we can be able to test this easily.I’ve fixed
tar-stream
and in a quick check seems cpio2tar is now generating valid tar files regarding to symlinks size 😃I’ll try to find some time to integrate this on NodeOS and let’s see if we can generate Docker images 😄