diff --git a/templates/rhel8/common/base.dockerfile.j2 b/templates/rhel8/common/base.dockerfile.j2 index 0d5a8c52..36abc890 100644 --- a/templates/rhel8/common/base.dockerfile.j2 +++ b/templates/rhel8/common/base.dockerfile.j2 @@ -210,7 +210,7 @@ RUN rm /etc/rhsm-host && rpm -qa --qf "%{name}\n" > base_packages.txt && \ {%- else -%} RUN rpm -qa --qf "%{name}\n" > base_packages.txt && \ {%- endif %} - yum install -y ${LGPL_DEPS} && \ + yum update -y && yum install -y ${LGPL_DEPS} && \ ${INTEL_OPENVINO_DIR}/install_dependencies/install_openvino_dependencies.sh -y $INSTALL_PACKAGES && \ if [ "$INSTALL_SOURCES" = "yes" ]; then \ yum install -y yum-utils && \ diff --git a/templates/ubuntu20/common/base.dockerfile.j2 b/templates/ubuntu20/common/base.dockerfile.j2 index 79d5ebb9..416648d2 100644 --- a/templates/ubuntu20/common/base.dockerfile.j2 +++ b/templates/ubuntu20/common/base.dockerfile.j2 @@ -206,7 +206,7 @@ ARG INSTALL_PACKAGES="-c=python" {% endif %} # hadolint ignore=DL3008 -RUN apt-get update && \ +RUN apt-get update && apt-get upgrade -y && \ dpkg --get-selections | grep -v deinstall | awk '{print $1}' > base_packages.txt && \ apt-get install -y --no-install-recommends ${DEPS} && \ rm -rf /var/lib/apt/lists/* diff --git a/templates/ubuntu22/common/base.dockerfile.j2 b/templates/ubuntu22/common/base.dockerfile.j2 index 8e97db33..c14adb5b 100644 --- a/templates/ubuntu22/common/base.dockerfile.j2 +++ b/templates/ubuntu22/common/base.dockerfile.j2 @@ -203,7 +203,7 @@ ARG INSTALL_PACKAGES="-c=python" {% endif %} # hadolint ignore=DL3008 -RUN apt-get update && \ +RUN apt-get update && apt-get upgrade -y && \ dpkg --get-selections | grep -v deinstall | awk '{print $1}' > base_packages.txt && \ apt-get install -y --no-install-recommends ${DEPS} && \ rm -rf /var/lib/apt/lists/* diff --git a/templates/ubuntu24/common/base.dockerfile.j2 b/templates/ubuntu24/common/base.dockerfile.j2 index 0daf8817..831abb18 100644 --- a/templates/ubuntu24/common/base.dockerfile.j2 +++ b/templates/ubuntu24/common/base.dockerfile.j2 @@ -209,7 +209,7 @@ ARG INSTALL_PACKAGES="-c=python" {% endif %} # hadolint ignore=DL3008 -RUN apt-get update && \ +RUN apt-get update && apt-get upgrade -y && \ dpkg --get-selections | grep -v deinstall | awk '{print $1}' > base_packages.txt && \ apt-get install -y --no-install-recommends ${DEPS} && \ rm -rf /var/lib/apt/lists/*