-
Notifications
You must be signed in to change notification settings - Fork 324
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
Running gtop in Docker #50
Comments
hi @pascalandy , gtop relies on |
Humm the only thing I could see is
But it does not work. |
Processes are actually listed under So if I try to mount
To tackle this, other projects such as gtop uses |
also for Network History, you need to add |
You probably want to run as privileged. It might want to be called out here that this is more a docker than a gtop question. |
For the process list, you might want to use Running in privileged mode is a bad idea. You don’t run top or htop with sudo. Docker provides capability management. If you’re denied permission to access a resource, check if you can add a corresponding capability. I can help more and even test. But not today. |
@jcberthon it worked! here is
Building and running the image:
More explanation about |
Thanks @aksakalli I also used |
Now, I'm wondering how to package this via zeit-pkg as this image's size is
I can't replicate the example from @marcosnils to this project which uses See an example where zeit pkg downsize the image size from 300Mo to 100Mo - https://hackernoon.com/reducing-nodejs-docker-images-size-by-50-using-multi-sage-builds-and-zeit-pkg-360ab8b6c6d2 Cheers! |
I have never use npm/node/pkg but from reading the manual from pkg I think you need to define so-called "assets" so that they are "bundled" in the resulting file. See https://www.npmjs.com/package/pkg#assets In the example from Hackernoon, the "helloworld" is so simple that there is probably no needs for assets, hence it probably works for them. In the assets, you should put your dependencies I guess. But as I said, I have no clue about npm/node/etc. I know well Docker. |
A few more things. In the Dockerfile, you should create a user and define it as the image's user. So that the container is run as a standard user and not root. This is particularly important since you want to give access to all other processes via You should also assess if you need an init system for clean shutdown and avoiding zombies. I guess you are not forking any processes and if you do not store any data, then this might not be relevant. |
Same for me:
I agree as well and it's a work in progress :)
|
It will not work in a Docker Alpine box w/o procps installed first. Just fixed this today in my cloud. |
Environment
Description
For the docker folks, I'd like to do a PR but I need your help first.
Dockerfile
Try it
Issue
We can see in the screenshot that the processes are those running in the container and not those from the host.
My question is: Which folder(s) should we mount in the container ?
Many cheers!
The text was updated successfully, but these errors were encountered: