Skip to content

Commit 696ec60

Browse files
committed
cherry-pick(#3336): fix(docker): upgrade base image packages during the build
1 parent ad6bc4b commit 696ec60

3 files changed

Lines changed: 6 additions & 0 deletions

File tree

‎utils/docker/Dockerfile.jammy‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ RUN --mount=type=secret,id=pipconf,target=/etc/pip.conf,required=false \
1515
find /etc/apt -type f \( -name '*.list' -o -name '*.sources' \) \
1616
-exec sed -i "s|http://archive.ubuntu.com|http://${UBUNTU_MIRROR_PREFIX}archive.ubuntu.com|g; s|http://ports.ubuntu.com|http://${UBUNTU_MIRROR_PREFIX}ports.ubuntu.com|g" {} + && \
1717
apt-get update && \
18+
# Pick up security fixes that the base image does not have yet.
19+
apt-get upgrade -y && \
1820
# Install Python
1921
apt-get install -y python3 python3-distutils curl && \
2022
update-alternatives --install /usr/bin/python python /usr/bin/python3 1 && \

‎utils/docker/Dockerfile.noble‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ RUN --mount=type=secret,id=pipconf,target=/etc/pip.conf,required=false \
1515
find /etc/apt -type f \( -name '*.list' -o -name '*.sources' \) \
1616
-exec sed -i "s|http://archive.ubuntu.com|http://${UBUNTU_MIRROR_PREFIX}archive.ubuntu.com|g; s|http://ports.ubuntu.com|http://${UBUNTU_MIRROR_PREFIX}ports.ubuntu.com|g" {} + && \
1717
apt-get update && \
18+
# Pick up security fixes that the base image does not have yet.
19+
apt-get upgrade -y && \
1820
# Install Python
1921
apt-get install -y python3 curl && \
2022
# Align with upstream Python image and don't be externally managed:

‎utils/docker/Dockerfile.resolute‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ RUN --mount=type=secret,id=pipconf,target=/etc/pip.conf,required=false \
1515
find /etc/apt -type f \( -name '*.list' -o -name '*.sources' \) \
1616
-exec sed -i "s|http://archive.ubuntu.com|http://${UBUNTU_MIRROR_PREFIX}archive.ubuntu.com|g; s|http://ports.ubuntu.com|http://${UBUNTU_MIRROR_PREFIX}ports.ubuntu.com|g" {} + && \
1717
apt-get update && \
18+
# Pick up security fixes that the base image does not have yet.
19+
apt-get upgrade -y && \
1820
# Install Python
1921
apt-get install -y python3 curl && \
2022
# Align with upstream Python image and don't be externally managed:

0 commit comments

Comments
 (0)