Simplify adopting `chisel` distroless base images (`static` / `base` / `cc`)
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 20/100
調査の方向性
chisel README のサンプルコマンドから始め、参照されている chiselled-python rockcraft.yaml と chisel-releases の slice 定義を確認します。static、base、cc スタイルのイメージを公開することが意図されているのか、それとも別の簡略化が意図されているのかを判断します。この issue は、そのスコープとサポートされるアプローチについて合意した後にのみ完了となります。
索引モデルが issue の本文から書いたものです。
説明
Summary:
Multiple Canonical/Ubuntu resources refer to minimal image sizes while comparing to Google distroless image size.
- There are no equivalent images presently published for use?
- Proper recreation requires more effort and technical confidence from the user. More verbose and fragile than some published rocks?
- No package/slice that could simplify creation? (along with an official
chiselimage published)
Are these intentionally not published for some reason? Or are there plans to simplify producing such?
In this Jan 2023 guide (prior to the Nov 2023 General Availability announcement), the first step is to build chisel. The 2nd step was then to use chisel to create a minimal image like the Google distroless ones offer.
Image from guide (click to view)
This page shows some comparisions to promote chisel, comparing to published rocks that are available on DockerHub for services and language runtimes, but this last one about a minimal equivalent image suitable for Go and Rust projects is nowhere to be found:
Images from online resources
https://ubuntu.com/containers/chiselled
https://ubuntu.com/blog/combining-distroless-and-ubuntu-chiselled-containers
https://canonical.com/blog/chiselled-ubuntu-ga
The benefits of that minimal base are shown above, and it's useful for projects that just need to have basic deps like glibc with /etc/passwd + /etc/group, and ca-certificates, possibly TZ data.
I don't recall from the various resources I came across, any explanation for why chiseled images are produced for some services and language runtimes, but not these minimal glibc / distroless base image referenced above?
The project README does seem to suggest getting chisel and demonstrating an example which is simple enough. But I'd assume that's not too different for the published images? (like this using this Python3.12 slice)
Recreating the Python rock with chisel
I think the Python image might look something like this?:
# `chisel` lacks the ability to create the `--root` dir for you when it doesn't exist:
mkdir /rootfs
# Produces 40MB output:
# - `ubuntu/python:3.12-24.04_stable` image appears to roughly match contents of these slices, but is 48MB in size.
# - Missing `pebble` binary (8MB) and the `/etc/{passwd,group,localtime}` files.
chisel cut --release ubuntu-24.04 --root /rootfs \
python3.12_standard \
tzdata_zoneinfo \
ca-certificates_data-with-certs \
openssl_config \
base-files_base
EDIT: I found the actual rockcraft.yaml used to build ubuntu/python:3.12-24.04_stable (it'd be nice if the DockerHub image README referenced that btw! I wasn't sure where or what the build source was for a while until I learned more about "rocks"). It seems I was reasonably close at guessing it's internals 😎 (this will be easier to derive once that manifest feature arrives I assume)
- While I didn't explicitly provide
lib6_libsorlibgcc_s-1like therockcraft.yamlhas explicitly, those are brought in from the dependency chain, similar to how therockcraft.yamlbrings intzdata_zoneinfofrom an implicit python dep. - Although the
rockcraft.yamlwas last modified Aug 7 where it's slice forca-certificates_datawas reverted upstream on Aug 12 to what wasca-certificates_data-with-certs. Thus building that rock at present will not match the current published image, and that's why I assumedca-certificates_data-with-certsbased on the content (no clue if the Python rock image actually requires the extra data from that slice).
- 主要言語
- Go
- スター
- 434
- フォーク
- 74
- 平均マージ
- 1日 30分
- マージ済み PR(30日)
- 1
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドなし
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
canonical/chisel のほかの issue
-
`mode` of a generated directory is random when it has a generated child対応中かも @Amadeus-22 が 24 日前に担当しました。 オープンBug
難易度 2/5 1〜3時間 初心者へのやさしさ 80/100
-
cut fails on uncompressed deb対応中かも @yuminn-k が 29 日前に担当しました。 オープンBug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 42/100
-
`prefer` drops a path when the preferred package lists it `until: mutate`対応中かも @18Abhinav07 が 8 日前に担当しました。 オープンBug
難易度 3/5 1〜2日 初心者へのやさしさ 72/100
-
難易度 4/5 3〜5日 初心者へのやさしさ 42/100
canonical/chisel の issue をすべて見る
似ている issue
-
mcpx scan: flag unsafe tool names対応中かも @zeyadbadawyy が今日担当しました。 オープンarea/scan enhancement good first issue priority/medium size/small
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
rohitgollarahalli/mcpx#45 · コメント 1 件 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
-
Mend: dependency security vulnerability
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
-
Windows 主机
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
Lee-xeo/Claude-Cage#1550 ·
メンテナーはふだん 1 日以内に返信
-
(bug) ui: spanPaint can index spans past their end (panic: index out of range)対応中かも @MaxMiksa が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 92/100
メンテナーはふだん 1 日以内に返信