fix: Set timezone to UTC and ensure tzdata support (#45483)

issue: https://github.com/milvus-io/milvus/issues/45473

Signed-off-by: zhenshan.cao <zhenshan.cao@zilliz.com>
This commit is contained in:
zhenshan.cao 2025-11-11 17:47:36 +08:00 committed by GitHub
parent 6a093887d8
commit 404797dd46
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
8 changed files with 32 additions and 8 deletions

View File

@ -16,7 +16,10 @@ ARG TARGETARCH
RUN apt-get update && apt-get install -y --no-install-recommends wget curl ca-certificates gnupg2 \ RUN apt-get update && apt-get install -y --no-install-recommends wget curl ca-certificates gnupg2 \
g++ gcc gdb gdbserver ninja-build git make ccache libssl-dev zlib1g-dev zip unzip \ g++ gcc gdb gdbserver ninja-build git make ccache libssl-dev zlib1g-dev zip unzip \
clang-format-12 clang-tidy-12 lcov libtool m4 autoconf automake python3 python3-pip \ clang-format-12 clang-tidy-12 lcov libtool m4 autoconf automake python3 python3-pip \
pkg-config uuid-dev libaio-dev libopenblas-dev tzdata && \ pkg-config uuid-dev libaio-dev libopenblas-dev && \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends tzdata && \
ln -sf /usr/share/zoneinfo/Etc/UTC /etc/localtime && \
echo "Etc/UTC" > /etc/timezone && \
apt-get remove --purge -y && \ apt-get remove --purge -y && \
rm -rf /var/lib/apt/lists/* rm -rf /var/lib/apt/lists/*

View File

@ -16,7 +16,10 @@ ARG TARGETARCH
RUN apt-get update && apt-get install -y --no-install-recommends wget curl ca-certificates gnupg2 \ RUN apt-get update && apt-get install -y --no-install-recommends wget curl ca-certificates gnupg2 \
g++ gcc gdb gdbserver ninja-build git make ccache libssl-dev zlib1g-dev zip unzip \ g++ gcc gdb gdbserver ninja-build git make ccache libssl-dev zlib1g-dev zip unzip \
clang-format-12 clang-tidy-12 lcov libtool m4 autoconf automake python3 python3-pip \ clang-format-12 clang-tidy-12 lcov libtool m4 autoconf automake python3 python3-pip \
pkg-config uuid-dev libaio-dev libopenblas-dev tzdata && \ pkg-config uuid-dev libaio-dev libopenblas-dev && \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends tzdata && \
ln -sf /usr/share/zoneinfo/Etc/UTC /etc/localtime && \
echo "Etc/UTC" > /etc/timezone && \
apt-get remove --purge -y && \ apt-get remove --purge -y && \
rm -rf /var/lib/apt/lists/* rm -rf /var/lib/apt/lists/*

View File

@ -18,7 +18,10 @@ RUN apt-get update && apt-get install -y --no-install-recommends wget curl ca-ce
apt-get update && apt-get install -y --no-install-recommends \ apt-get update && apt-get install -y --no-install-recommends \
g++ gcc gfortran git make ccache libssl-dev zlib1g-dev zip unzip \ g++ gcc gfortran git make ccache libssl-dev zlib1g-dev zip unzip \
clang-format-12 clang-tidy-12 lcov libtool m4 autoconf automake python3 python3-pip \ clang-format-12 clang-tidy-12 lcov libtool m4 autoconf automake python3 python3-pip \
pkg-config uuid-dev libaio-dev libgoogle-perftools-dev libopenblas-dev tzdata && \ pkg-config uuid-dev libaio-dev libgoogle-perftools-dev libopenblas-dev && \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends tzdata && \
ln -sf /usr/share/zoneinfo/Etc/UTC /etc/localtime && \
echo "Etc/UTC" > /etc/timezone && \
apt-get remove --purge -y && \ apt-get remove --purge -y && \
rm -rf /var/lib/apt/lists/* rm -rf /var/lib/apt/lists/*

View File

@ -7,7 +7,10 @@ RUN apt-get update && apt-get install -y --no-install-recommends wget curl ca-ce
apt-get update && apt-get install -y --no-install-recommends \ apt-get update && apt-get install -y --no-install-recommends \
g++ gcc gfortran git make ccache libssl-dev zlib1g-dev zip unzip \ g++ gcc gfortran git make ccache libssl-dev zlib1g-dev zip unzip \
clang-format-12 clang-tidy-12 lcov libtool m4 autoconf automake python3 python3-pip \ clang-format-12 clang-tidy-12 lcov libtool m4 autoconf automake python3 python3-pip \
pkg-config uuid-dev libaio-dev libgoogle-perftools-dev libopenblas-dev tzdata && \ pkg-config uuid-dev libaio-dev libgoogle-perftools-dev libopenblas-dev && \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends tzdata && \
ln -sf /usr/share/zoneinfo/Etc/UTC /etc/localtime && \
echo "Etc/UTC" > /etc/timezone && \
apt-get remove --purge -y && \ apt-get remove --purge -y && \
rm -rf /var/lib/apt/lists/* rm -rf /var/lib/apt/lists/*

View File

@ -20,7 +20,10 @@ FROM nvidia/cuda:11.8.0-runtime-ubuntu20.04
ENV TZ=UTC ENV TZ=UTC
RUN apt-get update && \ RUN apt-get update && \
apt-get install -y --no-install-recommends curl libtbb-dev gfortran netcat iputils-ping ca-certificates liblapack3 libzstd-dev uuid-dev libaio-dev libboost-program-options-dev libboost-filesystem-dev tzdata && \ apt-get install -y --no-install-recommends curl libtbb-dev gfortran netcat iputils-ping ca-certificates liblapack3 libzstd-dev uuid-dev libaio-dev libboost-program-options-dev libboost-filesystem-dev && \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends tzdata && \
ln -sf /usr/share/zoneinfo/Etc/UTC /etc/localtime && \
echo "Etc/UTC" > /etc/timezone && \
apt-get remove --purge -y && \ apt-get remove --purge -y && \
rm -rf /var/lib/apt/lists/* rm -rf /var/lib/apt/lists/*

View File

@ -7,7 +7,10 @@ RUN apt-get update && \
apt-get install -y --no-install-recommends ca-certificates && \ apt-get install -y --no-install-recommends ca-certificates && \
sed -i 's/http:/https:/g' /etc/apt/sources.list && \ sed -i 's/http:/https:/g' /etc/apt/sources.list && \
apt-get update && \ apt-get update && \
apt-get install -y --no-install-recommends curl libaio-dev libgomp1 libopenblas-dev tzdata && \ apt-get install -y --no-install-recommends curl libaio-dev libgomp1 libopenblas-dev && \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends tzdata && \
ln -sf /usr/share/zoneinfo/Etc/UTC /etc/localtime && \
echo "Etc/UTC" > /etc/timezone && \
apt-get remove --purge -y && \ apt-get remove --purge -y && \
rm -rf /var/lib/apt/lists/* rm -rf /var/lib/apt/lists/*

View File

@ -19,7 +19,10 @@ RUN apt-get update && \
apt-get install -y --no-install-recommends ca-certificates && \ apt-get install -y --no-install-recommends ca-certificates && \
sed -i 's/http:/https:/g' /etc/apt/sources.list && \ sed -i 's/http:/https:/g' /etc/apt/sources.list && \
apt-get update && \ apt-get update && \
apt-get install -y --no-install-recommends curl libaio-dev libgomp1 libopenblas-dev tzdata && \ apt-get install -y --no-install-recommends curl libaio-dev libgomp1 libopenblas-dev && \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends tzdata && \
ln -sf /usr/share/zoneinfo/Etc/UTC /etc/localtime && \
echo "Etc/UTC" > /etc/timezone && \
apt-get remove --purge -y && \ apt-get remove --purge -y && \
rm -rf /var/lib/apt/lists/* rm -rf /var/lib/apt/lists/*

View File

@ -19,7 +19,10 @@ RUN apt-get update && \
apt-get install -y --no-install-recommends ca-certificates && \ apt-get install -y --no-install-recommends ca-certificates && \
sed -i 's/http:/https:/g' /etc/apt/sources.list && \ sed -i 's/http:/https:/g' /etc/apt/sources.list && \
apt-get update && \ apt-get update && \
apt-get install -y --no-install-recommends curl libaio-dev libgomp1 libopenblas-dev tzdata && \ apt-get install -y --no-install-recommends curl libaio-dev libgomp1 libopenblas-dev && \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends tzdata && \
ln -sf /usr/share/zoneinfo/Etc/UTC /etc/localtime && \
echo "Etc/UTC" > /etc/timezone && \
apt-get remove --purge -y && \ apt-get remove --purge -y && \
rm -rf /var/lib/apt/lists/* rm -rf /var/lib/apt/lists/*