From 64f6b59a2ed0c13c5c566b445cea512115ca57ca Mon Sep 17 00:00:00 2001 From: Itxaka Date: Tue, 1 Oct 2024 10:58:38 +0200 Subject: [PATCH] Fix reading kairos-release Signed-off-by: Itxaka --- images/Dockerfile.kairos | 2 +- images/Dockerfile.kairos-alpine | 2 +- images/Dockerfile.kairos-debian | 2 +- images/Dockerfile.kairos-opensuse | 2 +- images/Dockerfile.kairos-rhel | 2 +- images/Dockerfile.kairos-ubuntu | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/images/Dockerfile.kairos b/images/Dockerfile.kairos index b1d1874ce..178ef1a1c 100644 --- a/images/Dockerfile.kairos +++ b/images/Dockerfile.kairos @@ -15,7 +15,7 @@ RUN rm -rf /etc/ssh/ssh_host_* COPY which-init.sh /usr/local/bin/which-init.sh RUN sed -i -n '/KAIROS_/!p' /etc/os-release -RUN sed -i -n '/KAIROS_/!p' /etc/kairos-release +RUN if [ -f "/etc/kairos-release" ]; then sed -i -n '/KAIROS_/!p' /etc/kairos-release; fi # need to be defined after FROM for them to be replaced in the RUN bellow ARG HOME_URL="https://github.com/kairos-io/kairos" diff --git a/images/Dockerfile.kairos-alpine b/images/Dockerfile.kairos-alpine index 53888e28f..7279142d3 100644 --- a/images/Dockerfile.kairos-alpine +++ b/images/Dockerfile.kairos-alpine @@ -165,7 +165,7 @@ RUN rm -rf /etc/ssh/ssh_host_* COPY which-init.sh /usr/local/bin/which-init.sh RUN sed -i -n '/KAIROS_/!p' /etc/os-release -RUN sed -i -n '/KAIROS_/!p' /etc/kairos-release +RUN if [ -f "/etc/kairos-release" ]; then sed -i -n '/KAIROS_/!p' /etc/kairos-release; fi # need to be defined after FROM for them to be replaced in the RUN bellow ARG HOME_URL="https://github.com/kairos-io/kairos" diff --git a/images/Dockerfile.kairos-debian b/images/Dockerfile.kairos-debian index 141b7fdda..2559d910e 100644 --- a/images/Dockerfile.kairos-debian +++ b/images/Dockerfile.kairos-debian @@ -179,7 +179,7 @@ RUN rm -rf /etc/ssh/ssh_host_* COPY which-init.sh /usr/local/bin/which-init.sh RUN sed -i -n '/KAIROS_/!p' /etc/os-release -RUN sed -i -n '/KAIROS_/!p' /etc/kairos-release +RUN if [ -f "/etc/kairos-release" ]; then sed -i -n '/KAIROS_/!p' /etc/kairos-release; fi # need to be defined after FROM for them to be replaced in the RUN bellow ARG HOME_URL="https://github.com/kairos-io/kairos" diff --git a/images/Dockerfile.kairos-opensuse b/images/Dockerfile.kairos-opensuse index 2f066b561..0f850a072 100644 --- a/images/Dockerfile.kairos-opensuse +++ b/images/Dockerfile.kairos-opensuse @@ -175,7 +175,7 @@ RUN rm -rf /etc/ssh/ssh_host_* COPY which-init.sh /usr/local/bin/which-init.sh RUN sed -i -n '/KAIROS_/!p' /etc/os-release -RUN sed -i -n '/KAIROS_/!p' /etc/kairos-release +RUN if [ -f "/etc/kairos-release" ]; then sed -i -n '/KAIROS_/!p' /etc/kairos-release; fi # need to be defined after FROM for them to be replaced in the RUN bellow ARG HOME_URL="https://github.com/kairos-io/kairos" diff --git a/images/Dockerfile.kairos-rhel b/images/Dockerfile.kairos-rhel index a8c78b096..7e0d8cbcb 100644 --- a/images/Dockerfile.kairos-rhel +++ b/images/Dockerfile.kairos-rhel @@ -114,7 +114,7 @@ RUN rm -rf /etc/ssh/ssh_host_* COPY which-init.sh /usr/local/bin/which-init.sh RUN sed -i -n '/KAIROS_/!p' /etc/os-release -RUN sed -i -n '/KAIROS_/!p' /etc/kairos-release +RUN if [ -f "/etc/kairos-release" ]; then sed -i -n '/KAIROS_/!p' /etc/kairos-release; fi # need to be defined after FROM for them to be replaced in the RUN bellow ARG HOME_URL="https://github.com/kairos-io/kairos" diff --git a/images/Dockerfile.kairos-ubuntu b/images/Dockerfile.kairos-ubuntu index 0210a8871..a36415196 100644 --- a/images/Dockerfile.kairos-ubuntu +++ b/images/Dockerfile.kairos-ubuntu @@ -380,7 +380,7 @@ RUN rm -rf /etc/ssh/ssh_host_* COPY which-init.sh /usr/local/bin/which-init.sh RUN sed -i -n '/KAIROS_/!p' /etc/os-release -RUN sed -i -n '/KAIROS_/!p' /etc/kairos-release +RUN if [ -f "/etc/kairos-release" ]; then sed -i -n '/KAIROS_/!p' /etc/kairos-release; fi # need to be defined after FROM for them to be replaced in the RUN bellow ARG HOME_URL="https://github.com/kairos-io/kairos"