linuxkit/contrib/foreign-kernels/Dockerfile.deb
Rolf Neugebauer 8301540809 Update remaining uses of alpine:3.7 to alpine:3.8
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@gmail.com>
2018-07-07 19:26:58 +01:00

28 lines
619 B
Docker

FROM alpine:3.8 AS extract
ARG DEB_URLS
RUN apk add --no-cache curl dpkg tar && true
WORKDIR /deb
RUN mkdir extract
RUN for url in ${DEB_URLS}; do \
echo "Extracting: $url"; \
curl -fsSL -o dl.deb $url && \
dpkg-deb -x dl.deb . ;\
done
RUN for d in lib/modules/*; do depmod -b . $(basename $d); done
RUN mkdir /out
RUN cp -a boot/vmlinuz-* /out/kernel
RUN cp -a boot/config-* /out/kernel_config
RUN cp -a boot/System.map-* /out/System.map
RUN tar cf /out/kernel.tar lib
RUN tar cf /out/kernel-dev.tar usr || true
FROM scratch
WORKDIR /
ENTRYPOINT []
CMD []
COPY --from=extract /out/* /