-
Notifications
You must be signed in to change notification settings - Fork 16
Add the simple way to use qemu-register from other projects. #9
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
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,3 @@ | ||
| # Fetch base image | ||
| FROM debian:stretch as qemu | ||
|
|
||
| ENV QEMU_VERSION 4.2.0 | ||
|
|
@@ -27,14 +26,15 @@ RUN curl -sSL https://github.com/resin-io/qemu/commit/db186a3f83454268c43fc793a4 | |
| # - resulting binaries are located in "/usr/local/bin/qemu-*" | ||
| ARG TARGET_ARCH=arm-linux-user,aarch64-linux-user,ppc64le-linux-user,riscv64-linux-user | ||
| RUN mkdir build \ | ||
| && cd build \ | ||
| && ../configure --static --target-list=$TARGET_ARCH \ | ||
| && make -j $(nproc) install | ||
| && cd build \ | ||
| && ../configure --static --target-list=$TARGET_ARCH \ | ||
| && make -j $(nproc) install | ||
|
|
||
| FROM busybox | ||
| COPY --from=qemu /usr/local/bin/qemu-arm /qemu-arm | ||
| COPY --from=qemu /usr/local/bin/qemu-aarch64 /qemu-aarch64 | ||
| 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"] | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This would break the usage of this image if there is no
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah, I think that is not necessary for users, for example I can't using
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think about that a bit more and I has concluded that it can useful for tests. I return it back |
||
This file was deleted.
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.
Why did you remove the much smaller final stage?
Uh oh!
There was an error while loading. Please reload this page.
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 was guided by idea of gap between
qemu-registeranduser-implementation. And if you wanna build your own implementation you can use large or smaller base image (qemu-register) and later copy binary files ®ister.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.
busyboxis smaller thandebian. And if it does matter, I can fixed it in PR (return previous structure).