google / google/go-containerregistry

Feature Request: Allow `--empty-oci-base` with `crane mutate`

Open
#2,050 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
4k
Forks
686
Avg merge
2d 12h
Merged PRs (30d)
26

Description

**Description**
Currently creating an image with an empty OCI base and setting labels requires two separate commands: `crane append --oci-empty-base` followed by `crane mutate`. This can be streamlined by allowing the `--oci-empty-base` flag to be used directly with `crane mutate`.

**Current Workflow**

1. `crane append --oci-empty-base --new_layer image.tar --new_tag registry.example.com//:`
2. `crane mutate registry.example.com//: --label =....`

**Purposed Workflow**
1. `crane mutate --oci-empty-base --append image.tar registry.example.com//: --label =....`

I'm would like to contribute to this effort and have a working sample of crane mutate with the `--oci-empty-base` flag added.

**Benefits**
- reduced number of registry interactions
- reduced number of commands to produce an oci artifact

Contributor guide

Open the contributing guide

Research direction

Start with the crane mutate command entry point and compare it with crane append's existing --oci-empty-base workflow. Done means mutate accepts the empty-base option together with --append and produces the requested OCI artifact with labels in one command; add or run relevant CLI coverage if available.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
cli, devops
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.