From daa67d18579024947d69a45e6d028c5adb1c8c23 Mon Sep 17 00:00:00 2001 From: Justin Kromlinger Date: Mon, 2 Nov 2020 19:30:07 +0100 Subject: [PATCH] Switch to alpine in verify stage This fixes a circular dependency issue noted in [1]. `curl -s` and removal of `--auto-compress` are needed because of differences in the binaries in alpine. [1] https://github.com/docker-library/official-images/pull/8999#issuecomment-720622797 --- Dockerfile.template | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Dockerfile.template b/Dockerfile.template index ad79c50..f97ec55 100644 --- a/Dockerfile.template +++ b/Dockerfile.template @@ -8,13 +8,14 @@ # The second stage is for actually configuring the system a little bit. # Some templating is done in order to allow us to easily build different configurations and to # allow us to automate the releaes process. -FROM archlinux:latest AS verify +FROM alpine:3.12 AS verify COPY TEMPLATE_ROOTFS_FILE / +RUN apk update && apk add curl bash SHELL ["/bin/bash", "-c"] -RUN ROOTFS="$(curl -OJL --continue-at - -w "%{filename_effective}" TEMPLATE_ROOTFS_URL)" && \ +RUN ROOTFS="$(curl -sOJL --continue-at - -w "%{filename_effective}" TEMPLATE_ROOTFS_URL)" && \ sha256sum -c <<< "TEMPLATE_ROOTFS_HASH" && \ mkdir /rootfs && \ - tar -C /rootfs --extract --auto-compress --file "${ROOTFS}" + tar -C /rootfs --extract --file "${ROOTFS}" FROM scratch AS root COPY --from=verify /rootfs/ /