-
Notifications
You must be signed in to change notification settings - Fork 51
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
Add Dockerfile #106
Add Dockerfile #106
Conversation
I just tried this out but used Edit: @Samyak2 any reason for picking buster? |
Oof, that's bad. Does buster work?
No particular reason other than it being the latest one. I thought it would be good to lock it to a particular distro so that any dependencies (we don't have any yet) installed wouldn't break if the tag is updated. |
@Samyak2 Plis update the branch with |
585f370
to
f472ea2
Compare
- instead of go-getting from GitHub, the binary is built from the source directory (assumed to be in the same directory as the Dockerfile) - set all `HOST_` required by gopsutil - alternatively, for faster development you can uncomment out the `# ADD grofer /go/bin/` to directly add the local `grofer` binary instead of building it inside the container everytime. If you see a GLIBC error on running the binary in the container, build it with `CGO_ENABLED=0 go build`
the `HOST_` env vars are set to `/host` and not `/rootfs`, obviously that should not have worked lol
So I tried the latest version, some things works now.
|
Also, @Samyak2, is it possible to use
|
Also, I'm a little worried about how we'll perform kill operations. The signal can't be sent from within the container to kill the host process right? Whereas this might not be an issue with the containers, which reminds me, we've got to mount the docker socket too! |
While doing
Oh good point |
This is so cool! EDIT: I'm blown away, this works great xD |
Ooh yes, that fixes it.
@MadhavJivrajani The reason I did not choose alpine was because the dockerhub page mentions
But if grofer works, it should provide a significant improvement.
This works well! Amazing |
Looks like alpine works, I'll switch to it. |
@Samyak2 can you try this out again by passing |
@MadhavJivrajani It works! The network graph is consistent between host and docker 🥳 I have a question though, what does |
this fixes wrong network stats issue
RX is received and TX is transmitted, so they represent the amount of data sent and received through network. Edit: I'm not 100% sure about this, but even with a speed test, at max a few mB gets used. It shouldn't really consume a lot of data. |
Makes sense.
I think it consumes at least a few hundred Mbs. Considering a speed of So I compared this with Before speed test, bpytop shows
and grofer shows
After speed test, bpytop:
grofer:
I think something is wrong here. I can open a new issue for this and move the discussion there. |
Also, I had another idea related to this PR. We could publish this image to the GitHub container registry and use actions to automatically publish on release. I'll try making a workflow for this. |
That's a great idea |
@Samyak2 how's it going? |
Hi. I haven't been able to work on this over the past few days, I'll try to get the container workflow ready in a couple of days. |
- publishes image to the GitHub docker registry (NOT GitHub container registry) - temporarily also includes containers for all PRs - this is only to test this in the PR - will be disabled in a later commit - testing with act fails due to the registry login step
I was able to write a workflow for building and publishing Docker images to the GitHub Docker registry (NOT the container registry) using this starter workflow mentioned by @Gituser143 (thank you!). Currently, it also publishes on PR. This was just to test the workflow. act failed at the registry login step, so I'm assuming |
Wut. Does the docker registry need to be enabled somewhere before using it? |
- moved to the GitHub container registry since it supersedes the GitHub docker registry - act still fails, need to try on actual actions
In the latest commit, I changed the registry to the GitHub container registry since it's newer. This is based on RocketChat's workflow for the same.
Edit: This time it failed because the GitHub container registry is not enabled for the organization yet.
Do we go about enabling this or use the GitHub docker registry instead? |
Yea I feel like we should. Maybe bring it up on the slack channel once? |
New error now:
Perhaps we need to provide write access to this Action as described here. Relevant thread in the GitHub community. We could try doing this from an internal branch instead of a fork, as we won't need containers for every PR. I will direct this PR to a new, internal branch and we can test the Actions there. Is that ok? |
Sounds good 👍🏻 |
I have changed the base branch to |
Thanks @Samyak2, just one thing before you proceed: you'll need to explicitly mount the docker socket for Post that feel free to merge it and open a PR from the new branch 😄 |
Ah right, I forgot about that. I'll add the docker socket and split it into multiple lines. |
Changes look good to me! We'll have to fix push soon though. |
Yes, I'll fix that from the internal |
Description
It isn't working yet, do not merge plsIt works now!
Fixes #101
golang
imagegrofer
is installed usinggo get
(not from local source, I think?)grofer
is installed using the local current directory.HOST_PROC
,HOST_SYS
, etc. is set forgopsutil
What does not work:grofer
just freezes on launch, while taking 100% CPU. It has to be stopped usingdocker stop
(ctrl-c does not work). Only--help
,about
seem to work (proc
freezes too). I tried settingHOST_SYS
, etc. the issue still exists. I'm opening this draft PR to see if we can fix this.Type of change
Checklist:
go fmt
on my code (reference)