challenge: compile kp program inside alpine to avoid linking to glibc
This commit is contained in:
parent
b42c447d27
commit
be42545034
3 changed files with 9 additions and 9 deletions
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Reference in a new issue