From a9552aee2ddd579b60d66e105578a1d187c5ea6a Mon Sep 17 00:00:00 2001 From: Rolf Neugebauer Date: Tue, 24 Jul 2018 21:48:40 +0100 Subject: [PATCH] tools: Fix mkimage-squashfs Us a scratch image as the base instead of the alpine base image. Signed-off-by: Rolf Neugebauer --- tools/mkimage-squashfs/Dockerfile | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/tools/mkimage-squashfs/Dockerfile b/tools/mkimage-squashfs/Dockerfile index 3b8285ff4..74161ebbb 100644 --- a/tools/mkimage-squashfs/Dockerfile +++ b/tools/mkimage-squashfs/Dockerfile @@ -1,12 +1,15 @@ -FROM linuxkit/alpine:daed76b8f1d28cdeeee215a95b9671c682a405dc - -RUN \ - apk update && apk upgrade && \ - apk add --no-cache \ +FROM linuxkit/alpine:daed76b8f1d28cdeeee215a95b9671c682a405dc 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 \ libarchive-tools \ squashfs-tools \ && true +RUN mv /out/etc/apk/repositories.upstream /out/etc/apk/repositories +FROM scratch +WORKDIR / +COPY --from=mirror /out/ / COPY . . - ENTRYPOINT [ "/make-squashfs" ]