challenge: compile kp program inside alpine to avoid linking to glibc

This commit is contained in:
nemunaire 2019-02-24 15:51:35 +01:00
commit be42545034
3 changed files with 9 additions and 9 deletions

View file

@ -5,7 +5,10 @@ RUN mkdir -p /out/etc/apk/ && \
cp -r /etc/apk/keys /out/etc/apk/keys
RUN apk add --no-cache \
mdocml-apropos
gcc \
linux-headers \
mdocml-apropos \
musl-dev
RUN apk add --no-cache --initdb -p /out \
alpine-baselayout \
@ -53,6 +56,9 @@ RUN makewhatis /out/usr/share/man
RUN rm -rf /out/etc/inittab
COPY kp.c /root/kp.c
RUN gcc -o /out/usr/bin/init-crypto /root/kp.c
FROM scratch