You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
containertool: Arrange options into related groups (#128)
Motivation
----------
Arranging related options together in groups makes it easier for users
to find relevant options. This will be even more beneficial as more
options are added (e.g. #91).
Modifications
-------------
* Arrange `containertool`'s command line options into related groups
with headings.
* Update `build-container-image` manual page to match the new groupings.
Result
------
* Users will be able to find help for specific options more easily.
* Grouping options together may also help them to discover new options
related the tasks they are trying to achieve.
Test Plan
---------
* No functional change.
* All existing tests continue to pass.
---------
Co-authored-by: Joseph Heck <[email protected]>
@@ -17,22 +17,47 @@ Wrap a binary in a container image and publish it.
17
17
18
18
If `Package.swift` defines only one product, it will be selected by default.
19
19
20
+
### Source and destination repository options
21
+
20
22
- term `--default-registry <default-registry>`:
21
23
The default registry hostname. (default: `docker.io`)
22
24
23
25
If the repository path does not contain a registry hostname, the default registry will be prepended to it.
24
26
25
27
- term `--repository <repository>`:
26
-
The repository path.
28
+
Destination image repository.
27
29
28
-
If the path does not begin with a registry hostname, the default registry will be prepended to the path.
30
+
If the repository path does not begin with a registry hostname, the default registry will be prepended to the path.
31
+
The destination repository must be specified, either by setting the `--repository` option or the `CONTAINERTOOL_REPOSITORY` environment variable.
32
+
33
+
- term `--tag <tag>`:
34
+
The tag to apply to the destination image.
35
+
36
+
The `latest` tag is automatically updated to refer to the published image.
37
+
38
+
- term `--from <from>`:
39
+
Base image reference. (default: `swift:slim`)
40
+
41
+
### Image build options
29
42
30
43
- term `--resources <resources>`:
31
44
Add the file or directory at `resources` to the image.
32
45
Directories are added recursively.
33
46
34
47
If the `product` being packaged has a [resource bundle](https://developer.apple.com/documentation/xcode/bundling-resources-with-a-swift-package) it will be added to the image automatically.
35
48
49
+
### Image configuration options
50
+
51
+
- term `--architecture <architecture>`:
52
+
CPU architecture required to run the image.
53
+
54
+
If the base image is `scratch`, the final image will have no base layer and will consist only of the application layer and resource bundle layer, if the product has a resource bundle.
55
+
56
+
- term `--os <os>`:
57
+
Operating system required to run the image. (default: `linux`)
58
+
59
+
### Authentication options
60
+
36
61
- term `--default-username <username>`:
37
62
Default username to use when logging into the registry.
38
63
@@ -45,34 +70,20 @@ Wrap a binary in a container image and publish it.
45
70
This password is used if there is no matching `.netrc` entry for the registry, there is no `.netrc` file, or the `--disable-netrc` option is set.
46
71
The same password is used for the source and destination registries.
47
72
48
-
- term `-v, --verbose`:
49
-
Verbose output.
50
-
51
-
- term `--allow-insecure-http <allow-insecure-http>`:
52
-
Connect to the container registry using plaintext HTTP. (values: `source`, `destination`, `both`)
53
-
54
-
- term `--architecture <architecture>`:
55
-
CPU architecture to record in the image.
56
-
57
-
- term `--from <from>`:
58
-
Base image reference. (default: `swift:slim`)
59
-
60
-
If the base image is `scratch`, the final image will have no base layer and will consist only of the application layer and resource bundle layer, if the product has a resource bundle.
61
-
62
-
- term `--os <os>`:
63
-
Operating system to record in the image. (default: `linux`)
64
-
65
-
- term `--tag <tag>`:
66
-
Tag for this manifest.
67
-
68
-
The `latest` tag is automatically updated to refer to the published image.
69
-
70
73
- term `--enable-netrc/--disable-netrc`:
71
74
Load credentials from a netrc file (default: `--enable-netrc`)
72
75
73
76
- term `--netrc-file <netrc-file>`:
74
77
The path to the `.netrc` file.
75
78
79
+
- term `--allow-insecure-http <allow-insecure-http>`:
80
+
Connect to the container registry using plaintext HTTP. (values: `source`, `destination`, `both`)
81
+
82
+
### Options
83
+
84
+
- term `-v, --verbose`:
85
+
Verbose output.
86
+
76
87
- term `-h, --help`:
77
88
Show help information.
78
89
@@ -83,9 +94,10 @@ Wrap a binary in a container image and publish it.
83
94
(default: `docker.io`)
84
95
85
96
- term `CONTAINERTOOL_REPOSITORY`:
86
-
The repository path.
97
+
The destination image repository.
87
98
88
99
If the path does not begin with a registry hostname, the default registry will be prepended to the path.
100
+
The destination repository must be specified, either by setting the `--repository` option or the `CONTAINERTOOL_REPOSITORY` environment variable.
89
101
90
102
- term `CONTAINERTOOL_BASE_IMAGE`:
91
103
Base image on which to layer the application.
@@ -95,7 +107,7 @@ Wrap a binary in a container image and publish it.
95
107
CPU architecture.
96
108
97
109
- term `CONTAINERTOOL_OS`:
98
-
Operating system to encode in the container image.
0 commit comments