posit-dev / posit-dev/images-shared
Modify `bakery create image` and `guess_os_list` to produce directly buildable environments
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 2
- Forks
- 0
- Avg merge
- 4d 13h
- Merged PRs (30d)
- 22
Description
There is a gap between bakery create image and guess_os_list that causes newly created projects/images to not be immediately buildable.
bakery create image creates a template directory with one unsuffixed Containerfile.jinja2 image definition that is used to render Containerfile.min and Containerfile.std. Since guess_os_list assumes that it can guess the OS based off a Containerfile.<os>.<type> pattern, this out of the box template pattern causes any commands downstream of bakery create version to fail since build.<version>.os defaults to being blank.
It would be wise to at least place a warning for blank build.<version>.os list attributes since much of our image organizing, building, tagging, and labeling relies on that information. In addition to the warning, it would be ideal if bakery create image attempted to create a suffixed Containerfile.<os>.jinja2 file based on the given --base-image option value to avoid any downstream issues with guess_os_list. It may also be wise to turn any required usages of BuildOS attributes into optional uses to prevent failures.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the bakery create image and guess_os_list entry points, then inspect how build..os is populated and consumed. Done means newly created images are directly buildable, a blank OS list produces a warning, and downstream commands no longer fail because the template lacks an OS suffix.
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
- 35/100