Created
May 3, 2021 13:09
-
-
Save nuta/4c9ecd0d1a401dc5be88095bea5a991a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM ubuntu:latest | |
RUN apt update -y && apt install -y musl-tools | |
ADD hello.c /hello.c | |
RUN musl-gcc -static hello.c -o /hello | |
RUN mkdir /empty_dir | |
FROM scratch | |
WORKDIR / | |
COPY --from=0 /hello /hello | |
COPY --from=0 /empty_dir /tmp | |
# Add statically-linked busybox shell with musl libc. | |
ADD busybox /bin/sh | |
CMD ["/hello"] |
They are locally built objects in my machine. For busybox build, you can
reproduce it from the following Dockerfile:
https://github.com/nuta/kerla/blob/main/testing/Dockerfile#L4-L14
…On Mon, Jan 3, 2022 at 11:05 AM Ryo Ota ***@***.***> wrote:
***@***.**** commented on this gist.
------------------------------
@nuta <https://github.com/nuta>
Thanks you for the wonderful project!
hello.c is missing. How can I get hello.c and busybox?
—
Reply to this email directly, view it on GitHub
<https://gist.github.com/4c9ecd0d1a401dc5be88095bea5a991a#gistcomment-4014471>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABGR2ERVOFWOUGLOZEY3QFTUUD77DANCNFSM5LEK4RPA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
Thanks!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@nuta
Thanks you for the wonderful project!
hello.c
is missing. How can I gethello.c
andbusybox
?