Provide the stage3 file via ARGS

My distfiles path on my host does not match the one mounted into the container.
Symlinks are not followed by podman, AFAICT due to security concerns.
Using ARGS to change the path seems reasonable to me.
This commit is contained in:
Nils Freydank 2023-10-22 11:17:17 +02:00
parent 86f6d4e8c4
commit accf8c33e7
Signed by: nfr
GPG Key ID: 0F1DEAB2D36AD112
2 changed files with 4 additions and 2 deletions

View File

@ -7,7 +7,8 @@
FROM scratch as bootstrap FROM scratch as bootstrap
# Unpack the stage3 archive (which is downloaded and verifed externally). # Unpack the stage3 archive (which is downloaded and verifed externally).
ADD latest-stage3.tar.xz / ARG ROOTFS_FILENAME=""
ADD ${ROOTFS_FILENAME} /
# Set the profile. # Set the profile.
RUN eselect profile set "default/linux/amd64/17.1/no-multilib/systemd/merged-usr" RUN eselect profile set "default/linux/amd64/17.1/no-multilib/systemd/merged-usr"
# Replace /etc/portage/make.conf. # Replace /etc/portage/make.conf.

View File

@ -91,6 +91,7 @@ podman tag rm "${REGISTRY}:latest" # Do not exit_err here. At least on first run
# there is no latest tag to delete. # there is no latest tag to delete.
# === Build the new image. # === Build the new image.
podman build "${PODMAN_BUILD_ARGS[@]}" || exit_err "Build failed." podman build --build-arg=ROOTFS_FILENAME="${DISTFILES}/${ARCHIVE_FILE_NAME}" \
"${PODMAN_BUILD_ARGS[@]}" || exit_err "Build failed."
# vim:fileencoding=utf-8:ts=4:syntax=bash:expandtab # vim:fileencoding=utf-8:ts=4:syntax=bash:expandtab