-
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 pt. 2 #124
Add Dockerfile pt. 2 #124
Conversation
Looks like the container registry is under maintenance currently :( |
WOOOHOOOOOOO |
I think this is ready now. I made a few changes
|
@Samyak2 you might want to update the branch :P |
I'll rebase it on main |
e0b48a7
to
d63865e
Compare
Is there anything left to do here? |
Everything looks good to me, just to be sure: this image build will be triggered only when a new release comes out? |
No. This is how it will work:
So, pulling |
Sounds good |
I've added a couple of lines on that. A few things that should be noted here:
|
- 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
this fixes wrong network stats issue
- 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
- moved to the GitHub container registry since it supersedes the GitHub docker registry - act still fails, need to try on actual actions
- this was only enabled for testing - it does not currently work for PRs that originate from forks - i.e., only internal branches work - commented it out in case it is needed later
^ Rebased on main Is there anything else to do here? |
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.
Hey, sorry I missed this
I see there are a few small details regarding version to be worked out, but that can be done independently later, with the documentation in the README, this looks good to me in the current state and can be merged
cc @Gituser143
@Samyak2 |
@Gituser143 yes, but this one is run only on commits to the main branch and not on PRs. It can be enabled on PRs too, but if they aren't from an internal branch of this repo (pesos/grofer), it will just give a permission denied error. |
Description
Fixes #101
Based on #106
golang
imagegrofer
is installed usinggo install
from the local sourceHOST_PROC
,HOST_SYS
, etc. is set forgopsutil
Type of change
Please delete options that are not relevant.
Checklist:
go fmt
on my code (reference)TODO