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"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks!