Use bookworm container images

This upgrades our base container image from bullseye to bookworm.

It also removes some backported packages that were only needed on
bullseye.

Change-Id: I4a009f9f0aaf096f172e3daef7419e6d0c691466
This commit is contained in:
James E. Blair 2023-08-24 10:32:48 -07:00
parent 77e2550326
commit 0927538043
2 changed files with 9 additions and 17 deletions

View File

@ -61,8 +61,8 @@
dependencies:
- opendev-buildset-registry
requires:
- python-builder-3.11-bullseye-container-image
- python-base-3.11-bullseye-container-image
- python-builder-3.11-bookworm-container-image
- python-base-3.11-bookworm-container-image
provides: nodepool-container-image
vars: &nodepool_image_vars
promote_container_image_method: intermediate-registry
@ -103,8 +103,8 @@
description: Build container images and upload.
timeout: *image_build_timeout
requires:
- python-builder-3.11-bullseye-container-image
- python-base-3.11-bullseye-container-image
- python-builder-3.11-bookworm-container-image
- python-base-3.11-bookworm-container-image
provides: nodepool-container-image
vars: *nodepool_image_vars
secrets:
@ -133,8 +133,8 @@
- zuul/nodepool
- openstack/diskimage-builder
requires:
- python-builder-3.11-bullseye-container-image
- python-base-3.11-bullseye-container-image
- python-builder-3.11-bookworm-container-image
- python-base-3.11-bookworm-container-image
provides: nodepool-siblings-container-image
vars:
zuul_work_dir: "{{ zuul.projects['opendev.org/zuul/nodepool'].src_dir }}"

View File

@ -13,14 +13,14 @@
# See the License for the specific language governing permissions and
# limitations under the License.
FROM docker.io/opendevorg/python-builder:3.11-bullseye as builder
FROM docker.io/opendevorg/python-builder:3.11-bookworm as builder
# ============================================================================
ARG ZUUL_SIBLINGS=""
COPY . /tmp/src
RUN assemble
FROM docker.io/opendevorg/python-base:3.11-bullseye as nodepool-base
FROM docker.io/opendevorg/python-base:3.11-bookworm as nodepool-base
# ============================================================================
COPY --from=builder /output/ /output
@ -56,19 +56,11 @@ RUN echo "nodepool ALL=(ALL) NOPASSWD:ALL" > /etc/sudoers.d/nodepool-sudo \
# * vhd-util is required to create .vhd images, mostly used in
# Rackspace. For full details see:
# https://docs.openstack.org/diskimage-builder/latest/developer/vhd_creation.html
#
# * debootstrap unmounts /proc in the container causing havoc when
# using -minimal elements on debuntu. Two unmerged fixes are in the bullseye version:
# https://salsa.debian.org/installer-team/debootstrap/-/merge_requests/26
# https://salsa.debian.org/installer-team/debootstrap/-/merge_requests/27
# are at least required. We also need a later version to support jammy. We
# grab from unstable for this reason.
COPY tools/openstack-ci-core-ppa.asc /etc/apt/trusted.gpg.d/
RUN \
echo "deb http://ppa.launchpad.net/openstack-ci-core/vhd-util/ubuntu focal main" >> /etc/apt/sources.list \
&& echo "deb http://deb.debian.org/debian bullseye-backports main" >> /etc/apt/sources.list \
&& apt-get update \
&& apt-get install -y \
binutils \
@ -85,7 +77,7 @@ RUN \
xz-utils \
zypper \
zstd \
debootstrap/bullseye-backports
debootstrap
# Podman install mainly for the "containerfile" elements of dib that
# build images from extracts of upstream containers.