From 3af14ee4b7f40db3765cfb8b85f0767b0d7f7681 Mon Sep 17 00:00:00 2001 From: "Jason N." <33561705+JasonN3@users.noreply.github.com> Date: Thu, 7 Mar 2024 12:14:04 -0500 Subject: [PATCH] only link if the paths exist --- Containerfile | 1 - entrypoint.sh | 10 ++++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/Containerfile b/Containerfile index 8504616..3551d21 100644 --- a/Containerfile +++ b/Containerfile @@ -19,7 +19,6 @@ VOLUME /build-container-installer/repos VOLUME /cache RUN dnf install -y make && make install-deps -RUN ln -s /cache/skopeo /build-container-installer/container && mkdir /cache/dnf ENTRYPOINT ["/bin/bash", "/build-container-installer/entrypoint.sh"] diff --git a/entrypoint.sh b/entrypoint.sh index fe7a883..a984445 100644 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -7,6 +7,16 @@ do export $entry done +if [[ -d /cache/skopeo ]] +then + ln -s /cache/skopeo /build-container-installer/container +fi + +if [[ ! -d /cache/dnf ]] +then + mkdir /cache/dnf +fi + # Pull container make container/${IMAGE_NAME}-${IMAGE_TAG} $@