canonical / rockcraft

Tool to create OCI Images using the language from Snapcraft and Charmcraft.
GNU General Public License v3.0
35 stars 43 forks source link

Base does not include Python #219

Closed jardon closed 1 year ago

jardon commented 1 year ago

The rockcraft base image for ubuntu:22.04 was moved to a different set of images that do not seem to include all the same packages that the old images did. What packages should be expected to be included in the base image?

As it stands, the current image that rockcraft pulls does not even include a python interpreter. Can I get some clarity on what should be guaranteed here?

cjdcordeiro commented 1 year ago

Hi,

the base Ubuntu images are not (and should never have been) shipped with Python. The change of registry pointed out in https://github.com/canonical/rockcraft/commit/380103831fe1f8b496b4dad29453aa7b3303dbb0 is merely getting the same Ubuntu base from a different registry. There is just one source and CI/CD pipeline for all Ubuntu base container images in all registries: https://code.launchpad.net/~cloud-images-release-managers/cloud-images/+oci/ubuntu-base/+git/ubuntu-base

One can see the history of Jammy images from here: https://hub.docker.com/_/ubuntu/tags?page=1&name=jammy-20

Adding Python to the Ubuntu base image would've exploded its size.

So maybe the issue is coming from somewhere else? Do you have a rockcraft.yaml that used to work and doesn't work anymore? If so, can you share it as well as the date of it last success (so that we can pinpoint that Ubuntu base images for reproducibility)

tigarmo commented 1 year ago

I was the one that misled @jardon that the registry change was the culprit, my bad! The odd thing is that I also have a fairly strong memory of Python being present in the base Ubuntu image a few months ago. I'm looking at my old images now and apparently it was a hallucination; all images that have Python had it added by rockcraft itself (from one of the parts). Very weird Mandela effect

cjdcordeiro commented 1 year ago

:stuck_out_tongue_closed_eyes:

I wasn't ruling out that being the case. The ubuntu base images are built automatically with a minimal seed and from whatever is upstream. So a package could've (unlikely) been added without us noticing. But just by looking at the history of image sizes, their std deviation is negligible which means Python wouldn't be there by default.

@jardon I'm closing this but please feel free to re-open if you can reproduce an older build successfully.