alpine: stash the original /etc/apk/repositories for downstream use

If a user of linuxkit/alpine wants to produce an image with apk in it then it
is useful for them to have the original upstream repository list.

The new hash is linuxkit/alpine:3744607156e6b67e3e7d083b15be9e7722215e73

Signed-off-by: Ian Campbell <ijc@docker.com>
This commit is contained in:
Ian Campbell 2017-07-14 11:32:28 +01:00 committed by Rolf Neugebauer
parent 3ef5f27e49
commit 92e180c985

View File

@ -27,8 +27,8 @@ RUN abuild-sign /mirror/$(uname -m)/APKINDEX.tar.gz
# fetch OVMF for qemu EFI boot (this is not added as a package) # fetch OVMF for qemu EFI boot (this is not added as a package)
RUN apk add -X http://dl-cdn.alpinelinux.org/alpine/edge/community ovmf RUN apk add -X http://dl-cdn.alpinelinux.org/alpine/edge/community ovmf
# set this as our repo # set this as our repo but keep a copy of the upstream for downstream use
RUN echo "/mirror" > /etc/apk/repositories && apk update RUN mv /etc/apk/repositories /etc/apk/repositories.upstream && echo "/mirror" > /etc/apk/repositories && apk update
# add Go validation tools # add Go validation tools
COPY go-compile.sh /go/bin/ COPY go-compile.sh /go/bin/
@ -41,6 +41,7 @@ RUN go get -u github.com/LK4D4/vndr
FROM alpine:3.6 FROM alpine:3.6
COPY --from=mirror /etc/apk/repositories /etc/apk/repositories COPY --from=mirror /etc/apk/repositories /etc/apk/repositories
COPY --from=mirror /etc/apk/repositories.upstream /etc/apk/repositories.upstream
COPY --from=mirror /etc/apk/keys /etc/apk/keys/ COPY --from=mirror /etc/apk/keys /etc/apk/keys/
COPY --from=mirror /mirror /mirror/ COPY --from=mirror /mirror /mirror/
COPY --from=mirror /go/bin /go/bin/ COPY --from=mirror /go/bin /go/bin/