posit-dev / posit-dev/images-shared

Support OS-less images in Bakery

Open
#386 0 comments 0 reactions 0 assignees View on GitHub

@bschwedler is already working on this.

Since Jun 9, 2026.

  • #578 by @bschwedler — open
cvp:1 docker tdp:1
Dominant language
Python
Stars
2
Forks
0
Avg merge
4d 13h
Merged PRs (30d)
22

Description

Problem

Bakery requires every image version to have at least one OS entry with non-empty extension and tagDisplayName fields. Both fields enforce regex patterns that require at least one character (^[a-zA-Z0-9_-]+$ and ^[a-zA-Z0-9_.-]+$), making empty strings invalid.

This prevents building images that don't need an OS, such as:

  • Init containers based on scratch that only copy static files
  • Utility images with statically-linked Go binaries
  • Any image where the final stage is FROM scratch

Context

The workbench-session-init image was recently refactored to use FROM scratch since it only contains pre-built static binaries from the rsp-session-multi tarball. The builder stage uses Ubuntu to download and extract the tarball, but the final image has no OS. Despite this, Bakery still requires an OS entry (Ubuntu 24.04), resulting in misleading tags like workbench-session-init:2026.01.1-ubuntu-24.04 for an image that contains no Ubuntu.

Relevant code: posit_bakery/config/shared.py lines 14-34 define ExtensionField and TagDisplayNameField with patterns that reject empty strings.

Proposed solution

Allow OS extension and tagDisplayName to be empty strings (or omitted entirely) so that:

  • The Containerfile has no OS suffix (e.g., just Containerfile.jinja2)
  • Tags omit the OS component (e.g., workbench-session-init:2026.01.1 with no -ubuntu-24.04 suffix)

This could be implemented by:

  1. Making the regex patterns accept empty strings: ^[a-zA-Z0-9_.-]*$
  2. Or adding a new OS-less image mode that skips OS-related naming entirely

References

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with posit_bakery/config/shared.py lines 14-34, then inspect the linked PR #41 and the open pull request for the current implementation direction. Verify that OS-less images can use empty or omitted OS fields, produce a Containerfile without an OS suffix, and generate tags without an OS component.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, python
Domain
build-system, devops
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.