Skip to content

feat: containers overhaul#1049

Open
daler wants to merge 19 commits into
masterfrom
containers-overhaul
Open

feat: containers overhaul#1049
daler wants to merge 19 commits into
masterfrom
containers-overhaul

Conversation

@daler

@daler daler commented Jun 9, 2025

Copy link
Copy Markdown
Member

Previously, the various bioconda images were built in different places (bioconda-containers and bioconda-utils) using different methodologies and repeated-but-not-quite-the-same code.

This PR aims to consolidate all image building into a single location

The location is here in bioconda-utils because 1) images are tightly coupled to the bioconda-utils version, 2) it is much more straightforward to handle everything in the same GitHub Actions workflow rather than try to coordinate across repos, and 3) consolidating means we can actually capture the dependencies between images (in ways that were not actually being captured previously).

Here are the dependencies, for reference:

graph TD;
    base-busybox-->build-env;
    bioconda-utils-->build-env;
    build-env-->create-env;
    create-env-->bot;
    create-env-->A["final builds"];
    build-env-->A["final builds"];
    base-debian-->A["final builds"];
    bioconda-utils-->A["final builds"];
    style bioconda-utils fill:#f9f,stroke:#333,stroke-width:4px
Loading

See dockerfile inventory for some background on how the images are used. There are details on that page that will need to be updated once this is merged in and the containers are being used in production.

Briefly, this PR:

  • collects Dockerfiles from all relevant images, putting each into a directory in images
  • adds utility infrastructure like images/image_config.sh and images/build.sh to control the builds
  • adds a new .github/workflows/build-images.yml GHA workflow to orchestrate the building
  • removes earlier infrastructure for building the create-env image
  • makes some changes in bioconda-utils to support more flexible environment variable configuration

See images/README.md for details, including how to run locally.

This replaces #1046, #959, and #953 which had a LOT of troubleshooting; commits have been cleaned up and rebased into this this PR. Those other PRs attempted to encode the DAG in the GitHub Actions workflow and use caching in various ways for parallel builds. The problem was that it was too hard to keep all the moving parts in your head, especially returning to it after a while. I thought this complexity posed a risk to long-term maintenance burden. So this PR has all images created in the same GitHub Actions job, no clever caching or dependencies across GHA jobs. This has a time cost -- it takes about an hour to build everything -- but in practice these will not need to be rebuilt often.

The following is the proposed workflow for images, from PR through release-please. It includes thinking about which tags should get pushed when.

For example, a merge to master pushesmaster tagged manifests to quay.io. These are overwritten on each push to master. In this way, the :master tag sort of behaves like the latest tag conventionally does, but it only applies to the master branch. Note that we can't use the new release version number at this time because release-please has not been run (where it creates a new tag and release).

Then when release-please runs, it takes whatever existing manifest is tagged as master and creates two new tags: 1) a tag reflecting the bioconda-utils release and 2) latest.

So master will always refer to the latest images built on the master branch, and latest will always refer to the most recent release.

flowchart TD
a[Submit PR]-->|image building disabled?|b[test with *latest* quay.io images]
b-->m[merge to master]
a-->|default: image building enabled|c[build images locally]
c-->d[test with local images]
d-->m
m-->f[build images locally]
f-->g[test with local images]
g-->h[push manifests with *master* tag to quay.io]
h-->i[release please]
i-->j[tag *master* manifests as *latest* on quay.io]
i-->k[tag *master* manifests as *release version* on quay.io]
style i fill:#f9f,stroke:#333,stroke-width:4px
style m fill:#f9f,stroke:#333,stroke-width:4px
style a fill:#f9f,stroke:#333,stroke-width:4px
Loading

@daler daler changed the title Containers overhaul feat: containers overhaul Jun 9, 2025
daler and others added 4 commits June 14, 2025 17:40
The recipe `ligand-validation` was added with an empty `extra:` section
in meta.yaml. This will handle that situation without throwing an error
during the nightly ARM builds.
@daler daler force-pushed the containers-overhaul branch from d9b34c0 to b7104d2 Compare June 16, 2025 18:47
daler added 2 commits June 16, 2025 17:04
so that the `test` job can use build-images job as a dependency.
Otherwise, if build-images is skipped, test would be skipped.
@wjunLu

wjunLu commented Sep 8, 2025

Copy link
Copy Markdown
Contributor

@ALL!
May I ask when this PR will be merged? Our team are also interested in ARM biocontainers.

bioconda/bioconda-recipes#58943

@sachalau

sachalau commented May 4, 2026

Copy link
Copy Markdown

Hello, can I ask where does the overhaul of the container building stand at the moment?

@bgruening

Copy link
Copy Markdown
Member

We will start working on this after we have typed and upgraded the code base.

#1105

@sachalau

sachalau commented May 5, 2026

Copy link
Copy Markdown

Thanks a lot for the heads up !

bgruening pushed a commit that referenced this pull request May 28, 2026
Migrate images from bioconda-containers to bioconda-utils to bring new
bioconda-utils master more in line with #1049

#1049 migrates images from bioconda/bioconda-containers to
bioconda/bioconda-utils. Containers have been updated in
bioconda-containers since, so this contains the new versions of
bioconda-containers. After this is merged, bioconda-containers should be
archived

the env vars whose names #1049 changed were not used in any repo in
bioconda

since the containers and #1049 contain a lot of untested bash code, I
added bash linting and formatting and fixed some minor issues the linter
found

images from bioconda-containers have not been updated or built in a long
time, hence some fixes to things which broke in the meantime
- mamba errs out, switched to conda
- busybox cgit went down, switched to official GH mirror linked on
busybox.net
- switched to skopeo from quay REST api to circumvent strict quay REST
rate limits
- fix broken version parsing regex not liking new format

---------

Co-authored-by: benjamin <benjamin@stiffcoyote-e9263.denbi.prod>
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.

5 participants