feat: add ubuntu version-specific image tags#330
Conversation
f4ce623 to
890cfcf
Compare
890cfcf to
5d2743e
Compare
|
@johnstcn, do you have better ideas to do this? For images where we control the |
There is a set of tags we can reference here. We can't 100% rely on stability of those tags though (especially e.g. The source of the universal devcontainer is available here though... |
|
Yeah. That's a base image for the universal and then they add most tools via devcontainer features. I will adjust it to relay in base image tags. |
Define UBUNTU_VERSION in scripts/images.sh as a single source of truth.
Dockerfiles consume it via a build arg, and the push script reads the
same variable to generate version-specific tags. No runtime detection
or sidecar files needed.
Updated Dockerfiles to use ARG UBUNTU_VERSION:
- base, minimal: FROM ubuntu:${UBUNTU_VERSION}
- universal: FROM mcr.microsoft.com/devcontainers/universal:${UBUNTU_VERSION}
- Derivative images (golang, java, node, desktop) are unchanged since
they inherit from locally-built base/minimal images.
New tags pushed per image:
- ubuntu-{version} (e.g., ubuntu-noble)
- ubuntu-{version}-{date} (e.g., ubuntu-noble-20250101)
Existing tags (ubuntu, ubuntu-{date}, latest) are unchanged.
Closes #282
5d2743e to
a97ebec
Compare
|
Updated. Let me know what you think now. |
Summary
Adds Ubuntu version-specific image tags so users can pin to a specific Ubuntu release and avoid unexpected breakage when the base image changes.
Problem
The
:ubuntutag is rolling — it follows whatever Ubuntu version the Dockerfiles currently use. When we bump versions (e.g., 22.04 → 24.04), workspaces can break unexpectedly, as reported in #282.Approach
Define
UBUNTU_VERSIONonce inscripts/images.sh. Everything else reads that variable:ARG UBUNTU_VERSIONin theirFROMline--build-argNo runtime detection, no sidecar files, no
docker runat push time.Changes
scripts/images.sh— AddedUBUNTU_VERSION="noble"as the single source of truthimages/base/ubuntu.Dockerfile—FROM ubuntu:${UBUNTU_VERSION}images/minimal/ubuntu.Dockerfile—FROM ubuntu:${UBUNTU_VERSION}images/universal/ubuntu.Dockerfile—FROM mcr.microsoft.com/devcontainers/universal:${UBUNTU_VERSION}scripts/build_images.sh— Passes--build-arg UBUNTU_VERSIONscripts/push_images.sh— Pushesubuntu-{version}andubuntu-{version}-{date}tagsREADME.md— Tag reference tableCloses #282