Don't export the dom0 rootfs to the host, use COPY --from to import it
directly from the previous build container.
Signed-off-by: Stefano Stabellini <sstabellini@kernel.org>
then
docker build -f dom0/alpine-assemble -t $DOM0_LABEL .
fi
-if ! test -f mkimage/"$DOM0_LABEL".tar
-then
- # This is a workaround: find a better way
- docker run $DOM0_LABEL /root/sleep &
- sleep 1
- container_id=`docker ps | grep $DOM0_LABEL | cut -f 1 -d " "`
- docker export $container_id > out/"$DOM0_LABEL".tar
- docker kill $container_id
-fi
+# Create final image
exists=`docker images $IMAGE_BUILD_LABEL | grep $IMAGE_BUILD_LABEL`
if test -z "$exists"
then
# Create system image
if ! test -f out/image
then
+ mkdir -p out &>/dev/null
docker run --privileged -i $IMAGE_BUILD_LABEL /make-efi > out/image
fi
# QEMU run deps
apk add glib pixman libcap libattr
-
-ADD dom0/sleep /root
-
ENTRYPOINT ["/bin/sh"]
FROM alpine AS grub-build
-ADD out/dom0.tar /root
-
RUN apk update && apk add \
automake \
make \
ENV GRUB_COMMIT=6782f6d431d22b4e9ab14e94d263795c7991e160
COPY mkimage/patches/* /patches/
+COPY --from=dom0 / /root
+
RUN mkdir /grub-lib && \
set -e && \
git clone https://github.com/coreos/grub.git && \