apple / apple/swift-container-plugin

`build-container-image` help should include all the options supported by `containertool`

Open
#106 3 comments 0 reactions 0 assignees View on GitHub
area/documentation kind/enhancement semver/none
Dominant language
Swift
Stars
390
Forks
26
Avg merge
8m
Merged PRs (30d)
1

Description

The plugin help only reports arguments which are specific to the plugin and refers the reader to `containertool`. This is unhelpful because `containertool` is not the main interface for most users. The plugin's help text should describe all options.

```
% swift package build-container-image --help
Plugin ‘ContainerImageBuilder’ wants permission to allow all network connections on all ports.
Stated reason: “This command publishes images to container registries over the network”.
Allow this plugin to allow all network connections on all ports? (yes/no) yes
Building for debugging...
[1/1] Write swift-version-1AF32027EA501FB9.txt
Build of product 'containertool' complete! (3.26s)
USAGE: build-container-image

OPTIONS
--product Product to include in the image

Other arguments are passed to the containertool helper.
```

```
% swift run containertool --help
[1/1] Planning build
Building for debugging...
[1/1] Write swift-version-1AF32027EA501FB9.txt
Build of product 'containertool' complete! (3.36s)
OVERVIEW: Build and upload a container image

USAGE: containertool [] --repository

ARGUMENTS:
Executable to package

OPTIONS:
--default-registry
Default registry for references which do not specify a registry (default: docker.io)
--repository
Repository path
--resources Resource bundle directory
--username Username
--password Password
-v, --verbose Verbose output
--allow-insecure-http
Connect to the container registry using plaintext HTTP (values: source, destination, both)
--architecture
CPU architecture
--from Base image reference (default: swift:slim)
--os Operating system (default: linux)
--tag Tag for this manifest
--enable-netrc/--disable-netrc
Load credentials from a netrc file (default: --enable-netrc)
--netrc-file
Specify the netrc file path
-h, --help Show help information.
```
Ideally this would be possible without having to duplicate the help text.

Contributor guide

Open the contributing guide

Research direction

Start by comparing the `swift package build-container-image --help` and `swift run containertool --help` entry points shown in the issue, then trace where each command assembles its help output. Done means the plugin help exposes all supported `containertool` options without requiring users to consult the helper and avoids duplicating the help text where possible.

Written by the indexing model from the issue text.

Assessment

Tech stack
swift
Domain
cli
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.