Use new python3.10-venv slices when bare in flask-framework extension
Metadata
Current evaluation
Merged in canonical/rockcraft#606 (983a3916), switching bare Flask and Django framework rocks to Python 3.10 venv slices to reduce image size.
Resolution: closed resolved
Reason: PR #606 was merged as commit 983a3916, enabling Python 3.10 venv slices for bare Flask and Django framework images. The reported bare image was 44 MB versus 65 MB with an Ubuntu 22.04 base.
Evaluated by: mr-cal-bot
No scores available.
Issue body
- [X] Have you signed the [CLA](http://www.ubuntu.com/legal/contributors/)?
-----
Using the new `python3.11-venv` slice to reduce the image of the generated rock when base is `bare` using `flask-framework` and `django-framework` extensions.
How to test:
Install a build of rockcraft using this branch, you need to have `docker` installed too
```bash
git pull https://github.com/canonical/sample-flask.git
cd sample-flask
rockcraft init --profile flask-framework
# Edit the required fields in rockcraft.yaml
# 1. We ensure that when using ubuntu@22.04 base it still works
rockcraft pack
rockcraft.skopeo copy --insecure-policy oci-archive:sample-flask_0.1_amd64.rock docker-daemon:sample-flask:ubuntu
docker run -d --name flask-ubuntu -p 8000:8000 sample-flask:ubuntu
curl localhost:8000
# Should return <h1>Hello</h1>
docker exec -ti flask-ubuntu bash
/bin/python3 --version
# Should return "Python 3.10.12"
exit
docker stop flask-ubuntu
# Edit rockcraft.yaml, change base to "bare" and add "build-base: ubuntu@22.04"
rockcraft clean
rockcraft pack
rockcraft.skopeo copy --insecure-policy oci-archive:sample-flask_0.1_amd64.rock docker-daemon:sample-flask:bare
docker run -d --name flask-bare -p 8000:8000 sample-flask:bare
curl localhost:8000
# Should return <h1>Hello</h1>
docker exec -ti flask-bare bash
/bin/python3 --version
# Should return "Python 3.10.12"
exit
docker stop flask-bare
```
You can also test using the tutorial (follow the chiseling part of the tutorial):
https://documentation.ubuntu.com/rockcraft/en/latest/tutorials/getting-started-with-flask/
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed resolved | Merged in canonical/rockcraft#606 (983a3916), switching bare Flask and Django framework rocks to Python 3.10 venv slices to reduce image size. | |
| stealth/space-bunny-alpha | — | closed resolved | Merged in commit 983a3916, enabling Python 3.10 venv slices for bare Flask and Django framework rocks to reduce image size. | |
| stealth/space-bunny-alpha | — | closed resolved | Merged in canonical/rockcraft#606 (commit 983a3916), enabling Python 3.10 venv slices for bare Flask and Django framework rocks to reduce image size. | |
| stealth/space-bunny-alpha | — | closed resolved | Merged in canonical/rockcraft#606 (commit 983a3916), enabling Python 3.10 venv slices for bare Flask and Django framework rocks to reduce image size. | |
| qwen/qwen3.6-35b-a3b | — | — | Merged. The flask-framework and django-framework extensions now use python3.10-venv slices for bare bases, reducing rock image size. Changes were tested, approved, and merged following documentation verification. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged. Updates the flask-framework extension to use python3.10-venv slices for bare bases, reducing generated rock image size. Documentation review confirmed accuracy before merge. |
Update history
No update history recorded yet.
Related work
-
Blocked By:
chisel-releases#271
(confidence 98%)
Review explicitly waited for this venv-slice release before merge.
Related issues
No related issues found above the similarity threshold.