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"