Support building ethereal masterdirs

This commit is contained in:
Michael Aldridge
2019-03-24 20:42:51 -07:00
parent 1b0964cc82
commit ba7f0e9475
2 changed files with 41 additions and 28 deletions

View File

@@ -1,30 +1,31 @@
# 1) use alpine to generate a void environment
FROM alpine:3.9 as stage0
ARG REPOSITORY=https://alpha.de.repo.voidlinux.org/current
ARG REPOSITORY=https://alpha.de.repo.voidlinux.org
ARG ARCH=x86_64
COPY keys/* /target/var/db/xbps/keys/
RUN apk add ca-certificates && \
wget -O - https://alpha.de.repo.voidlinux.org/static/xbps-static-latest.$(uname -m)-musl.tar.xz | \
wget -O - ${REPOSITORY}/static/xbps-static-latest.$(uname -m)-musl.tar.xz | \
tar Jx && \
XBPS_ARCH=${ARCH} xbps-install.static -yMU \
--repository=${REPOSITORY} \
--repository=${REPOSITORY}/musl \
--repository=${REPOSITORY}/current \
--repository=${REPOSITORY}/current/musl \
-r /target \
base-minimal
# 2) using void to generate the final build
FROM scratch as stage1
ARG REPOSITORY=https://alpha.de.repo.voidlinux.org/current
ARG REPOSITORY=https://alpha.de.repo.voidlinux.org
ARG ARCH=x86_64
ARG BASEPKG=base-minimal
COPY --from=stage0 /target /
COPY keys/* /target/var/db/xbps/keys/
RUN xbps-reconfigure -a && \
mkdir -p /target/var/cache && ln -s /var/cache/xbps /target/var/cache/xbps && \
XBPS_ARCH=${ARCH} xbps-install -yMU \
--repository=${REPOSITORY} \
--repository=${REPOSITORY}/musl \
--repository=${REPOSITORY}/current \
--repository=${REPOSITORY}/current/musl \
-r /target \
base-minimal
${BASEPKG}
# 3) configure and clean up the final image
FROM scratch