Skip to content

Include tzdata from updates on Debian images - #1422

Open
dbnicholson wants to merge 1 commit into
docker-library:masterfrom
dbnicholson:explicit-debian-tzdata
Open

dbnicholson wants to merge 1 commit into
docker-library:masterfrom
dbnicholson:explicit-debian-tzdata

Conversation

@dbnicholson

@dbnicholson dbnicholson commented Oct 27, 2026 •

Copy link
Copy Markdown

tzdata is always included in the base debian images using the version in the latest Debian point release. Those are made every few months for Debian stable, which means there could be intermediate tzdata releases that aren't included in the postgres image for quite a while.

Since updated timezone data is critical to postgres, always install it manually since this will use the version from the associated -updates repo. For example, building 18/trixie:

+ apt-get install -y --no-install-recommends gnupg less tzdata
...
The following packages will be upgraded:
  tzdata
...
Get:2 http://deb.debian.org/debian trixie-updates/main amd64 tzdata all 2026e-0+deb13u1 [266 kB]

Fixes #1421

tzdata is always included in the base debian images using the version in
the latest Debian point release. Those are made every few months for
Debian stable, which means there could be intermediate tzdata releases
that aren't included in the postgres image for quite a while.

Since updated timezone data is critical to postgres, always install it
manually since this will use the version from the associated -updates
repo. For example, building 18/trixie:

+ apt-get install -y --no-install-recommends gnupg less tzdata
...
The following packages will be upgraded:
  tzdata
...
Get:2 http://deb.debian.org/debian trixie-updates/main amd64 tzdata all 2026e-0+deb13u1 [266 kB]

Fixes docker-library#1421
@tianon

tianon commented Oct 27, 2026

Copy link
Copy Markdown
Member

This is going to be fixed via Debian rebuilds instead 👍

(#1421 (comment))

@dbnicholson

Copy link
Copy Markdown
Author

This is going to be fixed via Debian rebuilds instead 👍

(#1421 (comment))

It won't. As I said, the base debian image always includes tzdata package, and always from the trixie release. Watch:

$ podman pull docker.io/debian:trixie-slim
...
$ podman run -it --rm docker.io/debian:trixie-slim dpkg -l tzdata
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name           Version         Architecture Description
+++-==============-===============-============-=======================================
ii  tzdata         2026c-0+deb13u1 all          time zone and daylight-saving time data

And with a freshly build 18/trixie image without my changes:

$ podman build --pull -t pg18 18/trixie/
STEP 1/24: FROM debian:trixie-slim
Trying to pull docker.io/library/debian:trixie-slim...
...
$ podman run -it --rm pg18 dpkg -l tzdata
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name           Version         Architecture Description
+++-==============-===============-============-=======================================
ii  tzdata         2026c-0+deb13u1 all          time zone and daylight-saving time data

The rebuild will only pick up a new tzdata once the next Debian point releases are made. At that time, the packages from -updates are pulled into the main repo.

@dbnicholson

Copy link
Copy Markdown
Author

If tzdata wasn't Priority: required, it wouldn't be in the base debian image and it would be picked up as a transitive dependency of the postgresql-18 package. Then apt would pick the newer version from -updates.

@tianon

tianon commented Oct 27, 2026

Copy link
Copy Markdown
Member

It won't. As I said, the base debian image always includes tzdata package, and always from the trixie release.

... I personally wrote the code that will make it pull it in. 😅

https://github.com/debuerreotype/debuerreotype/blob/e63dab169190cd9403d77c6a87469fa0f153b659/examples/debian.sh#L265 in particular is the specific line which will pull it in.

@dbnicholson

Copy link
Copy Markdown
Author

This is going to be fixed via Debian rebuilds instead 👍

(#1421 (comment))

Oh, you mean you're going to rebuild the debian images. Does debuerrotype pull in from updates? It looks like yes from https://github.com/debuerreotype/docker-debian-artifacts/blob/dist-amd64/trixie/rootfs.manifest.

Well, I still think it would be good for the postgres image to not be dependent on when the base image gets rebuilt when tzdata updates are just sitting in proposed-updates.

@tianon

tianon commented Oct 27, 2026

Copy link
Copy Markdown
Member

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Include updated tzdata in debian images

2 participants