-
-
Notifications
You must be signed in to change notification settings - Fork 313
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 in docker #850
Comments
You would need to map all paths used by sysinfo. But once done, I think it should just work. What is the issue with this approach? |
No issue at all! :)
Are these paths documented at all? I could test it for you if you like and
confirm if it works
…On Fri, 30 Sep 2022, 01:25 Guillaume Gomez, ***@***.***> wrote:
You would need to map all paths used by sysinfo. But once done, I think it
should just work. What is the issue with this approach?
—
Reply to this email directly, view it on GitHub
<#850 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAR4WFXFMNVZCN54V4C5CPTWAYQP5ANCNFSM6AAAAAAQXIGJGM>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
No they're not as it's very specific to linux. You can |
Which reminds me: https://blog.guillaume-gomez.fr/articles/2021-09-06+sysinfo%3A+how+to+extract+systems%27+information I explained how |
I managed to get sysinfo working in Docker, but needed to modify sysinfo to not read from I wasn't really sure if it would be appropriate to make a feature request for something like this, but I'd love to be able to use the official sysinfo instead. Maybe a similar approach could work, using an env var during build/runtime to configure it? It doesn't make much sense to expose it in the public API I don't think since it's Linux-specific. |
It won't work for any other platform than linux. I'm not sure it would make much sense to have such a feature. However if we can make some changes so it's easier for you to keep it in your branch, it's fine to me. |
The changes I made were only on the Linux versions of the files. This was my concern though, as it adds Linux-specific functionality. I'm not sure it's worth porting that into sysinfo and I don't mind using my own fork, but it might be worth keeping this issue to track if others also come across the same issue with Docker. I'm not sure there are any small changes that can be made to significantly simplify maintaining my fork of sysinfo. It's already a pretty small set of changes anyway. I'm just updating all the places that "/proc" shows up in the source to instead pull from an env var if it's set, which is only a few places really. |
Sounds good to me in any case. Maybe add a link to your repository so others can use it directly? ;) |
I linked it a couple replies up, but I'll split it out into its own repo sometime today and post the link here for anyone interested in it. Currently it's vendored as a subdirectory in another project. |
Hey Guillaume,
Would it not be possible to make this crate work in docker if you simply map the volumes
i.e. in your docker-compose you can map paths from your host to the container like so...
The text was updated successfully, but these errors were encountered: