-
-
Notifications
You must be signed in to change notification settings - Fork 19
Expand file tree
/
Copy pathBuildahBuildOptions.Generated.cs
More file actions
597 lines (497 loc) · 21.4 KB
/
BuildahBuildOptions.Generated.cs
File metadata and controls
597 lines (497 loc) · 21.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
// <auto-generated>
// This file was generated by ModularPipelines.OptionsGenerator.
// Do not edit this file manually.
// </auto-generated>
#nullable enable
using System.CodeDom.Compiler;
using System.Diagnostics.CodeAnalysis;
using ModularPipelines.Attributes;
using ModularPipelines.Buildah.Options;
namespace ModularPipelines.Buildah.Options;
/// <summary>
/// Builds an OCI image using instructions in one or more Containerfiles.
/// </summary>
[GeneratedCode("ModularPipelines.OptionsGenerator", "")]
[ExcludeFromCodeCoverage]
[CliSubCommand("build")]
public record BuildahBuildOptions : BuildahOptions
{
/// <summary>
/// add a custom host-to-IP mapping (host:ip) (default [])
/// </summary>
[CliOption("--add-host", Format = OptionFormat.EqualsSeparated)]
public string? AddHost { get; set; }
/// <summary>
/// attempt to build for all base image platforms
/// </summary>
[CliFlag("--all-platforms")]
public bool? AllPlatforms { get; set; }
/// <summary>
/// set metadata for an image (default [])
/// </summary>
[CliOption("--annotation", Format = OptionFormat.EqualsSeparated, AllowMultiple = true)]
public IEnumerable<string>? Annotation { get; set; }
/// <summary>
/// set the ARCH of the image to the provided value instead of the architecture of the host (default "amd64")
/// </summary>
[CliOption("--arch", Format = OptionFormat.EqualsSeparated)]
public string? Arch { get; set; }
/// <summary>
/// path of the authentication file.
/// </summary>
[CliOption("--authfile", Format = OptionFormat.EqualsSeparated)]
public string? Authfile { get; set; }
/// <summary>
/// argument=value to supply to the builder
/// </summary>
[CliOption("--build-arg", Format = OptionFormat.EqualsSeparated)]
public string? BuildArg { get; set; }
/// <summary>
/// argfile.conf containing lines of argument=value to supply to the builder
/// </summary>
[CliOption("--build-arg-file", Format = OptionFormat.EqualsSeparated)]
public string? BuildArgFile { get; set; }
/// <summary>
/// argument=value to supply additional build context to the builder
/// </summary>
[CliOption("--build-context", Format = OptionFormat.EqualsSeparated)]
public string? BuildContext { get; set; }
/// <summary>
/// remote repository list to utilise as potential cache source.
/// </summary>
[CliOption("--cache-from", Format = OptionFormat.EqualsSeparated, AllowMultiple = true)]
public IEnumerable<string>? CacheFrom { get; set; }
/// <summary>
/// remote repository list to utilise as potential cache destination.
/// </summary>
[CliOption("--cache-to", Format = OptionFormat.EqualsSeparated, AllowMultiple = true)]
public IEnumerable<string>? CacheTo { get; set; }
/// <summary>
/// only consider cache images under specified duration.
/// </summary>
[CliOption("--cache-ttl", Format = OptionFormat.EqualsSeparated)]
public string? CacheTtl { get; set; }
/// <summary>
/// add the specified capability when running (default [])
/// </summary>
[CliOption("--cap-add", Format = OptionFormat.EqualsSeparated, AllowMultiple = true)]
public IEnumerable<string>? CapAdd { get; set; }
/// <summary>
/// drop the specified capability when running (default [])
/// </summary>
[CliOption("--cap-drop", Format = OptionFormat.EqualsSeparated, AllowMultiple = true)]
public IEnumerable<string>? CapDrop { get; set; }
/// <summary>
/// use certificates at the specified path to access the registry
/// </summary>
[CliOption("--cert-dir", Format = OptionFormat.EqualsSeparated)]
public string? CertDir { get; set; }
/// <summary>
/// optional parent cgroup for the container
/// </summary>
[CliOption("--cgroup-parent", Format = OptionFormat.EqualsSeparated)]
public string? CgroupParent { get; set; }
/// <summary>
/// 'private', or 'host'
/// </summary>
[CliOption("--cgroupns", Format = OptionFormat.EqualsSeparated)]
public string? Cgroupns { get; set; }
/// <summary>
/// this is a legacy option, which has no effect on the image
/// </summary>
[CliFlag("--compress")]
public bool? Compress { get; set; }
/// <summary>
/// set additional flag to pass to C preprocessor (cpp)
/// </summary>
[CliOption("--cpp-flag", Format = OptionFormat.EqualsSeparated, AllowMultiple = true)]
public IEnumerable<string>? CppFlag { get; set; }
/// <summary>
/// limit the CPU CFS (Completely Fair Scheduler) period
/// </summary>
[CliOption("--cpu-period", Format = OptionFormat.EqualsSeparated)]
public int? CpuPeriod { get; set; }
/// <summary>
/// limit the CPU CFS (Completely Fair Scheduler) quota
/// </summary>
[CliOption("--cpu-quota", Format = OptionFormat.EqualsSeparated)]
public int? CpuQuota { get; set; }
/// <summary>
/// CPU shares (relative weight)
/// </summary>
[CliOption("--cpu-shares", ShortForm = "-c", Format = OptionFormat.EqualsSeparated)]
public int? CpuShares { get; set; }
/// <summary>
/// CPUs in which to allow execution (0-3, 0,1)
/// </summary>
[CliOption("--cpuset-cpus", Format = OptionFormat.EqualsSeparated)]
public string? CpusetCpus { get; set; }
/// <summary>
/// memory nodes (MEMs) in which to allow execution (0-3, 0,1). Only effective on NUMA systems.
/// </summary>
[CliOption("--cpuset-mems", Format = OptionFormat.EqualsSeparated)]
public string? CpusetMems { get; set; }
/// <summary>
/// use [username[:password]] for accessing the registry
/// </summary>
[CliOption("--creds", Format = OptionFormat.EqualsSeparated)]
public string? Creds { get; set; }
/// <summary>
/// confidential workload options
/// </summary>
[CliOption("--cw", Format = OptionFormat.EqualsSeparated)]
public string? Cw { get; set; }
/// <summary>
/// key needed to decrypt the image
/// </summary>
[CliOption("--decryption-key", Format = OptionFormat.EqualsSeparated, AllowMultiple = true)]
public IEnumerable<string>? DecryptionKey { get; set; }
/// <summary>
/// additional devices to be used within containers (default [])
/// </summary>
[CliOption("--device", Format = OptionFormat.EqualsSeparated, AllowMultiple = true)]
public IEnumerable<string>? Device { get; set; }
/// <summary>
/// don't compress layers by default (default true)
/// </summary>
[CliFlag("--disable-compression", ShortForm = "-D")]
public bool? DisableCompression { get; set; }
/// <summary>
/// this is a Docker specific option and is a NOOP
/// </summary>
[CliFlag("--disable-content-trust")]
public bool? DisableContentTrust { get; set; }
/// <summary>
/// set custom DNS servers or disable it completely by setting it to 'none', which prevents the automatic creation of /etc/resolv.conf.
/// </summary>
[CliOption("--dns", Format = OptionFormat.EqualsSeparated)]
public string? Dns { get; set; }
/// <summary>
/// set custom DNS options
/// </summary>
[CliOption("--dns-option", Format = OptionFormat.EqualsSeparated, AllowMultiple = true)]
public IEnumerable<string>? DnsOption { get; set; }
/// <summary>
/// set custom DNS search domains
/// </summary>
[CliOption("--dns-search", Format = OptionFormat.EqualsSeparated, AllowMultiple = true)]
public IEnumerable<string>? DnsSearch { get; set; }
/// <summary>
/// set environment variable for the image
/// </summary>
[CliOption("--env", Format = OptionFormat.EqualsSeparated, AllowMultiple = true)]
public IEnumerable<string>? Env { get; set; }
/// <summary>
/// always remove intermediate containers after a build, even if the build is unsuccessful.
/// </summary>
[CliFlag("--force-rm")]
public bool? ForceRm { get; set; }
/// <summary>
/// format of the built image's manifest and metadata. Use BUILDAH_FORMAT environment variable to override. (default "oci")
/// </summary>
[CliOption("--format", Format = OptionFormat.EqualsSeparated)]
public string? Format { get; set; }
/// <summary>
/// image name used to replace the value in the first FROM instruction in the Containerfile
/// </summary>
[CliOption("--from", Format = OptionFormat.EqualsSeparated)]
public string? From { get; set; }
/// <summary>
/// add additional groups to the primary container process. 'keep-groups' allows container processes to use supplementary groups.
/// </summary>
[CliOption("--group-add", Format = OptionFormat.EqualsSeparated, AllowMultiple = true)]
public IEnumerable<string>? GroupAdd { get; set; }
/// <summary>
/// help for build
/// </summary>
[CliFlag("--help", ShortForm = "-h")]
public bool? Help { get; set; }
/// <summary>
/// set the OCI hooks directory path (may be set multiple times)
/// </summary>
[CliOption("--hooks-dir", Format = OptionFormat.EqualsSeparated, AllowMultiple = true)]
public IEnumerable<string>? HooksDir { get; set; }
/// <summary>
/// pass through HTTP Proxy environment variables (default true)
/// </summary>
[CliFlag("--http-proxy")]
public bool? HttpProxy { get; set; }
/// <summary>
/// add default identity label (default true)
/// </summary>
[CliFlag("--identity-label")]
public bool? IdentityLabel { get; set; }
/// <summary>
/// path to an alternate .dockerignore file
/// </summary>
[CliOption("--ignorefile", Format = OptionFormat.EqualsSeparated)]
public string? Ignorefile { get; set; }
/// <summary>
/// file to write the image ID to
/// </summary>
[CliOption("--iidfile", Format = OptionFormat.EqualsSeparated)]
public string? Iidfile { get; set; }
/// <summary>
/// 'private', path of IPC namespace to join, or 'host'
/// </summary>
[CliOption("--ipc", Format = OptionFormat.EqualsSeparated)]
public string? Ipc { get; set; }
/// <summary>
/// type of process isolation to use. Use BUILDAH_ISOLATION environment variable to override. (default "rootless")
/// </summary>
[CliOption("--isolation", Format = OptionFormat.EqualsSeparated)]
public string? Isolation { get; set; }
/// <summary>
/// how many stages to run in parallel (default 1)
/// </summary>
[CliOption("--jobs", Format = OptionFormat.EqualsSeparated)]
public int? Jobs { get; set; }
/// <summary>
/// set metadata for an image (default [])
/// </summary>
[CliOption("--label", Format = OptionFormat.EqualsSeparated, AllowMultiple = true)]
public IEnumerable<string>? Label { get; set; }
/// <summary>
/// set metadata for an intermediate image (default [])
/// </summary>
[CliOption("--layer-label", Format = OptionFormat.EqualsSeparated, AllowMultiple = true)]
public IEnumerable<string>? LayerLabel { get; set; }
/// <summary>
/// use intermediate layers during build. Use BUILDAH_LAYERS environment variable to override.
/// </summary>
[CliFlag("--layers")]
public bool? Layers { get; set; }
/// <summary>
/// log to file instead of stdout/stderr
/// </summary>
[CliOption("--logfile", Format = OptionFormat.EqualsSeparated)]
public string? Logfile { get; set; }
/// <summary>
/// split logfile to different files for each platform
/// </summary>
[CliFlag("--logsplit")]
public bool? Logsplit { get; set; }
/// <summary>
/// add the image to the specified manifest list. Creates manifest list if it does not exist
/// </summary>
[CliOption("--manifest", Format = OptionFormat.EqualsSeparated)]
public string? Manifest { get; set; }
/// <summary>
/// memory limit (format: <number>[<unit>], where unit = b, k, m or g)
/// </summary>
[CliOption("--memory", ShortForm = "-m", Format = OptionFormat.EqualsSeparated)]
public string? Memory { get; set; }
/// <summary>
/// swap limit equal to memory plus swap: '-1' to enable unlimited swap
/// </summary>
[CliOption("--memory-swap", Format = OptionFormat.EqualsSeparated)]
public string? MemorySwap { get; set; }
/// <summary>
/// 'private', 'none', 'ns:path' of network namespace to join, or 'host'
/// </summary>
[CliOption("--network", Format = OptionFormat.EqualsSeparated)]
public string? Network { get; set; }
/// <summary>
/// do not use existing cached images for the container build. Build from the start with a new set of cached layers.
/// </summary>
[CliFlag("--no-cache")]
public bool? NoCache { get; set; }
/// <summary>
/// do not create new /etc/hostname file for RUN instructions, use the one from the base image.
/// </summary>
[CliFlag("--no-hostname")]
public bool? NoHostname { get; set; }
/// <summary>
/// do not create new /etc/hosts file for RUN instructions, use the one from the base image.
/// </summary>
[CliFlag("--no-hosts")]
public bool? NoHosts { get; set; }
/// <summary>
/// omit build history information from built image
/// </summary>
[CliFlag("--omit-history")]
public bool? OmitHistory { get; set; }
/// <summary>
/// set the OS to the provided value instead of the current operating system of the host (default "linux")
/// </summary>
[CliOption("--os", Format = OptionFormat.EqualsSeparated)]
public string? Os { get; set; }
/// <summary>
/// set required OS feature for the target image in addition to values from the base image
/// </summary>
[CliOption("--os-feature", Format = OptionFormat.EqualsSeparated)]
public string? OsFeature { get; set; }
/// <summary>
/// set required OS version for the target image instead of the value from the base image
/// </summary>
[CliOption("--os-version", Format = OptionFormat.EqualsSeparated)]
public string? OsVersion { get; set; }
/// <summary>
/// output destination (format: type=local,dest=path)
/// </summary>
[CliOption("--output", ShortForm = "-o", Format = OptionFormat.EqualsSeparated)]
public string? Output { get; set; }
/// <summary>
/// private, path of PID namespace to join, or 'host'
/// </summary>
[CliOption("--pid", Format = OptionFormat.EqualsSeparated)]
public string? Pid { get; set; }
/// <summary>
/// set the OS/ARCH[/VARIANT] of the image to the provided value instead of the current operating system and architecture of the host (for example "linux/arm") (default [linux/amd64])
/// </summary>
[CliOption("--platform", Format = OptionFormat.EqualsSeparated)]
public string? Platform { get; set; }
/// <summary>
/// pull the image from the registry if newer or not present in store, if false, only pull the image if not present, if always, pull the image even if the named image is present in store, if never, only use the image present in store if available (default "true")
/// </summary>
[CliOption("--pull", Format = OptionFormat.EqualsSeparated)]
public string? Pull { get; set; }
/// <summary>
/// refrain from announcing build instructions and image read/write progress
/// </summary>
[CliFlag("--quiet", ShortForm = "-q")]
public bool? Quiet { get; set; }
/// <summary>
/// number of times to retry in case of failure when performing push/pull (default 3)
/// </summary>
[CliOption("--retry", Format = OptionFormat.EqualsSeparated)]
public int? Retry { get; set; }
/// <summary>
/// delay between retries in case of push/pull failures (default "2s")
/// </summary>
[CliOption("--retry-delay", Format = OptionFormat.EqualsSeparated)]
public string? RetryDelay { get; set; }
/// <summary>
/// remove intermediate containers after a successful build (default true)
/// </summary>
[CliFlag("--rm")]
public bool? Rm { get; set; }
/// <summary>
/// path to an alternate runtime. Use BUILDAH_RUNTIME environment variable to override. (default "crun")
/// </summary>
[CliOption("--runtime", Format = OptionFormat.EqualsSeparated)]
public string? Runtime { get; set; }
/// <summary>
/// add global flags for the container runtime
/// </summary>
[CliOption("--runtime-flag", Format = OptionFormat.EqualsSeparated, AllowMultiple = true)]
public IEnumerable<string>? RuntimeFlag { get; set; }
/// <summary>
/// secret file to expose to the build
/// </summary>
[SecretValue]
[CliOption("--secret", Format = OptionFormat.EqualsSeparated, AllowMultiple = true)]
public IEnumerable<string>? Secret { get; set; }
/// <summary>
/// security options (default [])
/// </summary>
[CliOption("--security-opt", Format = OptionFormat.EqualsSeparated, AllowMultiple = true)]
public IEnumerable<string>? SecurityOpt { get; set; }
/// <summary>
/// size of '/dev/shm'. The format is <number><unit>. (default "65536k")
/// </summary>
[CliOption("--shm-size", Format = OptionFormat.EqualsSeparated)]
public string? ShmSize { get; set; }
/// <summary>
/// sign the image using a GPG key with the specified FINGERPRINT
/// </summary>
[CliOption("--sign-by", Format = OptionFormat.EqualsSeparated)]
public string? SignBy { get; set; }
/// <summary>
/// skips stages in multi-stage builds which do not affect the final target (default true)
/// </summary>
[CliFlag("--skip-unused-stages")]
public bool? SkipUnusedStages { get; set; }
/// <summary>
/// squash all image layers into a single layer
/// </summary>
[CliFlag("--squash")]
public bool? Squash { get; set; }
/// <summary>
/// SSH agent socket or keys to expose to the build. (format: default|<id>[=<socket>|<key>[,<key>]])
/// </summary>
[CliOption("--ssh", Format = OptionFormat.EqualsSeparated, AllowMultiple = true)]
public IEnumerable<string>? Ssh { get; set; }
/// <summary>
/// pass stdin into containers
/// </summary>
[CliFlag("--stdin")]
public bool? Stdin { get; set; }
/// <summary>
/// tagged name to apply to the built image
/// </summary>
[CliOption("--tag", ShortForm = "-t", Format = OptionFormat.EqualsSeparated)]
public string? Tag { get; set; }
/// <summary>
/// set the target build stage to build
/// </summary>
[CliOption("--target", Format = OptionFormat.EqualsSeparated)]
public string? Target { get; set; }
/// <summary>
/// set created timestamp to the specified epoch seconds to allow for deterministic builds, defaults to current time
/// </summary>
[CliOption("--timestamp", Format = OptionFormat.EqualsSeparated)]
public int? Timestamp { get; set; }
/// <summary>
/// require HTTPS and verify certificates when accessing the registry (default true)
/// </summary>
[CliFlag("--tls-verify")]
public bool? TlsVerify { get; set; }
/// <summary>
/// ulimit options
/// </summary>
[CliOption("--ulimit", Format = OptionFormat.EqualsSeparated, AllowMultiple = true)]
public IEnumerable<string>? Ulimit { get; set; }
/// <summary>
/// unset environment variable from final image
/// </summary>
[CliOption("--unsetenv", Format = OptionFormat.EqualsSeparated, AllowMultiple = true)]
public IEnumerable<string>? Unsetenv { get; set; }
/// <summary>
/// unset label when inheriting labels from base image
/// </summary>
[CliOption("--unsetlabel", Format = OptionFormat.EqualsSeparated, AllowMultiple = true)]
public IEnumerable<string>? Unsetlabel { get; set; }
/// <summary>
/// 'container', path of user namespace to join, or 'host'
/// </summary>
[CliOption("--userns", Format = OptionFormat.EqualsSeparated)]
public string? Userns { get; set; }
/// <summary>
/// containerGID:hostGID:length GID mapping to use in user namespace
/// </summary>
[CliOption("--userns-gid-map", Format = OptionFormat.EqualsSeparated)]
public string? UsernsGidMap { get; set; }
/// <summary>
/// name of entries from /etc/subgid to use to set user namespace GID mapping
/// </summary>
[CliOption("--userns-gid-map-group", Format = OptionFormat.EqualsSeparated)]
public string? UsernsGidMapGroup { get; set; }
/// <summary>
/// containerUID:hostUID:length UID mapping to use in user namespace
/// </summary>
[CliOption("--userns-uid-map", Format = OptionFormat.EqualsSeparated)]
public string? UsernsUidMap { get; set; }
/// <summary>
/// name of entries from /etc/subuid to use to set user namespace UID mapping
/// </summary>
[CliOption("--userns-uid-map-user", Format = OptionFormat.EqualsSeparated)]
public string? UsernsUidMapUser { get; set; }
/// <summary>
/// private, :path of UTS namespace to join, or 'host'
/// </summary>
[CliOption("--uts", Format = OptionFormat.EqualsSeparated)]
public string? Uts { get; set; }
/// <summary>
/// override the variant of the specified image
/// </summary>
[CliOption("--variant", Format = OptionFormat.EqualsSeparated)]
public string? Variant { get; set; }
/// <summary>
/// bind mount a volume into the container
/// </summary>
[CliOption("--volume", ShortForm = "-v", Format = OptionFormat.EqualsSeparated, AllowMultiple = true)]
public IEnumerable<string>? Volume { get; set; }
[CliArgument(0, Placement = ArgumentPlacement.BeforeOptions)]
public string? Context { get; set; }
}