@pulumi/docker 4.6.0-beta.4 → 4.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (71) hide show
  1. package/config/vars.d.ts +6 -8
  2. package/config/vars.js.map +1 -1
  3. package/container.d.ts +46 -57
  4. package/container.js +22 -21
  5. package/container.js.map +1 -1
  6. package/getLogs.d.ts +1 -1
  7. package/getLogs.js +14 -1
  8. package/getLogs.js.map +1 -1
  9. package/getNetwork.d.ts +2 -2
  10. package/getNetwork.js +4 -1
  11. package/getNetwork.js.map +1 -1
  12. package/getPlugin.d.ts +27 -9
  13. package/getPlugin.js +32 -9
  14. package/getPlugin.js.map +1 -1
  15. package/getRegistryImage.d.ts +9 -9
  16. package/getRegistryImage.js +13 -9
  17. package/getRegistryImage.js.map +1 -1
  18. package/getRemoteImage.d.ts +9 -1
  19. package/getRemoteImage.js +12 -1
  20. package/getRemoteImage.js.map +1 -1
  21. package/image.d.ts +8 -6
  22. package/image.js +7 -4
  23. package/image.js.map +1 -1
  24. package/index.d.ts +1 -2
  25. package/index.js +1 -3
  26. package/index.js.map +1 -1
  27. package/network.d.ts +19 -19
  28. package/network.js +13 -13
  29. package/package.json +4 -3
  30. package/plugin.d.ts +3 -20
  31. package/plugin.js +0 -17
  32. package/plugin.js.map +1 -1
  33. package/provider.d.ts +11 -14
  34. package/provider.js.map +1 -1
  35. package/registryImage.d.ts +3 -20
  36. package/registryImage.js +0 -17
  37. package/registryImage.js.map +1 -1
  38. package/remoteImage.d.ts +44 -16
  39. package/remoteImage.js +32 -4
  40. package/remoteImage.js.map +1 -1
  41. package/secret.d.ts +1 -1
  42. package/secret.js +1 -1
  43. package/service.d.ts +23 -30
  44. package/service.js +23 -30
  45. package/service.js.map +1 -1
  46. package/serviceConfig.d.ts +13 -13
  47. package/serviceConfig.js +13 -13
  48. package/types/enums/index.d.ts +0 -2
  49. package/types/enums/index.js +1 -4
  50. package/types/enums/index.js.map +1 -1
  51. package/types/input.d.ts +3 -767
  52. package/types/input.js +0 -116
  53. package/types/input.js.map +1 -1
  54. package/types/output.d.ts +4 -769
  55. package/types/output.js +0 -115
  56. package/types/output.js.map +1 -1
  57. package/volume.d.ts +16 -16
  58. package/volume.js +13 -13
  59. package/buildx/image.d.ts +0 -916
  60. package/buildx/image.js +0 -558
  61. package/buildx/image.js.map +0 -1
  62. package/buildx/index.d.ts +0 -7
  63. package/buildx/index.js +0 -42
  64. package/buildx/index.js.map +0 -1
  65. package/buildx/index_.d.ts +0 -140
  66. package/buildx/index_.js +0 -130
  67. package/buildx/index_.js.map +0 -1
  68. package/package.json.bak +0 -28
  69. package/types/enums/buildx/index.d.ts +0 -72
  70. package/types/enums/buildx/index.js +0 -74
  71. package/types/enums/buildx/index.js.map +0 -1
package/buildx/image.d.ts DELETED
@@ -1,916 +0,0 @@
1
- import * as pulumi from "@pulumi/pulumi";
2
- import * as inputs from "../types/input";
3
- import * as outputs from "../types/output";
4
- import * as enums from "../types/enums";
5
- /**
6
- * A Docker image built using buildx -- Docker's interface to the improved
7
- * BuildKit backend.
8
- *
9
- * ## Stability
10
- *
11
- * **This resource is experimental and subject to change.**
12
- *
13
- * API types are unstable. Subsequent releases _may_ require manual edits
14
- * to your state file(s) in order to adopt API changes.
15
- *
16
- * `retainOnDelete: true` is recommended with this resource until it is
17
- * stable. This enables future API changes to be adopted more easily by renaming
18
- * resources.
19
- *
20
- * Only use this resource if you understand and accept the risks.
21
- *
22
- * ## Migrating v3 and v4 Image resources
23
- *
24
- * The `buildx.Image` resource provides a superset of functionality over the `Image` resources available in versions 3 and 4 of the Pulumi Docker provider.
25
- * Existing `Image` resources can be converted to `build.Image` resources with minor modifications.
26
- *
27
- * ### Behavioral differences
28
- *
29
- * There are several key behavioral differences to keep in mind when transitioning images to the new `buildx.Image` resource.
30
- *
31
- * #### Previews
32
- *
33
- * Version `3.x` of the Pulumi Docker provider always builds images during preview operations.
34
- * This is helpful as a safeguard to prevent "broken" images from merging, but users found the behavior unnecessarily redundant when running previews and updates locally.
35
- *
36
- * Version `4.x` changed build-on-preview behavior to be opt-in.
37
- * By default, `v4.x` `Image` resources do _not_ build during previews, but this behavior can be toggled with the `buildOnPreview` option.
38
- * Some users felt this made previews in CI less helpful because they no longer detected bad images by default.
39
- *
40
- * The default behavior of the `buildx.Image` resource has been changed to strike a better balance between CI use cases and manual updates.
41
- * By default, Pulumi will now only build `buildx.Image` resources during previews when it detects a CI environment like GitHub Actions.
42
- * Previews run in non-CI environments will not build images.
43
- * This behavior is still configurable with `buildOnPreview`.
44
- *
45
- * #### Push behavior
46
- *
47
- * Versions `3.x` and `4.x` of the Pulumi Docker provider attempt to push images to remote registries by default.
48
- * They expose a `skipPush: true` option to disable pushing.
49
- *
50
- * The `buildx.Image` resource matches the Docker CLI's behavior and does not push images anywhere by default.
51
- *
52
- * To push images to a registry you can include `push: true` (equivalent to Docker's `--push` flag) or configure an `export` of type `registry` (equivalent to Docker's `--output type=registry`).
53
- * Like Docker, if an image is configured without exports you will see a warning with instructions for how to enable pushing, but the build will still proceed normally.
54
- *
55
- * #### Secrets
56
- *
57
- * Version `3.x` of the Pulumi Docker provider supports secrets by way of the `extraOptions` field.
58
- *
59
- * Version `4.x` of the Pulumi Docker provider does not support secrets.
60
- *
61
- * The `buildx.Image` resource supports secrets but does not require those secrets to exist on-disk or in environment variables.
62
- * Instead, they should be passed directly as values.
63
- * (Please be sure to familiarize yourself with Pulumi's [native secret handling](https://www.pulumi.com/docs/concepts/secrets/).)
64
- * Pulumi also provides [ESC](https://www.pulumi.com/product/esc/) to make it easier to share secrets across stacks and environments.
65
- *
66
- * #### Caching
67
- *
68
- * Version `3.x` of the Pulumi Docker provider exposes `cacheFrom: bool | { stages: [...] }`.
69
- * It builds targets individually and pushes them to separate images for caching.
70
- *
71
- * Version `4.x` exposes a similar parameter `cacheFrom: { images: [...] }` which pushes and pulls inline caches.
72
- *
73
- * Both versions 3 and 4 require specific environment variables to be set and deviate from Docker's native caching behavior.
74
- * This can result in inefficient builds due to unnecessary image pulls, repeated file transfers, etc.
75
- *
76
- * The `buildx.Image` resource delegates all caching behavior to Docker.
77
- * `cacheFrom` and `cacheTo` options (equivalent to Docker's `--cache-to` and `--cache-from`) are exposed and provide additional cache targets, such as local disk, S3 storage, etc.
78
- *
79
- * #### Outputs
80
- *
81
- * Versions `3.x` and `4.x` of the provider exposed a `repoDigest` output which was a fully qualified tag with digest.
82
- * In `4.x` this could also be a single sha256 hash if the image wasn't pushed.
83
- *
84
- * Unlike earlier providers the `buildx.Image` resource can push multiple tags.
85
- * As a convenience, it exposes a `ref` output consisting of a tag with digest as long as the image was pushed.
86
- * If multiple tags were pushed this uses one at random.
87
- *
88
- * If you need more control over tag references you can use the `digest` output, which is always a single sha256 hash as long as the image was exported somewhere.
89
- *
90
- * #### Tag deletion and refreshes
91
- *
92
- * Versions 3 and 4 of Pulumi Docker provider do not delete tags when the `Image` resource is deleted, nor do they confirm expected tags exist during `refresh` operations.
93
- *
94
- * The `buidx.Image` will query your registries during `refresh` to ensure the expected tags exist.
95
- * If any are missing a subsequent `update` will push them.
96
- *
97
- * When a `buildx.Image` is deleted, it will _attempt_ to also delete any pushed tags.
98
- * Deletion of remote tags is not guaranteed because not all registries support the manifest `DELETE` API (`docker.io` in particular).
99
- * Manifests are _not_ deleted in the same way during updates -- to do so safely would require a full build to determine whether a Pulumi operation should be an update or update-replace.
100
- *
101
- * Use the [`retainOnDelete: true`](https://www.pulumi.com/docs/concepts/options/retainondelete/) option if you do not want tags deleted.
102
- *
103
- * ### Example migration
104
- *
105
- * Examples of "fully-featured" `v3` and `v4` `Image` resources are shown below, along with an example `buildx.Image` resource showing how they would look after migration.
106
- *
107
- * The `v3` resource leverages `buildx` via a `DOCKER_BUILDKIT` environment variable and CLI flags passed in with `extraOption`.
108
- * After migration, the environment variable is no longer needed and CLI flags are now properties on the `buildx.Image`.
109
- * In almost all cases, properties of `buildx.Image` are named after the Docker CLI flag they correspond to.
110
- *
111
- * The `v4` resource is less functional than its `v3` counterpart because it lacks the flexibility of `extraOptions`.
112
- * It it is shown with parameters similar to the `v3` example for completeness.
113
- *
114
- * ## Example Usage
115
- * ### v3/v4 migration
116
- *
117
- * ```typescript
118
- *
119
- * // v3 Image
120
- * const v3 = new docker.Image("v3-image", {
121
- * imageName: "myregistry.com/user/repo:latest",
122
- * localImageName: "local-tag",
123
- * skipPush: false,
124
- * build: {
125
- * dockerfile: "./Dockerfile",
126
- * context: "../app",
127
- * target: "mytarget",
128
- * args: {
129
- * MY_BUILD_ARG: "foo",
130
- * },
131
- * env: {
132
- * DOCKER_BUILDKIT: "1",
133
- * },
134
- * extraOptions: [
135
- * "--cache-from",
136
- * "type=registry,myregistry.com/user/repo:cache",
137
- * "--cache-to",
138
- * "type=registry,myregistry.com/user/repo:cache",
139
- * "--add-host",
140
- * "metadata.google.internal:169.254.169.254",
141
- * "--secret",
142
- * "id=mysecret,src=/local/secret",
143
- * "--ssh",
144
- * "default=/home/runner/.ssh/id_ed25519",
145
- * "--network",
146
- * "host",
147
- * "--platform",
148
- * "linux/amd64",
149
- * ],
150
- * },
151
- * registry: {
152
- * server: "myregistry.com",
153
- * username: "username",
154
- * password: pulumi.secret("password"),
155
- * },
156
- * });
157
- *
158
- * // v3 Image after migrating to buildx.Image
159
- * const v3Migrated = new docker.buildx.Image("v3-to-buildx", {
160
- * tags: ["myregistry.com/user/repo:latest", "local-tag"],
161
- * push: true,
162
- * dockerfile: {
163
- * location: "./Dockerfile",
164
- * },
165
- * context: {
166
- * location: "../app",
167
- * },
168
- * targets: ["mytarget"],
169
- * buildArgs: {
170
- * MY_BUILD_ARG: "foo",
171
- * },
172
- * cacheFrom: [{ registry: { ref: "myregistry.com/user/repo:cache" } }],
173
- * cacheTo: [{ registry: { ref: "myregistry.com/user/repo:cache" } }],
174
- * secrets: {
175
- * mysecret: "value",
176
- * },
177
- * addHosts: ["metadata.google.internal:169.254.169.254"],
178
- * ssh: {
179
- * default: ["/home/runner/.ssh/id_ed25519"],
180
- * },
181
- * network: "host",
182
- * platforms: ["linux/amd64"],
183
- * registries: [{
184
- * address: "myregistry.com",
185
- * username: "username",
186
- * password: pulumi.secret("password"),
187
- * }],
188
- * });
189
- *
190
- *
191
- * // v4 Image
192
- * const v4 = new docker.Image("v4-image", {
193
- * imageName: "myregistry.com/user/repo:latest",
194
- * skipPush: false,
195
- * build: {
196
- * dockerfile: "./Dockerfile",
197
- * context: "../app",
198
- * target: "mytarget",
199
- * args: {
200
- * MY_BUILD_ARG: "foo",
201
- * },
202
- * cacheFrom: {
203
- * images: ["myregistry.com/user/repo:cache"],
204
- * },
205
- * addHosts: ["metadata.google.internal:169.254.169.254"],
206
- * network: "host",
207
- * platform: "linux/amd64",
208
- * },
209
- * buildOnPreview: true,
210
- * registry: {
211
- * server: "myregistry.com",
212
- * username: "username",
213
- * password: pulumi.secret("password"),
214
- * },
215
- * });
216
- *
217
- * // v4 Image after migrating to buildx.Image
218
- * const v4Migrated = new docker.buildx.Image("v4-to-buildx", {
219
- * tags: ["myregistry.com/user/repo:latest"],
220
- * push: true,
221
- * dockerfile: {
222
- * location: "./Dockerfile",
223
- * },
224
- * context: {
225
- * location: "../app",
226
- * },
227
- * targets: ["mytarget"],
228
- * buildArgs: {
229
- * MY_BUILD_ARG: "foo",
230
- * },
231
- * cacheFrom: [{ registry: { ref: "myregistry.com/user/repo:cache" } }],
232
- * cacheTo: [{ registry: { ref: "myregistry.com/user/repo:cache" } }],
233
- * addHosts: ["metadata.google.internal:169.254.169.254"],
234
- * network: "host",
235
- * platforms: ["linux/amd64"],
236
- * registries: [{
237
- * address: "myregistry.com",
238
- * username: "username",
239
- * password: pulumi.secret("password"),
240
- * }],
241
- * });
242
- *
243
- * ```
244
- *
245
- * ## Example Usage
246
- * ### Push to AWS ECR with caching
247
- *
248
- * ```typescript
249
- * import * as pulumi from "@pulumi/pulumi";
250
- * import * as aws from "@pulumi/aws";
251
- * import * as docker from "@pulumi/docker";
252
- *
253
- * const ecrRepository = new aws.ecr.Repository("ecr-repository", {});
254
- * const authToken = aws.ecr.getAuthorizationTokenOutput({
255
- * registryId: ecrRepository.registryId,
256
- * });
257
- * const myImage = new docker.buildx.Image("my-image", {
258
- * cacheFrom: [{
259
- * registry: {
260
- * ref: pulumi.interpolate`${ecrRepository.repositoryUrl}:cache`,
261
- * },
262
- * }],
263
- * cacheTo: [{
264
- * registry: {
265
- * imageManifest: true,
266
- * ociMediaTypes: true,
267
- * ref: pulumi.interpolate`${ecrRepository.repositoryUrl}:cache`,
268
- * },
269
- * }],
270
- * context: {
271
- * location: "./app",
272
- * },
273
- * push: true,
274
- * registries: [{
275
- * address: ecrRepository.repositoryUrl,
276
- * password: authToken.apply(authToken => authToken.password),
277
- * username: authToken.apply(authToken => authToken.userName),
278
- * }],
279
- * tags: [pulumi.interpolate`${ecrRepository.repositoryUrl}:latest`],
280
- * });
281
- * export const ref = myImage.ref;
282
- * ```
283
- * ### Multi-platform image
284
- *
285
- * ```typescript
286
- * import * as pulumi from "@pulumi/pulumi";
287
- * import * as docker from "@pulumi/docker";
288
- *
289
- * const image = new docker.buildx.Image("image", {
290
- * context: {
291
- * location: "app",
292
- * },
293
- * platforms: [
294
- * docker.buildx.image.Platform.Plan9_amd64,
295
- * docker.buildx.image.Platform.Plan9_386,
296
- * ],
297
- * });
298
- * ```
299
- * ### Registry export
300
- *
301
- * ```typescript
302
- * import * as pulumi from "@pulumi/pulumi";
303
- * import * as docker from "@pulumi/docker";
304
- *
305
- * const image = new docker.buildx.Image("image", {
306
- * context: {
307
- * location: "app",
308
- * },
309
- * push: true,
310
- * registries: [{
311
- * address: "docker.io",
312
- * password: dockerHubPassword,
313
- * username: "pulumibot",
314
- * }],
315
- * tags: ["docker.io/pulumi/pulumi:3.107.0"],
316
- * });
317
- * export const ref = myImage.ref;
318
- * ```
319
- * ### Caching
320
- *
321
- * ```typescript
322
- * import * as pulumi from "@pulumi/pulumi";
323
- * import * as docker from "@pulumi/docker";
324
- *
325
- * const image = new docker.buildx.Image("image", {
326
- * cacheFrom: [{
327
- * local: {
328
- * src: "tmp/cache",
329
- * },
330
- * }],
331
- * cacheTo: [{
332
- * local: {
333
- * dest: "tmp/cache",
334
- * mode: docker.buildx.image.CacheMode.Max,
335
- * },
336
- * }],
337
- * context: {
338
- * location: "app",
339
- * },
340
- * });
341
- * ```
342
- * ### Docker Build Cloud
343
- *
344
- * ```typescript
345
- * import * as pulumi from "@pulumi/pulumi";
346
- * import * as docker from "@pulumi/docker";
347
- *
348
- * const image = new docker.buildx.Image("image", {
349
- * builder: {
350
- * name: "cloud-builder-name",
351
- * },
352
- * context: {
353
- * location: "app",
354
- * },
355
- * exec: true,
356
- * });
357
- * ```
358
- * ### Build arguments
359
- *
360
- * ```typescript
361
- * import * as pulumi from "@pulumi/pulumi";
362
- * import * as docker from "@pulumi/docker";
363
- *
364
- * const image = new docker.buildx.Image("image", {
365
- * buildArgs: {
366
- * SET_ME_TO_TRUE: "true",
367
- * },
368
- * context: {
369
- * location: "app",
370
- * },
371
- * });
372
- * ```
373
- * ### Build target
374
- *
375
- * ```typescript
376
- * import * as pulumi from "@pulumi/pulumi";
377
- * import * as docker from "@pulumi/docker";
378
- *
379
- * const image = new docker.buildx.Image("image", {
380
- * context: {
381
- * location: "app",
382
- * },
383
- * target: "build-me",
384
- * });
385
- * ```
386
- * ### Named contexts
387
- *
388
- * ```typescript
389
- * import * as pulumi from "@pulumi/pulumi";
390
- * import * as docker from "@pulumi/docker";
391
- *
392
- * const image = new docker.buildx.Image("image", {context: {
393
- * location: "app",
394
- * named: {
395
- * "golang:latest": {
396
- * location: "docker-image://golang@sha256:b8e62cf593cdaff36efd90aa3a37de268e6781a2e68c6610940c48f7cdf36984",
397
- * },
398
- * },
399
- * }});
400
- * ```
401
- * ### Remote context
402
- *
403
- * ```typescript
404
- * import * as pulumi from "@pulumi/pulumi";
405
- * import * as docker from "@pulumi/docker";
406
- *
407
- * const image = new docker.buildx.Image("image", {context: {
408
- * location: "https://raw.githubusercontent.com/pulumi/pulumi-docker/api-types/provider/testdata/Dockerfile",
409
- * }});
410
- * ```
411
- * ### Inline Dockerfile
412
- *
413
- * ```typescript
414
- * import * as pulumi from "@pulumi/pulumi";
415
- * import * as docker from "@pulumi/docker";
416
- *
417
- * const image = new docker.buildx.Image("image", {
418
- * context: {
419
- * location: "app",
420
- * },
421
- * dockerfile: {
422
- * inline: `FROM busybox
423
- * COPY hello.c ./
424
- * `,
425
- * },
426
- * });
427
- * ```
428
- * ### Remote context
429
- *
430
- * ```typescript
431
- * import * as pulumi from "@pulumi/pulumi";
432
- * import * as docker from "@pulumi/docker";
433
- *
434
- * const image = new docker.buildx.Image("image", {
435
- * context: {
436
- * location: "https://github.com/docker-library/hello-world.git",
437
- * },
438
- * dockerfile: {
439
- * location: "app/Dockerfile",
440
- * },
441
- * });
442
- * ```
443
- * ### Local export
444
- *
445
- * ```typescript
446
- * import * as pulumi from "@pulumi/pulumi";
447
- * import * as docker from "@pulumi/docker";
448
- *
449
- * const image = new docker.buildx.Image("image", {
450
- * context: {
451
- * location: "app",
452
- * },
453
- * exports: [{
454
- * docker: {
455
- * tar: true,
456
- * },
457
- * }],
458
- * });
459
- * ```
460
- */
461
- export declare class Image extends pulumi.CustomResource {
462
- /**
463
- * Get an existing Image resource's state with the given name, ID, and optional extra
464
- * properties used to qualify the lookup.
465
- *
466
- * @param name The _unique_ name of the resulting resource.
467
- * @param id The _unique_ provider ID of the resource to lookup.
468
- * @param opts Optional settings to control the behavior of the CustomResource.
469
- */
470
- static get(name: string, id: pulumi.Input<pulumi.ID>, opts?: pulumi.CustomResourceOptions): Image;
471
- /**
472
- * Returns true if the given object is an instance of Image. This is designed to work even
473
- * when multiple copies of the Pulumi SDK have been loaded into the same process.
474
- */
475
- static isInstance(obj: any): obj is Image;
476
- /**
477
- * Custom `host:ip` mappings to use during the build.
478
- *
479
- * Equivalent to Docker's `--add-host` flag.
480
- */
481
- readonly addHosts: pulumi.Output<string[] | undefined>;
482
- /**
483
- * `ARG` names and values to set during the build.
484
- *
485
- * These variables are accessed like environment variables inside `RUN`
486
- * instructions.
487
- *
488
- * Build arguments are persisted in the image, so you should use `secrets`
489
- * if these arguments are sensitive.
490
- *
491
- * Equivalent to Docker's `--build-arg` flag.
492
- */
493
- readonly buildArgs: pulumi.Output<{
494
- [key: string]: string;
495
- } | undefined>;
496
- /**
497
- * By default, preview behavior depends on the execution environment. If
498
- * Pulumi detects the operation is running on a CI system (GitHub Actions,
499
- * Travis CI, Azure Pipelines, etc.) then it will build images during
500
- * previews as a safeguard. Otherwise, if not running on CI, previews will
501
- * not build images.
502
- *
503
- * Setting this to `false` forces previews to never perform builds, and
504
- * setting it to `true` will always build the image during previews.
505
- *
506
- * Images built during previews are never exported to registries, however
507
- * cache manifests are still exported.
508
- *
509
- * On-disk Dockerfiles are always validated for syntactic correctness
510
- * regardless of this setting.
511
- */
512
- readonly buildOnPreview: pulumi.Output<boolean | undefined>;
513
- /**
514
- * Builder configuration.
515
- */
516
- readonly builder: pulumi.Output<outputs.buildx.BuilderConfig | undefined>;
517
- /**
518
- * Cache export configuration.
519
- *
520
- * Equivalent to Docker's `--cache-from` flag.
521
- */
522
- readonly cacheFrom: pulumi.Output<outputs.buildx.CacheFrom[] | undefined>;
523
- /**
524
- * Cache import configuration.
525
- *
526
- * Equivalent to Docker's `--cache-to` flag.
527
- */
528
- readonly cacheTo: pulumi.Output<outputs.buildx.CacheTo[] | undefined>;
529
- /**
530
- * Build context settings.
531
- *
532
- * Equivalent to Docker's `PATH | URL | -` positional argument.
533
- */
534
- readonly context: pulumi.Output<outputs.buildx.BuildContext | undefined>;
535
- /**
536
- * A preliminary hash of the image's build context.
537
- *
538
- * Pulumi uses this to determine if an image _may_ need to be re-built.
539
- */
540
- readonly contextHash: pulumi.Output<string>;
541
- /**
542
- * A SHA256 digest of the image if it was exported to a registry or
543
- * elsewhere.
544
- *
545
- * Empty if the image was not exported.
546
- *
547
- * Registry images can be referenced precisely as `<tag>@<digest>`. The
548
- * `ref` output provides one such reference as a convenience.
549
- */
550
- readonly digest: pulumi.Output<string>;
551
- /**
552
- * Dockerfile settings.
553
- *
554
- * Equivalent to Docker's `--file` flag.
555
- */
556
- readonly dockerfile: pulumi.Output<outputs.buildx.Dockerfile | undefined>;
557
- /**
558
- * Use `exec` mode to build this image.
559
- *
560
- * By default the provider embeds a v25 Docker client with v0.12 buildx
561
- * support. This helps ensure consistent behavior across environments and
562
- * is compatible with alternative build backends (e.g. `buildkitd`), but
563
- * it may not be desirable if you require a specific version of buildx.
564
- * For example you may want to run a custom `docker-buildx` binary with
565
- * support for [Docker Build
566
- * Cloud](https://docs.docker.com/build/cloud/setup/) (DBC).
567
- *
568
- * When this is set to `true` the provider will instead execute the
569
- * `docker-buildx` binary directly to perform its operations. The user is
570
- * responsible for ensuring this binary exists, with correct permissions
571
- * and pre-configured builders, at a path Docker expects (e.g.
572
- * `~/.docker/cli-plugins`).
573
- *
574
- * Debugging `exec` mode may be more difficult as Pulumi will not be able
575
- * to surface fine-grained errors and warnings. Additionally credentials
576
- * are temporarily written to disk in order to provide them to the
577
- * `docker-buildx` binary.
578
- */
579
- readonly exec: pulumi.Output<boolean | undefined>;
580
- /**
581
- * Controls where images are persisted after building.
582
- *
583
- * Images are only stored in the local cache unless `exports` are
584
- * explicitly configured.
585
- *
586
- * Exporting to multiple destinations requires a daemon running BuildKit
587
- * 0.13 or later.
588
- *
589
- * Equivalent to Docker's `--output` flag.
590
- */
591
- readonly exports: pulumi.Output<outputs.buildx.Export[] | undefined>;
592
- /**
593
- * Attach arbitrary key/value metadata to the image.
594
- *
595
- * Equivalent to Docker's `--label` flag.
596
- */
597
- readonly labels: pulumi.Output<{
598
- [key: string]: string;
599
- } | undefined>;
600
- /**
601
- * When `true` the build will automatically include a `docker` export.
602
- *
603
- * Defaults to `false`.
604
- *
605
- * Equivalent to Docker's `--load` flag.
606
- */
607
- readonly load: pulumi.Output<boolean | undefined>;
608
- /**
609
- * Set the network mode for `RUN` instructions. Defaults to `default`.
610
- *
611
- * For custom networks, configure your builder with `--driver-opt network=...`.
612
- *
613
- * Equivalent to Docker's `--network` flag.
614
- */
615
- readonly network: pulumi.Output<enums.buildx.NetworkMode | undefined>;
616
- /**
617
- * Do not import cache manifests when building the image.
618
- *
619
- * Equivalent to Docker's `--no-cache` flag.
620
- */
621
- readonly noCache: pulumi.Output<boolean | undefined>;
622
- /**
623
- * Set target platform(s) for the build. Defaults to the host's platform.
624
- *
625
- * Equivalent to Docker's `--platform` flag.
626
- */
627
- readonly platforms: pulumi.Output<enums.buildx.Platform[] | undefined>;
628
- /**
629
- * Always pull referenced images.
630
- *
631
- * Equivalent to Docker's `--pull` flag.
632
- */
633
- readonly pull: pulumi.Output<boolean | undefined>;
634
- /**
635
- * When `true` the build will automatically include a `registry` export.
636
- *
637
- * Defaults to `false`.
638
- *
639
- * Equivalent to Docker's `--push` flag.
640
- */
641
- readonly push: pulumi.Output<boolean | undefined>;
642
- /**
643
- * If the image was pushed to any registries then this will contain a
644
- * single fully-qualified tag including the build's digest.
645
- *
646
- * If the image had tags but was not exported, this will take on a value
647
- * of one of those tags.
648
- *
649
- * This will be empty if the image had no exports and no tags.
650
- *
651
- * This is only for convenience and may not be appropriate for situations
652
- * where multiple tags or registries are involved. In those cases this
653
- * output is not guaranteed to be stable.
654
- *
655
- * For more control over tags consumed by downstream resources you should
656
- * use the `digest` output.
657
- */
658
- readonly ref: pulumi.Output<string>;
659
- /**
660
- * Registry credentials. Required if reading or exporting to private
661
- * repositories.
662
- *
663
- * Credentials are kept in-memory and do not pollute pre-existing
664
- * credentials on the host.
665
- *
666
- * Similar to `docker login`.
667
- */
668
- readonly registries: pulumi.Output<outputs.buildx.RegistryAuth[] | undefined>;
669
- /**
670
- * A mapping of secret names to their corresponding values.
671
- *
672
- * Unlike the Docker CLI, these can be passed by value and do not need to
673
- * exist on-disk or in environment variables.
674
- *
675
- * Build arguments and environment variables are persistent in the final
676
- * image, so you should use this for sensitive values.
677
- *
678
- * Similar to Docker's `--secret` flag.
679
- */
680
- readonly secrets: pulumi.Output<{
681
- [key: string]: string;
682
- } | undefined>;
683
- /**
684
- * SSH agent socket or keys to expose to the build.
685
- *
686
- * Equivalent to Docker's `--ssh` flag.
687
- */
688
- readonly ssh: pulumi.Output<outputs.buildx.SSH[] | undefined>;
689
- /**
690
- * Name and optionally a tag (format: `name:tag`).
691
- *
692
- * If exporting to a registry, the name should include the fully qualified
693
- * registry address (e.g. `docker.io/pulumi/pulumi:latest`).
694
- *
695
- * Equivalent to Docker's `--tag` flag.
696
- */
697
- readonly tags: pulumi.Output<string[] | undefined>;
698
- /**
699
- * Set the target build stage(s) to build.
700
- *
701
- * If not specified all targets will be built by default.
702
- *
703
- * Equivalent to Docker's `--target` flag.
704
- */
705
- readonly target: pulumi.Output<string | undefined>;
706
- /**
707
- * Create a Image resource with the given unique name, arguments, and options.
708
- *
709
- * @param name The _unique_ name of the resource.
710
- * @param args The arguments to use to populate this resource's properties.
711
- * @param opts A bag of options that control this resource's behavior.
712
- */
713
- constructor(name: string, args?: ImageArgs, opts?: pulumi.CustomResourceOptions);
714
- }
715
- /**
716
- * The set of arguments for constructing a Image resource.
717
- */
718
- export interface ImageArgs {
719
- /**
720
- * Custom `host:ip` mappings to use during the build.
721
- *
722
- * Equivalent to Docker's `--add-host` flag.
723
- */
724
- addHosts?: pulumi.Input<pulumi.Input<string>[]>;
725
- /**
726
- * `ARG` names and values to set during the build.
727
- *
728
- * These variables are accessed like environment variables inside `RUN`
729
- * instructions.
730
- *
731
- * Build arguments are persisted in the image, so you should use `secrets`
732
- * if these arguments are sensitive.
733
- *
734
- * Equivalent to Docker's `--build-arg` flag.
735
- */
736
- buildArgs?: pulumi.Input<{
737
- [key: string]: pulumi.Input<string>;
738
- }>;
739
- /**
740
- * By default, preview behavior depends on the execution environment. If
741
- * Pulumi detects the operation is running on a CI system (GitHub Actions,
742
- * Travis CI, Azure Pipelines, etc.) then it will build images during
743
- * previews as a safeguard. Otherwise, if not running on CI, previews will
744
- * not build images.
745
- *
746
- * Setting this to `false` forces previews to never perform builds, and
747
- * setting it to `true` will always build the image during previews.
748
- *
749
- * Images built during previews are never exported to registries, however
750
- * cache manifests are still exported.
751
- *
752
- * On-disk Dockerfiles are always validated for syntactic correctness
753
- * regardless of this setting.
754
- */
755
- buildOnPreview?: pulumi.Input<boolean>;
756
- /**
757
- * Builder configuration.
758
- */
759
- builder?: pulumi.Input<inputs.buildx.BuilderConfig>;
760
- /**
761
- * Cache export configuration.
762
- *
763
- * Equivalent to Docker's `--cache-from` flag.
764
- */
765
- cacheFrom?: pulumi.Input<pulumi.Input<inputs.buildx.CacheFrom>[]>;
766
- /**
767
- * Cache import configuration.
768
- *
769
- * Equivalent to Docker's `--cache-to` flag.
770
- */
771
- cacheTo?: pulumi.Input<pulumi.Input<inputs.buildx.CacheTo>[]>;
772
- /**
773
- * Build context settings.
774
- *
775
- * Equivalent to Docker's `PATH | URL | -` positional argument.
776
- */
777
- context?: pulumi.Input<inputs.buildx.BuildContext>;
778
- /**
779
- * Dockerfile settings.
780
- *
781
- * Equivalent to Docker's `--file` flag.
782
- */
783
- dockerfile?: pulumi.Input<inputs.buildx.Dockerfile>;
784
- /**
785
- * Use `exec` mode to build this image.
786
- *
787
- * By default the provider embeds a v25 Docker client with v0.12 buildx
788
- * support. This helps ensure consistent behavior across environments and
789
- * is compatible with alternative build backends (e.g. `buildkitd`), but
790
- * it may not be desirable if you require a specific version of buildx.
791
- * For example you may want to run a custom `docker-buildx` binary with
792
- * support for [Docker Build
793
- * Cloud](https://docs.docker.com/build/cloud/setup/) (DBC).
794
- *
795
- * When this is set to `true` the provider will instead execute the
796
- * `docker-buildx` binary directly to perform its operations. The user is
797
- * responsible for ensuring this binary exists, with correct permissions
798
- * and pre-configured builders, at a path Docker expects (e.g.
799
- * `~/.docker/cli-plugins`).
800
- *
801
- * Debugging `exec` mode may be more difficult as Pulumi will not be able
802
- * to surface fine-grained errors and warnings. Additionally credentials
803
- * are temporarily written to disk in order to provide them to the
804
- * `docker-buildx` binary.
805
- */
806
- exec?: pulumi.Input<boolean>;
807
- /**
808
- * Controls where images are persisted after building.
809
- *
810
- * Images are only stored in the local cache unless `exports` are
811
- * explicitly configured.
812
- *
813
- * Exporting to multiple destinations requires a daemon running BuildKit
814
- * 0.13 or later.
815
- *
816
- * Equivalent to Docker's `--output` flag.
817
- */
818
- exports?: pulumi.Input<pulumi.Input<inputs.buildx.Export>[]>;
819
- /**
820
- * Attach arbitrary key/value metadata to the image.
821
- *
822
- * Equivalent to Docker's `--label` flag.
823
- */
824
- labels?: pulumi.Input<{
825
- [key: string]: pulumi.Input<string>;
826
- }>;
827
- /**
828
- * When `true` the build will automatically include a `docker` export.
829
- *
830
- * Defaults to `false`.
831
- *
832
- * Equivalent to Docker's `--load` flag.
833
- */
834
- load?: pulumi.Input<boolean>;
835
- /**
836
- * Set the network mode for `RUN` instructions. Defaults to `default`.
837
- *
838
- * For custom networks, configure your builder with `--driver-opt network=...`.
839
- *
840
- * Equivalent to Docker's `--network` flag.
841
- */
842
- network?: pulumi.Input<enums.buildx.NetworkMode>;
843
- /**
844
- * Do not import cache manifests when building the image.
845
- *
846
- * Equivalent to Docker's `--no-cache` flag.
847
- */
848
- noCache?: pulumi.Input<boolean>;
849
- /**
850
- * Set target platform(s) for the build. Defaults to the host's platform.
851
- *
852
- * Equivalent to Docker's `--platform` flag.
853
- */
854
- platforms?: pulumi.Input<pulumi.Input<enums.buildx.Platform>[]>;
855
- /**
856
- * Always pull referenced images.
857
- *
858
- * Equivalent to Docker's `--pull` flag.
859
- */
860
- pull?: pulumi.Input<boolean>;
861
- /**
862
- * When `true` the build will automatically include a `registry` export.
863
- *
864
- * Defaults to `false`.
865
- *
866
- * Equivalent to Docker's `--push` flag.
867
- */
868
- push?: pulumi.Input<boolean>;
869
- /**
870
- * Registry credentials. Required if reading or exporting to private
871
- * repositories.
872
- *
873
- * Credentials are kept in-memory and do not pollute pre-existing
874
- * credentials on the host.
875
- *
876
- * Similar to `docker login`.
877
- */
878
- registries?: pulumi.Input<pulumi.Input<inputs.buildx.RegistryAuth>[]>;
879
- /**
880
- * A mapping of secret names to their corresponding values.
881
- *
882
- * Unlike the Docker CLI, these can be passed by value and do not need to
883
- * exist on-disk or in environment variables.
884
- *
885
- * Build arguments and environment variables are persistent in the final
886
- * image, so you should use this for sensitive values.
887
- *
888
- * Similar to Docker's `--secret` flag.
889
- */
890
- secrets?: pulumi.Input<{
891
- [key: string]: pulumi.Input<string>;
892
- }>;
893
- /**
894
- * SSH agent socket or keys to expose to the build.
895
- *
896
- * Equivalent to Docker's `--ssh` flag.
897
- */
898
- ssh?: pulumi.Input<pulumi.Input<inputs.buildx.SSH>[]>;
899
- /**
900
- * Name and optionally a tag (format: `name:tag`).
901
- *
902
- * If exporting to a registry, the name should include the fully qualified
903
- * registry address (e.g. `docker.io/pulumi/pulumi:latest`).
904
- *
905
- * Equivalent to Docker's `--tag` flag.
906
- */
907
- tags?: pulumi.Input<pulumi.Input<string>[]>;
908
- /**
909
- * Set the target build stage(s) to build.
910
- *
911
- * If not specified all targets will be built by default.
912
- *
913
- * Equivalent to Docker's `--target` flag.
914
- */
915
- target?: pulumi.Input<string>;
916
- }