mirror of
https://gitlab.archlinux.org/archlinux/archlinux-docker.git
synced 2025-08-07 06:37:23 +02:00
Use ./exclude mechanism for /etc/resolv.conf
This commit is contained in:
parent
f114a6d454
commit
ecb01053cc
@ -4,8 +4,7 @@ SHELL ["/bin/bash", "-c"]
|
|||||||
RUN ROOTFS="$(curl --continue-at - --remote-name --write-out "%{filename_effective}" TEMPLATE_ROOTFS_URL)" && \
|
RUN ROOTFS="$(curl --continue-at - --remote-name --write-out "%{filename_effective}" TEMPLATE_ROOTFS_URL)" && \
|
||||||
sha256sum -c <<< "TEMPLATE_ROOTFS_HASH" && \
|
sha256sum -c <<< "TEMPLATE_ROOTFS_HASH" && \
|
||||||
mkdir /rootfs && \
|
mkdir /rootfs && \
|
||||||
# Fix kaniko DNS problems as kaniko uses the current layer's resolv.conf. \
|
tar -C /rootfs --extract --auto-compress --file "${ROOTFS}"
|
||||||
tar -C /rootfs --extract --auto-compress --exclude=./etc/resolv.conf --file "${ROOTFS}"
|
|
||||||
|
|
||||||
FROM scratch AS base
|
FROM scratch AS base
|
||||||
COPY --from=verify /rootfs/ /
|
COPY --from=verify /rootfs/ /
|
||||||
|
3
exclude
3
exclude
@ -5,6 +5,7 @@
|
|||||||
./dev
|
./dev
|
||||||
./etc/hostname
|
./etc/hostname
|
||||||
./etc/machine-id
|
./etc/machine-id
|
||||||
|
./etc/resolv.conf
|
||||||
./etc/pacman.d/gnupg/openpgp-revocs.d/*
|
./etc/pacman.d/gnupg/openpgp-revocs.d/*
|
||||||
./etc/pacman.d/gnupg/private-keys-v1.d/*
|
./etc/pacman.d/gnupg/private-keys-v1.d/*
|
||||||
./etc/pacman.d/gnupg/pubring.gpg~
|
./etc/pacman.d/gnupg/pubring.gpg~
|
||||||
@ -13,4 +14,4 @@
|
|||||||
./tmp/*
|
./tmp/*
|
||||||
./var/cache/pacman/pkg/*
|
./var/cache/pacman/pkg/*
|
||||||
./var/lib/pacman/sync/*
|
./var/lib/pacman/sync/*
|
||||||
./var/tmp/*
|
./var/tmp/*
|
||||||
|
Loading…
Reference in New Issue
Block a user