Skip to content

Named Debian builds #980

Closed
Closed
@michaelk83

Description

@michaelk83

Overview

When building a LAMP stack, all of the other component images from docker-library are based on named Debian versions such as buster, bullseye, and bookworm, and can reuse the base OS layer between them. Only MySQL uses generic -debian tags, where it's not immediately clear which version is being used. Instead of easily setting all the components to the same base image, I have to manually check which OS version is used by MySQL, and then pick the correct tags for the other components.

Going forward, please consider named version tags for Debian, :bullseye, :bookworm, etc. So that in the future, I and others like me could simply pull e.g. mysql:bookworm, php:bookworm, and httpd:bookworm, and be sure that they all use the same OS base layer.

Debian vs Oracle

I saw that you've moved to Oracle Linux by default in #867, so I want to address your reasoning:

The Oracle Linux-based images:

  • "are smaller": This may be true if MySQL is deployed alone, but not when deployed as part of a stack. Reusing the same base OS layer in all of the images of the stack ultimately leads to a smaller total footprint than having to use 2 or more OSes because MySQL or some other component decide to be an oddball.
  • "support more architectures (arm64!)": Not true (anymore?). debian currently supports 8 architectures, including amd64 and arm64. oraclelinux supports only those two.
  • "are more supported/recommended by MySQL upstream": Can't really argue with that one, except to repeat that one has to consider MySQL as part of a wider deployment, and not just in isolation. I assume that Debian is still pretty well supported by MySQL.

I'm not asking that you revert your default OS decision, but please reconsider supporting named Debian versions in the future.

Sizes Comparison

I tried the following combinations on Kubuntu 20.04 using Podman 3.4.2 ("Listed Size" from podman images output):

Image                   Based On                Listed Size     Size On Disk
mysql:latest            oraclelinux:8-slim      579M             574M
php:8.2-fpm-bullseye    debian:11-slim          459M            +451M
httpd:bullseye          debian:11-slim          150M            + 64M

total:                                                          1089M
Image                   Based On                Listed Size     Size On Disk
mysql:latest            oraclelinux:8-slim      579M             574M
php:8.2-fpm-bullseye    debian:11-slim          459M            +451M
nginx:bullseye          debian:11-slim          147M            + 61M

total:                                                          1086M
Image                   Based On                Listed Size     Size On Disk
mysql:debian            debian:11-slim          608M             588M
php:8.2-fpm-bullseye    debian:11-slim          459M            +366M
httpd:bullseye          debian:11-slim          150M            + 64M

total:                                                          1018M
Image                   Based On                Listed Size     Size On Disk
mysql:debian            debian:11-slim          608M             588M
php:8.2-fpm-bullseye    debian:11-slim          459M            +366M
nginx:bullseye          debian:11-slim          147M            + 61M

total:                                                          1015M

Deployed alone, mysql:debian is indeed a bit larger, but only by 14M actual size on disk. But as part of a stack reusing the same base image, mysql:debian is ~70M smaller in total disk usage.

Btw, comparing mysql:debian to mysql:latest in Docker Hub, the size difference is actually in the packages and dependencies, not in the base image. The Debian base image is actually smaller.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions