Files
linuxkit/pkg/init/Dockerfile
Tycho Andersen a4e0a594b1 add a static usermode helper
The binary is used in tandem with CONFIG_STATIC_USERMODEHELPER=y in 4.11+,
see the big comment in the binary for the current whitelist of binaries.

Signed-off-by: Tycho Andersen <tycho@docker.com>
2017-06-15 10:39:52 -07:00

23 lines
672 B
Docker

FROM linuxkit/alpine:630ee558e4869672fae230c78364e367b8ea67a9 AS build
RUN apk add --no-cache --initdb alpine-baselayout make gcc musl-dev
ADD usermode-helper.c .
RUN make usermode-helper
FROM linuxkit/alpine:630ee558e4869672fae230c78364e367b8ea67a9 AS mirror
RUN mkdir -p /out/etc/apk && cp -r /etc/apk/* /out/etc/apk/
RUN apk add --no-cache --initdb -p /out alpine-baselayout busybox musl
# Remove apk residuals. We have a read-only rootfs, so apk is of no use.
RUN rm -rf /out/etc/apk /out/lib/apk /out/var/cache
FROM scratch
ENTRYPOINT []
CMD []
WORKDIR /
COPY --from=build usermode-helper /sbin/
COPY --from=mirror /out/ /
COPY init /
COPY etc etc/
COPY bin bin/