Add the simple way to use qemu-register from other projects.#9
Add the simple way to use qemu-register from other projects.#9urpylka wants to merge 4 commits intohypriot:masterfrom
Conversation
StefanScherer
left a comment
There was a problem hiding this comment.
@urpylka Thanks for the contribution, but I don't understand why you cannot just use the image as it is in your other projects.
I've triggered CircleCI as it hasn't automatically built your PR (which is fixed now, so if you commit/change your code it will give you feedback immediatelly).
We can't accept this PR as it is right now, as it has breaking changes, others rely on this image and how to run it.
If you want to copy the binaries from the qemu-register image to your own image, you still can do it similar as you showed in the README.md.
Maybe you can give me more insights what you want to solve with this change.
| && ../configure --static --target-list=$TARGET_ARCH \ | ||
| && make -j $(nproc) install | ||
|
|
||
| FROM busybox |
There was a problem hiding this comment.
Why did you remove the much smaller final stage?
There was a problem hiding this comment.
I was guided by idea of gap between qemu-register and user-implementation. And if you wanna build your own implementation you can use large or smaller base image (qemu-register) and later copy binary files & register.sh. It's just one docker-layer. And it can be did before (as in your solution) or later (as in mine).
You are right. busybox is smaller than debian. And if it does matter, I can fixed it in PR (return previous structure).
| COPY --from=qemu /usr/local/bin/qemu-ppc64le /qemu-ppc64le | ||
| COPY --from=qemu /usr/local/bin/qemu-riscv64 /qemu-riscv64 | ||
| ADD register.sh /register.sh | ||
| CMD ["/register.sh", "--reset"] |
There was a problem hiding this comment.
This would break the usage of this image if there is no CMD any more.
There was a problem hiding this comment.
Yeah, I think that is not necessary for users, for example I can't using busybox in my project. I need debian, or alpine, or smthn else w package manager. Therefore CMD operation should using in user-implementation as I documented in README.md.
There was a problem hiding this comment.
I think about that a bit more and I has concluded that it can useful for tests. I return it back
| @@ -1,4 +0,0 @@ | |||
| #!/bin/bash | |||
There was a problem hiding this comment.
Why did you delete this script?
It's used in our CI pipeline which is now broken https://circleci.com/gh/hypriot/qemu-register/5
There was a problem hiding this comment.
Ooops, I didn't wan't break your CI 😅.
I removed build.sh, because I mean that construct docker build -t hypriot/qemu-register:local . (or another, written manual) better, because user must to understand what he is doing (what he is building). Also I documented that in README.md.
One moment I fix CI.
|
@StefanScherer so what about accept my PR? |
Added the sample of external using. Cleanup
Hello, please consider my PR.
README.mdfile (added more info and sample "HOW TO USE");register.sh;Dockerfilewith user implementation to documentation.