New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rename 'NodeOS' to 'nodeos' and set absolute path #266
Conversation
IMAGE=NodeOS | ||
USERSFS=out/latest/usersfs | ||
IMAGE=nodeos | ||
USERSFS=/out/latest/usersfs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are the paths absolute from the current working dir? That's strange...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i dont know but thats the only time i dont get a validation error like this:
docker: Error response from daemon: create out/latest/usersfs: "out/latest/usersfs" includes invalid characters for a local volume name, only "[a-zA-Z0-9][a-zA-Z0-9_.-]" are allowed.
See 'docker run --help'.
Or if the path is relative i get a error that says that docker needs a absolute path
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, it seems that if it doesn't start by a slash it think we are going to use a Docker volume... What a sh*t.
This is a problem on Docker about permissions for mounting filesystems. I didn't have time to take a look, but seems it's now feasable by enabling some capabilities when executing Docker. Could you be able to review it?
At least the unmouning of the filesystems done by |
I think it's done already because they are printed by using |
@piranna I changed the path to a real absolute path ( npm run docker [cb2c59d]
> NodeOS@1.0.0-RC2 docker /home/philipp/Dokumente/NodeOS
> scripts/docker
mount procfs: Resource busy
fs.js:1048
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:1048:18)
at /lib/node_modules/nodeos-mount-filesystems/server.js:381:6
at /lib/node_modules/nodeos-mount-filesystems/node_modules/mkdirp/index.js:48:26
at FSReqWrap.oncomplete (fs.js:117:15)
/: Resource busy I also add the privileged flag, do you think its trying to mount my root partition? |
Here we have two problems, one about not being able to mount |
Exactly the problem is at https://github.com/NodeOS/nodeos-mount-filesystems/blob/82f8c07f0327cf57f916692034892a3f0b78defa/server.js#L381-L382, where |
@piranna somehow i now get some errors and i dont know why Successfully generated nodeos user folder
cp: reguläre Datei '/home/philipp/Dokumente/NodeOS/node_modules/nodeos-usersfs/out/nocona/barebones.tar' kann nicht angelegt werden: Datei oder Verzeichnis nicht gefunden
npm ERR! Linux 4.6.2-1-ARCH
npm ERR! argv "/home/philipp/.nvm/versions/node/v5.12.0/bin/node" "/home/philipp/.nvm/versions/node/v5.12.0/bin/npm" "run" "build"
npm ERR! node v5.12.0
npm ERR! npm v3.8.6
npm ERR! code ELIFECYCLE
npm ERR! nodeos-usersfs@1.0.0-RC2 build: `scripts/build`
npm ERR! Exit status 30
npm ERR!
npm ERR! Failed at the nodeos-usersfs@1.0.0-RC2 build script 'scripts/build'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the nodeos-usersfs package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! scripts/build
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs nodeos-usersfs
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls nodeos-usersfs
npm ERR! There is likely additional logging output above.
npm WARN Local package.json exists, but node_modules missing, did you mean to install?
npm ERR! Please include the following file with any support request:
npm ERR! /home/philipp/Dokumente/NodeOS/node_modules/nodeos-usersfs/npm-debug.log
Error compiling ''
dirname: fehlender Operand
„dirname --help“ liefert weitere Informationen.
rmdir: fehlender Operand
„rmdir --help“ liefert weitere Informationen.
npm ERR! Linux 4.6.2-1-ARCH
npm ERR! argv "/home/philipp/.nvm/versions/node/v5.12.0/bin/node" "/home/philipp/.nvm/versions/node/v5.12.0/bin/npm" "run" "build"
npm ERR! node v5.12.0
npm ERR! npm v3.8.6
npm ERR! code ELIFECYCLE
npm ERR! NodeOS@1.0.0-RC2 build: `scripts/build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the NodeOS@1.0.0-RC2 build script 'scripts/build'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the NodeOS package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! scripts/build
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs NodeOS
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls NodeOS
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /home/philipp/Dokumente/NodeOS/npm-debug.log as always i already tried a clean install |
@piranna a small update on this → npm run docker [daace86]
> NodeOS@1.0.0-RC2 docker /home/philipp/Dokumente/NodeOS
> scripts/docker
mount procfs: Operation not permitted
mount devtmpfs: Operation not permitted
{ Error: EPERM, Operation not permitted 'proc'
at Error (native) errno: 1, code: 'EPERM', path: 'proc', syscall: 'mount' }
Could not find userfs: Error: PARTUUID=d7da3845-7e88-4930-8ce6-6c4e9d679f07 not exists
at /lib/node_modules/nodeos-mount-filesystems/server.js:245:38
at FSReqWrap.cb [as oncomplete] (fs.js:251:19)
prompt: path to userfs: Docker is indeed trying to mount the |
Docker is a bit unmaintained at this moment, you are being a pioneer here ;-)
Try to rebase your changes and I'll accept them.
Define the |
Already done, this is the output: → npm run docker [daace86]
> NodeOS@1.0.0-RC2 docker /home/philipp/Dokumente/NodeOS
> scripts/docker
mount procfs: Resource busy
{ Error: EBUSY, Resource busy 'proc'
at Error (native) errno: 16, code: 'EBUSY', path: 'proc', syscall: 'mount' }
Trace: { Error: ENOENT: no such file or directory, scandir '/tmp'
at Error (native) errno: -2, code: 'ENOENT', syscall: 'scandir', path: '/tmp' }
at onerror (/lib/node_modules/nodeos-mount-filesystems/server.js:37:13)
at done (/lib/node_modules/nodeos-mount-filesystems/server.js:225:5)
at /lib/node_modules/nodeos-mount-filesystems/server.js:231:22
at FSReqWrap.oncomplete (fs.js:117:15)
Starting REPL session
NodeOS-mount-filesystems> |
Could you be able to check on the REPL what's the content of the root filesystem ( |
Starting REPL session
NodeOS-mount-filesystems> var fs = require('fs')
undefined
NodeOS-mount-filesystems> fs.readdirSync('/')
[ '.dockerenv', 'bin', 'dev', 'etc', 'lib', 'proc', 'sys' ]
NodeOS-mount-filesystems> I also inspected the
|
(@luii, I've cleaned the output of |
So seems in fact |
I'll look into this and do the pioneer work for this |
@luii fantastic :) |
@piranna i've digged more into the node.js repl from NodeOS-mount-filesystems> fs.readFileSync('/proc/cmdline')
<Buffer 69 6e 69 74 72 64 3d 5c 69 6e 69 74 72 61 6d 66 73 2d 6c 69 6e 75 78 2e 69 6d 67 20 72 6f 6f 74 3d 50 41 52 54 55 55 49 44 3d 64 37 64 61 33 38 34 35 ... >
NodeOS-mount-filesystems> var cmdline = fs.readFileSync('/proc/cmdline')
undefined
NodeOS-mount-filesystems> cmdline.toString()
> 'initrd=\\initramfs-linux.img root=PARTUUID=d7da3845-7e88-4930-8ce6-6c4e9d679f07\n'
NodeOS-mount-filesystems> |
Because Docker expose the '/proc' of the host system, including the cmdline If you want to document it... :-D
|
You wont belive it but im just halfway through with documenting the module just as you spoke of |
Lol! :-P I believe, promise! :-P
|
@piranna i've restored the deleted → npm run docker [97c8f05]
> NodeOS@1.0.0-RC2 docker /home/philipp/Dokumente/NodeOS
> scripts/docker
mount procfs: Operation not permitted
mount devtmpfs: Operation not permitted
{ Error: EPERM, Operation not permitted 'proc'
at Error (native) errno: 1, code: 'EPERM', path: 'proc', syscall: 'mount' }
Trace: { Error: EPERM, Operation not permitted 'overlay'
at Error (native) errno: 1, code: 'EPERM', path: 'overlay', syscall: 'mount' }
at onerror (/lib/node_modules/nodeos-mount-filesystems/server.js:37:13)
at done (/lib/node_modules/nodeos-mount-filesystems/server.js:225:5)
at /lib/node_modules/nodeos-mount-filesystems/node_modules/async/lib/async.js:52:16
at done (/lib/node_modules/nodeos-mount-filesystems/node_modules/async/lib/async.js:241:17)
at /lib/node_modules/nodeos-mount-filesystems/node_modules/async/lib/async.js:44:16
at /lib/node_modules/nodeos-mount-filesystems/server.js:174:24
Starting REPL session
NodeOS-mount-filesystems> var fs = require('fs')
undefined
NodeOS-mount-filesystems> fs.readdirSync('/')
[ '.dockerenv', 'bin', 'dev', 'etc', 'lib', 'proc', 'sys', 'tmp' ]
NodeOS-mount-filesystems> fs.readdirSync('/tmp')
[ '.workdirs', 'latest' ]
NodeOS-mount-filesystems> If im correct that |
Could it be that's the filesystem image itself? I didn't go yet as far as you have gone... :-) Use |
https://en.wikipedia.org/wiki/Here_be_dragons#Computer_Programming For the record ;-) |
@piranna yep its the userfs image as user its around 223mb big and the user itself is around 200mb big |
Ok, that's good :-) Can you share your |
@piranna i just took the Dockerfile from this commit and updated the (
cd node_modules/nodeos-barebones &&
npm run dockerBuild || exit 10
) &&
(
cd node_modules/nodeos-initramfs &&
npm run dockerBuild || exit 20
) &&
(
cd node_modules/nodeos-rootfs &&
npm run dockerBuild || exit 30
) &&
(
cd node_moudules/nodeos-usersfs &&
npm run dockerBuild || exit 35
) &&
(
docker build -t nodeos . || exit 40
) || exit $? |
That Dockerfile only copy the filesystem image, what we need is to mount
|
Like in the other file (dockerBuild) we need to change the name to lowercase. And after this docker complains about absolute paths for this i put a slash infront of the userfs var
I think we can close this since you got it working on docker |
Docker support is still experimental as you have seen... Also I would like to integrate the publish of releases to Docker Hub before consider it fully finished. |
But the problems described in here are resolved |
Ok, that's fine :-)
El 7/2/2017 16:32, "Philipp Czarnetzki" <notifications@github.com> escribió:
But the problems described in here are resolved
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#266 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAgfvuJJ2DTnBswa5T6uQ7I0VpGsvuJNks5raI6QgaJpZM4I_JdV>
.
|
I know that you want to keep track of all the things related to docker and thats totally fine, but my changes in this PR were total trash (e.g. set absolute path for something that needs to be relative, at that time i had brain farts or something idk) and the naming problem of the image was resolved in #265. |
Ah, ok then! That was the only concern I had about this :-)
I'll try to take a look, but I'm busy lately, that's why I'm having problems to answer. Anyway, we should decide about what to do with the wiki and the docs repo... I would move them to the |
Like in the other file (dockerBuild) we need to change the name to lowercase. And after this docker complains about absolute paths for this i put a slash infront of the userfs variable.
After this i get this error we already discussed #227: