Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

justincormack
Copy link
Member

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]

zebroid

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/
Copy link
Contributor

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

Copy link
Member Author

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

Copy link
Contributor

@ijc ijc left a 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,

@deitch
Copy link
Collaborator

deitch commented Sep 12, 2017

This now also works correctly in userspace, so it can be used for
running LinuxKit images in Docker

What does that mean?

This removes more shell scripts to improve maintainability

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).

@justincormack
Copy link
Member Author

@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.

@deitch
Copy link
Collaborator

deitch commented Sep 12, 2017

you can run LinuxKit images as docker containers

Interesting. I guess -format docker leaves out the unnecessary kernel. Would be cool if the same format could run in all formats.

Since linuxkit images contain containerd and runc and run all of the "internal" images that way, any issues?

@justincormack
Copy link
Member Author

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.

@justincormack
Copy link
Member Author

Updated hashes

justincormack added a commit to justincormack/tool that referenced this pull request Sep 12, 2017
With linuxkit/linuxkit#2500 the init script
can be used for both bare metal and in Docker.

Signed-off-by: Justin Cormack <[email protected]>
@justincormack
Copy link
Member Author

moby/tool#149 updates the moby examples to use this, making them simpler.

@justincormack
Copy link
Member Author

justincormack commented Sep 12, 2017

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...

justincormack added a commit to justincormack/tool that referenced this pull request Sep 12, 2017
With linuxkit/linuxkit#2500 the init script
can be used for both bare metal and in Docker.

Signed-off-by: Justin Cormack <[email protected]>
@justincormack
Copy link
Member Author

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]>
Signed-off-by: Justin Cormack <[email protected]>
@justincormack
Copy link
Member Author

Ok, I updated this to do exactly the same shutdown code as the previous version, so should hopefully pass CI now.

@justincormack
Copy link
Member Author

Ok this is passing now, so fixed the qemu shutdown issue.

justincormack added a commit to justincormack/tool that referenced this pull request Sep 18, 2017
With linuxkit/linuxkit#2500 the init script
can be used for both bare metal and in Docker.

Signed-off-by: Justin Cormack <[email protected]>
@justincormack justincormack merged commit cf15ec3 into linuxkit:master Sep 19, 2017
@justincormack justincormack deleted the shared-init branch September 19, 2017 01:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants