Skip to content

Commit

Permalink
Upgrade base image from Debian Bullseye (oldstable) to Bookworm (stable)
Browse files Browse the repository at this point in the history
Avail ourselves of newer (though still not _new_ ;) software, in
particular the SQLite CLI.

The use of Bullseye's version number, 11, instead of its name in the
builder-build-platform image tripped me up at first, so I've switched it
over to Bookworm's name instead of number (12).

The cross-compilation of vcftools targeting arm64/aarch64 on amd64
requires pkg-config installed for the target platform with xx-apt-get.
Without it, the vcftool's configure script can't find zlib since its
using the build platform's pkg-config and zlib is not installed for the
build platform.  I'm not sure why this worked previously but not now.
  • Loading branch information
tsibley committed Sep 4, 2024
1 parent addb745 commit b7bc9b9
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ FROM --platform=$BUILDPLATFORM tonistiigi/xx AS xx
# Define a builder stage that runs on the build platform.
# Even if the target platform is different, instructions will run natively for
# faster compilation.
FROM --platform=$BUILDPLATFORM debian:11-slim AS builder-build-platform
FROM --platform=$BUILDPLATFORM debian:bookworm-slim AS builder-build-platform

SHELL ["/bin/bash", "-e", "-u", "-o", "pipefail", "-c"]

Expand Down Expand Up @@ -63,6 +63,7 @@ RUN xx-apt-get install -y \
gcc \
g++ \
libc6-dev \
pkg-config \
zlib1g-dev

# Add dependencies. All should be pinned to specific versions, except
Expand Down Expand Up @@ -224,7 +225,7 @@ RUN curl -fsSL https://ftp.ncbi.nlm.nih.gov/pub/datasets/command-line/v2/linux-$
# This is in place for Python programs which are not easy to install for a
# different target platform¹.
# ¹ https://github.com/pypa/pip/issues/5453
FROM --platform=$TARGETPLATFORM python:3.10-slim-bullseye AS builder-target-platform
FROM --platform=$TARGETPLATFORM python:3.10-slim-bookworm AS builder-target-platform

SHELL ["/bin/bash", "-e", "-u", "-o", "pipefail", "-c"]

Expand Down Expand Up @@ -350,7 +351,7 @@ RUN pip3 install evofr
# ———————————————————————————————————————————————————————————————————— #

# Now build the final image.
FROM python:3.10-slim-bullseye AS final
FROM python:3.10-slim-bookworm AS final

SHELL ["/bin/bash", "-e", "-u", "-o", "pipefail", "-c"]

Expand Down

0 comments on commit b7bc9b9

Please sign in to comment.