36 lines · 1.1 KB · Dockerfile
RawDownload
# 1) use alpine to generate a void environmentFROM alpine:3.12 as stage0ARG REPOSITORY=https://alpha.de.repo.voidlinux.orgARG ARCH=x86_64COPY keys/* /target/var/db/xbps/keys/RUN apk add ca-certificates curl && \  curl ${REPOSITORY}/static/xbps-static-latest.$(uname -m)-musl.tar.xz | \    tar Jx && \  XBPS_ARCH=${ARCH} xbps-install.static -yMU \    --repository=${REPOSITORY}/current \    --repository=${REPOSITORY}/current/musl \    -r /target \    base-minimal # 2) using void to generate the final buildFROM scratch as stage1ARG REPOSITORY=https://alpha.de.repo.voidlinux.orgARG ARCH=x86_64ARG BASEPKG=base-minimalCOPY --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}/current \    --repository=${REPOSITORY}/current/musl \    -r /target \    ${BASEPKG} # 3) configure and clean up the final imageFROM scratchCOPY --from=stage1 /target /RUN xbps-reconfigure -a && \  rm -r /var/cache/xbps CMD ["/bin/sh"]

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t