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