tools/alpine: Add OVMF to the mirror and not the image

We add the 'ovmf' to the mirror instead of installing
it in the rootfs. This way we record the version we are
using.

We already pull a few images (go, tini) from community
so may as well pull ovmf directly via 'packages.x86_64'.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
This commit is contained in:
Rolf Neugebauer 2017-07-26 14:55:29 +01:00
parent 4ab25657d1
commit bf5a461ce5
3 changed files with 3 additions and 8 deletions

View File

@ -29,12 +29,6 @@ RUN apk index --rewrite-arch $(uname -m) -o /mirror/$(uname -m)/APKINDEX.unsigne
RUN cp /mirror/$(uname -m)/APKINDEX.unsigned.tar.gz /mirror/$(uname -m)/APKINDEX.tar.gz
RUN abuild-sign /mirror/$(uname -m)/APKINDEX.tar.gz
# fetch OVMF for qemu EFI boot (this is not added as a package)
RUN mkdir -p /usr/share/ovmf && \
if [ $(uname -m) = x86_64 ]; then \
apk add -X http://dl-cdn.alpinelinux.org/alpine/edge/community ovmf; \
fi
# set this as our repo but keep a copy of the upstream for downstream use
RUN mv /etc/apk/repositories /etc/apk/repositories.upstream && echo "/mirror" > /etc/apk/repositories && apk update
@ -53,7 +47,6 @@ COPY --from=mirror /etc/apk/repositories.upstream /etc/apk/repositories.upstream
COPY --from=mirror /etc/apk/keys /etc/apk/keys/
COPY --from=mirror /mirror /mirror/
COPY --from=mirror /go/bin /go/bin/
COPY --from=mirror /usr/share/ovmf/ /usr/share/ovmf/
COPY --from=mirror /Dockerfile /Dockerfile
RUN apk update && apk upgrade -a

View File

@ -1,2 +1,3 @@
open-vm-tools
ovmf
syslinux

View File

@ -1,4 +1,4 @@
# linuxkit/alpine:34af9cb1990debd17fae6d4198c62ce3910d9908
# linuxkit/alpine:77c8dfc5860012c869a19d7a2c68e701469692c8
# automatically generated list of installed packages
abuild-3.0.0_rc2-r8
alpine-baselayout-3.0.4-r0
@ -182,6 +182,7 @@ openssh-keygen-7.5_p1-r1
openssh-server-7.5_p1-r1
openssl-dev-1.0.2k-r0
opus-1.1.4-r0
ovmf-0.0.20161115-r1
p11-kit-0.23.2-r1
patch-2.7.5-r1
pax-utils-1.2.2-r0