-
Notifications
You must be signed in to change notification settings - Fork 1k
Convert rc.init and rc.shutdown to Go #2500
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
Conversation
pkg/init/Dockerfile
Outdated
COPY --from=build /go/bin/service /usr/bin/ | ||
COPY --from=build usermode-helper /sbin/ | ||
COPY --from=mirror /out/ / | ||
COPY etc etc/ | ||
COPY bin bin/ | ||
#COPY bin bin/ |
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.
You can nuke this I think
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.
Ah yes I think that is left over from testing
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 didn't go through it line by line but I did skim through it and it seems ok, so LGTM subject to dropping the commented COPY
I mentioned separately,
What does that mean?
What is the big advantage of a compiled go binary over a shell script in this instance? Either way, the actual commit looks good here too (although I also didn't do line-by-line). |
@deitch you can run LinuxKit images as docker containers, there is a small example here https://github.com/moby/tool/tree/master/examples - doing more work on other userspace runtimes. |
06acf58
to
051bb46
Compare
Interesting. I guess Since linuxkit images contain containerd and runc and run all of the "internal" images that way, any issues? |
With this PR, you just need to add kernel, dhcp and anything else systemy (eg rngd), but otherwise you can run exactly the same yaml. I will update the example shortly. |
83eb010
to
2d4442d
Compare
Updated hashes |
With linuxkit/linuxkit#2500 the init script can be used for both bare metal and in Docker. Signed-off-by: Justin Cormack <[email protected]>
moby/tool#149 updates the |
CI seems to have hung on the wireguard test; going to (a) restart and (b) test it myself. Seems to run fine; I think CI must have hit some glitch... |
With linuxkit/linuxkit#2500 the init script can be used for both bare metal and in Docker. Signed-off-by: Justin Cormack <[email protected]>
Ah, the test passes with hyperkit but somehow I broke halt in qemu, but only for that one test! |
This removes more shell scripts to improve maintainability. This now also works correctly in userspace, so it can be used for running LinuxKit images in Docker and other such use cases. It is a literal conversion of the shell scripts with a few small tweaks. Signed-off-by: Justin Cormack <[email protected]>
Signed-off-by: Justin Cormack <[email protected]>
c328ab7
to
042cd76
Compare
Signed-off-by: Justin Cormack <[email protected]>
Ok, I updated this to do exactly the same shutdown code as the previous version, so should hopefully pass CI now. |
Ok this is passing now, so fixed the |
With linuxkit/linuxkit#2500 the init script can be used for both bare metal and in Docker. Signed-off-by: Justin Cormack <[email protected]>
This removes more shell scripts to improve maintainability.
This now also works correctly in userspace, so it can be used for
running LinuxKit images in Docker and other such use cases.
It is a literal conversion of the shell scripts with a few small
tweaks.
Signed-off-by: Justin Cormack [email protected]