[PATCH v4] erofs-utils: add OCI registry support
zhaoyifan (H)
zhaoyifan28 at huawei.com
Fri Aug 22 17:11:13 AEST 2025
On 2025/8/22 14:00, ChengyuZhu6 wrote:
> From: Chengyu Zhu <hudson at cyzhu.com>
>
> This patch adds support for building EROFS filesystems from
> OCI-compliant container registries, enabling users to create EROFS
> images directly from container images stored in registries like
> Docker Hub, Quay.io, etc.
>
> The implementation includes:
> - OCI remote backend with registry authentication support
> - Manifest parsing for Docker v2 and OCI v1 formats
> - Layer extraction and tar processing integration
> - Multi-platform image selection capability
> - Both anonymous and authenticated registry access
> - Comprehensive build system integration
>
> Configure: ./configure --enable-oci
> New mkfs.erofs option: --oci=registry/repo:tag[,options]
>
> Supported options:
> - platform=os/arch (default: linux/amd64)
> - layer=N (extract specific layer, default: all layers)
> - anonymous (use anonymous access)
> - username/password (basic authentication)
>
> e.g.:
> - mkfs.erofs \
> --oci=quay.io/chengyuzhu6/golang:1.22.8 \
> image.erofs /tmp/output
> - mkfs.erofs \
> --oci=quay.io/chengyuzhu6/golang:1.22.8,anonymous \
> image.erofs /tmp/output
> - mkfs.erofs \
> --oci=zcy1234/test-private,username=zcy1234,password=PASSWD \
> image.erofs /tmp/output
> - mkfs.erofs \
> --oci=quay.io/chengyuzhu6/golang:1.22.8,layer=1 \
> layer.erofs /tmp/output
> - mkfs.erofs \
> --oci=quay.io/chengyuzhu6/golang:1.22.8,platform=linux/arm64 \
> image.erofs /tmp/output
Hi Chengyu,
BTW, what does this `/tmp/output` do? I think this parameter is for
<src_path>
and would it be weird to have `/tmp/output` here since the datasource is
OCI registry?
Thanks,
Yifan Zhao
> Signed-off-by: Changzhi Xie <sa.z at qq.com>
> Signed-off-by: Chengyu Zhu <hudson at cyzhu.com>
>
More information about the Linux-erofs
mailing list