@pulumi/docker 3.6.1 → 3.7.0-alpha.1668812666

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/image.d.ts CHANGED
@@ -1,87 +1,62 @@
1
1
  import * as pulumi from "@pulumi/pulumi";
2
- import * as docker from "./docker";
2
+ import * as inputs from "./types/input";
3
3
  /**
4
- * Arguments for constructing an Image resource.
4
+ * A real CRUD docker image we hope
5
5
  */
6
- export interface ImageArgs {
6
+ export declare class Image extends pulumi.CustomResource {
7
7
  /**
8
- * The qualified image name that will be pushed to the remote registry. Must be a supported
9
- * image name for the target registry user. This name can include a tag at the end. If
10
- * provided all pushed image resources will contain that tag as well.
8
+ * Get an existing Image resource's state with the given name, ID, and optional extra
9
+ * properties used to qualify the lookup.
11
10
  *
12
- * Either [imageName] or [localImageName] can have a tag. However, if both have a tag, then
13
- * those tags must match.
14
- */
15
- imageName: pulumi.Input<string>;
16
- /**
17
- * The Docker build context, as a folder path or a detailed DockerBuild object.
11
+ * @param name The _unique_ name of the resulting resource.
12
+ * @param id The _unique_ provider ID of the resource to lookup.
13
+ * @param opts Optional settings to control the behavior of the CustomResource.
18
14
  */
19
- build: pulumi.Input<string | docker.DockerBuild>;
15
+ static get(name: string, id: pulumi.Input<pulumi.ID>, opts?: pulumi.CustomResourceOptions): Image;
20
16
  /**
21
- * The docker image name to build locally before tagging with imageName. If not provided, it
22
- * will be given the value of to [imageName]. This name can include a tag at the end. If
23
- * provided all pushed image resources will contain that tag as well.
24
- *
25
- * Either [imageName] or [localImageName] can have a tag. However, if both have a tag, then
26
- * those tags must match.
17
+ * Returns true if the given object is an instance of Image. This is designed to work even
18
+ * when multiple copies of the Pulumi SDK have been loaded into the same process.
27
19
  */
28
- localImageName?: pulumi.Input<string>;
20
+ static isInstance(obj: any): obj is Image;
29
21
  /**
30
- * Credentials for the docker registry to push to.
22
+ * The fully qualified image name that was pushed to the registry.
31
23
  */
32
- registry?: pulumi.Input<ImageRegistry>;
24
+ readonly baseImageName: pulumi.Output<string | undefined>;
33
25
  /**
34
- * Skip push flag.
26
+ * The fully qualified image name
35
27
  */
36
- skipPush?: boolean;
37
- }
38
- export interface ImageRegistry {
28
+ readonly imageName: pulumi.Output<string | undefined>;
39
29
  /**
40
- * Docker registry server URL to push to. Some common values include:
41
- * DockerHub: `docker.io` or `https://index.docker.io/v1`
42
- * Azure Container Registry: `<name>.azurecr.io`
43
- * AWS Elastic Container Registry: `<account>.dkr.ecr.us-east-2.amazonaws.com`
44
- * Google Container Registry: `<name>.gcr.io`
30
+ * The URL of the registry server hosting the image.
45
31
  */
46
- server: pulumi.Input<string>;
32
+ readonly registryServer: pulumi.Output<string | undefined>;
47
33
  /**
48
- * Username for login to the target Docker registry.
49
- */
50
- username: pulumi.Input<string>;
51
- /**
52
- * Password for login to the target Docker registry.
34
+ * Create a Image resource with the given unique name, arguments, and options.
35
+ *
36
+ * @param name The _unique_ name of the resource.
37
+ * @param args The arguments to use to populate this resource's properties.
38
+ * @param opts A bag of options that control this resource's behavior.
53
39
  */
54
- password: pulumi.Input<string>;
40
+ constructor(name: string, args: ImageArgs, opts?: pulumi.CustomResourceOptions);
55
41
  }
56
42
  /**
57
- * A docker.Image resource represents a Docker image built locally which is published and made
58
- * available via a remote Docker registry. This can be used to ensure that a Docker source
59
- * directory from a local deployment environment is built and pushed to a cloud-hosted Docker
60
- * registry as part of a Pulumi deployment, so that it can be referenced as an image input from
61
- * other cloud services that reference Docker images - including Kubernetes Pods, AWS ECS Tasks, and
62
- * Azure Container Instances.
43
+ * The set of arguments for constructing a Image resource.
63
44
  */
64
- export declare class Image extends pulumi.ComponentResource {
45
+ export interface ImageArgs {
65
46
  /**
66
- * The base image name that was built and pushed. This does not include the id annotation, so
67
- * is not pinned to the specific build performed by this docker.Image.
47
+ * The Docker build context
68
48
  */
69
- baseImageName: pulumi.Output<string>;
49
+ build?: pulumi.Input<string | inputs.DockerBuild>;
70
50
  /**
71
- * The unique pinned image name on the remote repository.
51
+ * The image name
72
52
  */
73
- imageName: pulumi.Output<string>;
53
+ imageName: pulumi.Input<string>;
74
54
  /**
75
- * The server the image is located at.
55
+ * The registry to push the image to
76
56
  */
77
- registryServer: pulumi.Output<string | undefined>;
78
- /** @deprecated This will have the same value as [imageName], but will be removed in the future. */
79
- id: pulumi.Output<string>;
57
+ registry?: pulumi.Input<inputs.Registry>;
80
58
  /**
81
- * @deprecated This will have the same value as [imageName], but will be removed in the future.
82
- * It can be used to get a unique name for this specific image, but is not the actual repository
83
- * digest value.
59
+ * A flag to skip a registry push.
84
60
  */
85
- digest: pulumi.Output<string | undefined>;
86
- constructor(name: string, args: ImageArgs, opts?: pulumi.ComponentResourceOptions);
61
+ skipPush?: pulumi.Input<boolean>;
87
62
  }
package/image.js CHANGED
@@ -1,93 +1,67 @@
1
1
  "use strict";
2
- // Copyright 2016-2018, Pulumi Corporation.
3
- //
4
- // Licensed under the Apache License, Version 2.0 (the "License");
5
- // you may not use this file except in compliance with the License.
6
- // You may obtain a copy of the License at
7
- //
8
- // http://www.apache.org/licenses/LICENSE-2.0
9
- //
10
- // Unless required by applicable law or agreed to in writing, software
11
- // distributed under the License is distributed on an "AS IS" BASIS,
12
- // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- // See the License for the specific language governing permissions and
14
- // limitations under the License.
15
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
16
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
17
- return new (P || (P = Promise))(function (resolve, reject) {
18
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
19
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
20
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
21
- step((generator = generator.apply(thisArg, _arguments || [])).next());
22
- });
23
- };
2
+ // *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
3
+ // *** Do not edit by hand unless you're certain you know what you are doing! ***
24
4
  Object.defineProperty(exports, "__esModule", { value: true });
25
5
  exports.Image = void 0;
26
6
  const pulumi = require("@pulumi/pulumi");
27
- const docker = require("./docker");
28
- const utils = require("./utils");
7
+ const utilities = require("./utilities");
29
8
  /**
30
- * A docker.Image resource represents a Docker image built locally which is published and made
31
- * available via a remote Docker registry. This can be used to ensure that a Docker source
32
- * directory from a local deployment environment is built and pushed to a cloud-hosted Docker
33
- * registry as part of a Pulumi deployment, so that it can be referenced as an image input from
34
- * other cloud services that reference Docker images - including Kubernetes Pods, AWS ECS Tasks, and
35
- * Azure Container Instances.
9
+ * A real CRUD docker image we hope
36
10
  */
37
- class Image extends pulumi.ComponentResource {
11
+ class Image extends pulumi.CustomResource {
12
+ /**
13
+ * Get an existing Image resource's state with the given name, ID, and optional extra
14
+ * properties used to qualify the lookup.
15
+ *
16
+ * @param name The _unique_ name of the resulting resource.
17
+ * @param id The _unique_ provider ID of the resource to lookup.
18
+ * @param opts Optional settings to control the behavior of the CustomResource.
19
+ */
20
+ static get(name, id, opts) {
21
+ return new Image(name, undefined, Object.assign(Object.assign({}, opts), { id: id }));
22
+ }
23
+ /**
24
+ * Returns true if the given object is an instance of Image. This is designed to work even
25
+ * when multiple copies of the Pulumi SDK have been loaded into the same process.
26
+ */
27
+ static isInstance(obj) {
28
+ if (obj === undefined || obj === null) {
29
+ return false;
30
+ }
31
+ return obj['__pulumiType'] === Image.__pulumiType;
32
+ }
33
+ /**
34
+ * Create a Image resource with the given unique name, arguments, and options.
35
+ *
36
+ * @param name The _unique_ name of the resource.
37
+ * @param args The arguments to use to populate this resource's properties.
38
+ * @param opts A bag of options that control this resource's behavior.
39
+ */
38
40
  constructor(name, args, opts) {
39
- super("docker:image:Image", name, {}, opts);
40
- const imageData = pulumi.output(args).apply((imageArgs) => __awaiter(this, void 0, void 0, function* () {
41
- const imageName = imageArgs.imageName;
42
- // If there is no localImageName set it equal to imageName. Note: this means
43
- // that if imageName contains a tag, localImageName will contain the same tag.
44
- const localImageName = imageArgs.localImageName || imageName;
45
- // Now break both the localImageName and the imageName into the untagged part and the
46
- // optional tag. If both have tags, they must match. If one or the other has a tag, we
47
- // just use that as the tag to use. This allows users to flexibly provide a tag on one
48
- // option or the other and still have it work out.
49
- const { imageName: localImageNameWithoutTag, tag: localImageNameTag } = utils.getImageNameAndTag(localImageName);
50
- const { imageName: imageNameWithoutTag, tag: imageNameTag } = utils.getImageNameAndTag(imageName);
51
- const tag = localImageNameTag || imageNameTag;
52
- checkTag(localImageNameTag);
53
- checkTag(imageNameTag);
54
- // buildAndPushImageAsync expects only the baseImageName to have a tag. So build that
55
- // name appropriately if we were given a tag.
56
- const baseImageName = tag ? `${localImageNameWithoutTag}:${tag}` : localImageName;
57
- // buildAndPushImageAsync does not want the repositoryUrl to have a tag. This is just
58
- // the base url where the images will be pushed to. All tagging will be taken care of
59
- // inside that api.
60
- const repositoryUrl = imageNameWithoutTag;
61
- const registry = imageArgs.registry;
62
- const uniqueTargetName = yield docker.buildAndPushImageAsync(baseImageName, imageArgs.build, repositoryUrl,
63
- /*logResource:*/ this, registry && (() => __awaiter(this, void 0, void 0, function* () {
64
- return {
65
- registry: registry.server,
66
- username: registry.username,
67
- password: registry.password,
68
- };
69
- })), imageArgs.skipPush);
70
- return { uniqueTargetName, registryServer: registry && registry.server };
71
- function checkTag(t) {
72
- if (t && (t !== tag)) {
73
- throw new Error(`[localImageName] and [imageName] had mismatched tags.
74
- ${JSON.stringify(localImageNameTag)} !== ${JSON.stringify(imageNameTag)}`);
75
- }
41
+ var _a;
42
+ let resourceInputs = {};
43
+ opts = opts || {};
44
+ if (!opts.id) {
45
+ if ((!args || args.imageName === undefined) && !opts.urn) {
46
+ throw new Error("Missing required property 'imageName'");
76
47
  }
77
- }));
78
- this.imageName = imageData.uniqueTargetName;
79
- this.id = this.imageName;
80
- this.digest = this.imageName;
81
- this.registryServer = imageData.registryServer;
82
- this.baseImageName = pulumi.output(args.imageName);
83
- this.registerOutputs({
84
- baseImageName: this.baseImageName,
85
- imageName: this.imageName,
86
- id: this.id,
87
- digest: this.digest,
88
- registryServer: this.registryServer,
89
- });
48
+ resourceInputs["build"] = args ? args.build : undefined;
49
+ resourceInputs["imageName"] = args ? args.imageName : undefined;
50
+ resourceInputs["registry"] = args ? args.registry : undefined;
51
+ resourceInputs["skipPush"] = (_a = (args ? args.skipPush : undefined)) !== null && _a !== void 0 ? _a : false;
52
+ resourceInputs["baseImageName"] = undefined /*out*/;
53
+ resourceInputs["registryServer"] = undefined /*out*/;
54
+ }
55
+ else {
56
+ resourceInputs["baseImageName"] = undefined /*out*/;
57
+ resourceInputs["imageName"] = undefined /*out*/;
58
+ resourceInputs["registryServer"] = undefined /*out*/;
59
+ }
60
+ opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
61
+ super(Image.__pulumiType, name, resourceInputs, opts);
90
62
  }
91
63
  }
92
64
  exports.Image = Image;
65
+ /** @internal */
66
+ Image.__pulumiType = 'docker:index/image:Image';
93
67
  //# sourceMappingURL=image.js.map
package/image.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"image.js","sourceRoot":"","sources":["../image.ts"],"names":[],"mappings":";AAAA,2CAA2C;AAC3C,EAAE;AACF,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,iDAAiD;AACjD,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;;;;;;;;;;;;AAEjC,yCAAyC;AACzC,mCAAmC;AACnC,iCAAiC;AAyDjC;;;;;;;GAOG;AACH,MAAa,KAAM,SAAQ,MAAM,CAAC,iBAAiB;IAyB/C,YAAY,IAAY,EAAE,IAAe,EAAE,IAAsC;QAC7E,KAAK,CAAC,oBAAoB,EAAE,IAAI,EAAE,EAAE,EAAE,IAAI,CAAC,CAAC;QAE5C,MAAM,SAAS,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,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AG,SAAS,CAAC,OAAO,CAAC;SACxD;aAAM;YACH,cAAc,CAAC,eAAe,CAAC,GAAG,SAAS,CAAC,OAAO,CAAC;YACpD,cAAc,CAAC,WAAW,CAAC,GAAG,SAAS,CAAC,OAAO,CAAC;YAChD,cAAc,CAAC,gBAAgB,CAAC,GAAG,SAAS,CAAC,OAAO,CAAC;SACxD;QACD,IAAI,GAAG,MAAM,CAAC,YAAY,CAAC,SAAS,CAAC,oBAAoB,EAAE,EAAE,IAAI,CAAC,CAAC;QACnE,KAAK,CAAC,KAAK,CAAC,YAAY,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,CAAC,CAAC;IAC1D,CAAC;;AAnEL,sBAoEC;AAvDG,gBAAgB;AACO,kBAAY,GAAG,0BAA0B,CAAC"}
package/index.d.ts CHANGED
@@ -1,7 +1,6 @@
1
1
  export { ContainerArgs, ContainerState } from "./container";
2
2
  export type Container = import("./container").Container;
3
3
  export declare const Container: typeof import("./container").Container;
4
- export * from "./docker";
5
4
  export { GetLogsArgs, GetLogsResult, GetLogsOutputArgs } from "./getLogs";
6
5
  export declare const getLogs: typeof import("./getLogs").getLogs;
7
6
  export declare const getLogsOutput: typeof import("./getLogs").getLogsOutput;
@@ -17,7 +16,9 @@ export declare const getRegistryImageOutput: typeof import("./getRegistryImage")
17
16
  export { GetRemoteImageArgs, GetRemoteImageResult, GetRemoteImageOutputArgs } from "./getRemoteImage";
18
17
  export declare const getRemoteImage: typeof import("./getRemoteImage").getRemoteImage;
19
18
  export declare const getRemoteImageOutput: typeof import("./getRemoteImage").getRemoteImageOutput;
20
- export * from "./image";
19
+ export { ImageArgs } from "./image";
20
+ export type Image = import("./image").Image;
21
+ export declare const Image: typeof import("./image").Image;
21
22
  export { NetworkArgs, NetworkState } from "./network";
22
23
  export type Network = import("./network").Network;
23
24
  export declare const Network: typeof import("./network").Network;
@@ -45,7 +46,6 @@ export declare const ServiceConfig: typeof import("./serviceConfig").ServiceConf
45
46
  export { TagArgs, TagState } from "./tag";
46
47
  export type Tag = import("./tag").Tag;
47
48
  export declare const Tag: typeof import("./tag").Tag;
48
- export * from "./utils";
49
49
  export { VolumeArgs, VolumeState } from "./volume";
50
50
  export type Volume = import("./volume").Volume;
51
51
  export declare const Volume: typeof import("./volume").Volume;
package/index.js CHANGED
@@ -1,27 +1,12 @@
1
1
  "use strict";
2
2
  // *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
3
3
  // *** Do not edit by hand unless you're certain you know what you are doing! ***
4
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
5
- if (k2 === undefined) k2 = k;
6
- var desc = Object.getOwnPropertyDescriptor(m, k);
7
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
8
- desc = { enumerable: true, get: function() { return m[k]; } };
9
- }
10
- Object.defineProperty(o, k2, desc);
11
- }) : (function(o, m, k, k2) {
12
- if (k2 === undefined) k2 = k;
13
- o[k2] = m[k];
14
- }));
15
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
16
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
17
- };
18
4
  Object.defineProperty(exports, "__esModule", { value: true });
19
- exports.types = exports.config = exports.Volume = exports.Tag = exports.ServiceConfig = exports.Service = exports.Secret = exports.RemoteImage = exports.RegistryImage = exports.Provider = exports.Plugin = exports.Network = exports.getRemoteImageOutput = exports.getRemoteImage = exports.getRegistryImageOutput = exports.getRegistryImage = exports.getPluginOutput = exports.getPlugin = exports.getNetworkOutput = exports.getNetwork = exports.getLogsOutput = exports.getLogs = exports.Container = void 0;
5
+ exports.types = exports.config = exports.Volume = exports.Tag = exports.ServiceConfig = exports.Service = exports.Secret = exports.RemoteImage = exports.RegistryImage = exports.Provider = exports.Plugin = exports.Network = exports.Image = exports.getRemoteImageOutput = exports.getRemoteImage = exports.getRegistryImageOutput = exports.getRegistryImage = exports.getPluginOutput = exports.getPlugin = exports.getNetworkOutput = exports.getNetwork = exports.getLogsOutput = exports.getLogs = exports.Container = void 0;
20
6
  const pulumi = require("@pulumi/pulumi");
21
7
  const utilities = require("./utilities");
22
8
  exports.Container = null;
23
9
  utilities.lazyLoad(exports, ["Container"], () => require("./container"));
24
- __exportStar(require("./docker"), exports);
25
10
  exports.getLogs = null;
26
11
  exports.getLogsOutput = null;
27
12
  utilities.lazyLoad(exports, ["getLogs", "getLogsOutput"], () => require("./getLogs"));
@@ -37,7 +22,8 @@ utilities.lazyLoad(exports, ["getRegistryImage", "getRegistryImageOutput"], () =
37
22
  exports.getRemoteImage = null;
38
23
  exports.getRemoteImageOutput = null;
39
24
  utilities.lazyLoad(exports, ["getRemoteImage", "getRemoteImageOutput"], () => require("./getRemoteImage"));
40
- __exportStar(require("./image"), exports);
25
+ exports.Image = null;
26
+ utilities.lazyLoad(exports, ["Image"], () => require("./image"));
41
27
  exports.Network = null;
42
28
  utilities.lazyLoad(exports, ["Network"], () => require("./network"));
43
29
  exports.Plugin = null;
@@ -56,7 +42,6 @@ exports.ServiceConfig = null;
56
42
  utilities.lazyLoad(exports, ["ServiceConfig"], () => require("./serviceConfig"));
57
43
  exports.Tag = null;
58
44
  utilities.lazyLoad(exports, ["Tag"], () => require("./tag"));
59
- __exportStar(require("./utils"), exports);
60
45
  exports.Volume = null;
61
46
  utilities.lazyLoad(exports, ["Volume"], () => require("./volume"));
62
47
  // Export sub-modules:
@@ -70,6 +55,8 @@ const _module = {
70
55
  switch (type) {
71
56
  case "docker:index/container:Container":
72
57
  return new exports.Container(name, undefined, { urn });
58
+ case "docker:index/image:Image":
59
+ return new exports.Image(name, undefined, { urn });
73
60
  case "docker:index/network:Network":
74
61
  return new exports.Network(name, undefined, { urn });
75
62
  case "docker:index/plugin:Plugin":
@@ -94,6 +81,7 @@ const _module = {
94
81
  },
95
82
  };
96
83
  pulumi.runtime.registerResourceModule("docker", "index/container", _module);
84
+ pulumi.runtime.registerResourceModule("docker", "index/image", _module);
97
85
  pulumi.runtime.registerResourceModule("docker", "index/network", _module);
98
86
  pulumi.runtime.registerResourceModule("docker", "index/plugin", _module);
99
87
  pulumi.runtime.registerResourceModule("docker", "index/registryImage", _module);
package/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":";AAAA,wFAAwF;AACxF,iFAAiF;;;;;;;;;;;;;;;;;AAEjF,yCAAyC;AACzC,yCAAyC;AAK5B,QAAA,SAAS,GAA2C,IAAW,CAAC;AAC7E,SAAS,CAAC,QAAQ,CAAC,OAAO,EAAE,CAAC,WAAW,CAAC,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC,CAAC;AAEzE,2CAAyB;AAEZ,QAAA,OAAO,GAAuC,IAAW,CAAC;AAC1D,QAAA,aAAa,GAA6C,IAAW,CAAC;AACnF,SAAS,CAAC,QAAQ,CAAC,OAAO,EAAE,CAAC,SAAS,EAAC,eAAe,CAAC,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC;AAGxE,QAAA,UAAU,GAA6C,IAAW,CAAC;AACnE,QAAA,gBAAgB,GAAmD,IAAW,CAAC;AAC5F,SAAS,CAAC,QAAQ,CAAC,OAAO,EAAE,CAAC,YAAY,EAAC,kBAAkB,CAAC,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,cAAc,CAAC,CAAC,CAAC;AAGjF,QAAA,SAAS,GAA2C,IAAW,CAAC;AAChE,QAAA,eAAe,GAAiD,IAAW,CAAC;AACzF,SAAS,CAAC,QAAQ,CAAC,OAAO,EAAE,CAAC,WAAW,EAAC,iBAAiB,CAAC,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC,CAAC;AAG9E,QAAA,gBAAgB,GAAyD,IAAW,CAAC;AACrF,QAAA,sBAAsB,GAA+D,IAAW,CAAC;AAC9G,SAAS,CAAC,QAAQ,CAAC,OAAO,EAAE,CAAC,kBAAkB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AC,QAAQ,EAAE,cAAc,EAAE,OAAO,CAAC,CAAA;AACxE,MAAM,CAAC,OAAO,CAAC,sBAAsB,CAAC,QAAQ,EAAE,eAAe,EAAE,OAAO,CAAC,CAAA;AACzE,MAAM,CAAC,OAAO,CAAC,sBAAsB,CAAC,QAAQ,EAAE,qBAAqB,EAAE,OAAO,CAAC,CAAA;AAC/E,MAAM,CAAC,OAAO,CAAC,sBAAsB,CAAC,QAAQ,EAAE,WAAW,EAAE,OAAO,CAAC,CAAA;AACrE,MAAM,CAAC,OAAO,CAAC,sBAAsB,CAAC,QAAQ,EAAE,cAAc,EAAE,OAAO,CAAC,CAAA;AACxE,MAAM,CAAC,OAAO,CAAC,uBAAuB,CAAC,QAAQ,EAAE;IAC7C,OAAO,EAAE,SAAS,CAAC,UAAU,EAAE;IAC/B,iBAAiB,EAAE,CAAC,IAAY,EAAE,IAAY,EAAE,GAAW,EAA2B,EAAE;QACpF,IAAI,IAAI,KAAK,yBAAyB,EAAE;YACpC,MAAM,IAAI,KAAK,CAAC,yBAAyB,IAAI,EAAE,CAAC,CAAC;SACpD;QACD,OAAO,IAAI,gBAAQ,CAAC,IAAI,EAAO,SAAS,EAAE,EAAE,GAAG,EAAE,CAAC,CAAC;IACvD,CAAC;CACJ,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pulumi/docker",
3
- "version": "v3.6.1",
3
+ "version": "v3.7.0-alpha.1668812666+d58ed380",
4
4
  "description": "A Pulumi package for interacting with Docker in Pulumi programs",
5
5
  "keywords": [
6
6
  "pulumi",
@@ -11,7 +11,7 @@
11
11
  "license": "Apache-2.0",
12
12
  "scripts": {
13
13
  "build": "tsc",
14
- "install": "node scripts/install-pulumi-plugin.js resource docker v3.6.1"
14
+ "install": "node scripts/install-pulumi-plugin.js resource docker v3.7.0-alpha.1668812666+d58ed380"
15
15
  },
16
16
  "dependencies": {
17
17
  "@pulumi/pulumi": "^3.0.0",
package/package.json.dev CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pulumi/docker",
3
- "version": "v3.6.1",
3
+ "version": "v3.7.0-alpha.1668812666+d58ed380",
4
4
  "description": "A Pulumi package for interacting with Docker in Pulumi programs",
5
5
  "keywords": [
6
6
  "pulumi",
@@ -11,7 +11,7 @@
11
11
  "license": "Apache-2.0",
12
12
  "scripts": {
13
13
  "build": "tsc",
14
- "install": "node scripts/install-pulumi-plugin.js resource docker v3.6.1"
14
+ "install": "node scripts/install-pulumi-plugin.js resource docker v3.7.0-alpha.1668812666+d58ed380"
15
15
  },
16
16
  "dependencies": {
17
17
  "@pulumi/pulumi": "^3.0.0",
package/types/input.d.ts CHANGED
@@ -1,5 +1,14 @@
1
1
  import * as pulumi from "@pulumi/pulumi";
2
2
  import * as inputs from "../types/input";
3
+ /**
4
+ * Specifies information about where to obtain a cache
5
+ */
6
+ export interface CacheFrom {
7
+ /**
8
+ * A list of cached build stages
9
+ */
10
+ stages?: pulumi.Input<pulumi.Input<string>[]>;
11
+ }
3
12
  export interface ContainerCapabilities {
4
13
  /**
5
14
  * List of linux capabilities to add.
@@ -243,6 +252,47 @@ export interface ContainerVolume {
243
252
  */
244
253
  volumeName?: pulumi.Input<string>;
245
254
  }
255
+ /**
256
+ * The Docker build context
257
+ */
258
+ export interface DockerBuild {
259
+ /**
260
+ * An optional map of named build-time argument variables to set during the Docker build. This flag allows you to pass built-time variablesthat can be accessed like environment variables inside the RUN instruction.
261
+ */
262
+ args?: pulumi.Input<{
263
+ [key: string]: pulumi.Input<string>;
264
+ }>;
265
+ /**
266
+ * A cached image or list of build stages to use as build cache
267
+ */
268
+ cacheFrom?: pulumi.Input<boolean | inputs.CacheFrom>;
269
+ /**
270
+ * The path to the build context to use.
271
+ */
272
+ context?: pulumi.Input<string>;
273
+ /**
274
+ * The path to the Dockerfile to use.
275
+ */
276
+ dockerfile?: pulumi.Input<string>;
277
+ /**
278
+ * Environment variables to set on the invocation of docker build, for example to support DOCKER_BUILDKIT=1 docker build.
279
+ */
280
+ env?: pulumi.Input<{
281
+ [key: string]: pulumi.Input<string>;
282
+ }>;
283
+ /**
284
+ * A bag of extra options to pass on to the docker SDK.
285
+ */
286
+ extraOptions?: pulumi.Input<pulumi.Input<string>[]>;
287
+ /**
288
+ * The target of the Dockerfile to build
289
+ */
290
+ target?: pulumi.Input<string>;
291
+ }
292
+ /**
293
+ * dockerBuildProvideDefaults sets the appropriate defaults for DockerBuild
294
+ */
295
+ export declare function dockerBuildProvideDefaults(val: DockerBuild): DockerBuild;
246
296
  export interface NetworkIpamConfig {
247
297
  /**
248
298
  * Auxiliary IPv4 or IPv6 addresses used by Network driver
@@ -290,6 +340,23 @@ export interface ProviderRegistryAuth {
290
340
  password?: pulumi.Input<string>;
291
341
  username?: pulumi.Input<string>;
292
342
  }
343
+ /**
344
+ * Describes a Docker container registry
345
+ */
346
+ export interface Registry {
347
+ /**
348
+ * The password to authenticate to the registry
349
+ */
350
+ password: pulumi.Input<string>;
351
+ /**
352
+ * The URL of the Docker registry server
353
+ */
354
+ server: pulumi.Input<string>;
355
+ /**
356
+ * The username to authenticate to the registry
357
+ */
358
+ username: pulumi.Input<string>;
359
+ }
293
360
  export interface RegistryImageBuild {
294
361
  /**
295
362
  * The configuration for the authentication
package/types/input.js CHANGED
@@ -2,4 +2,13 @@
2
2
  // *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
3
3
  // *** Do not edit by hand unless you're certain you know what you are doing! ***
4
4
  Object.defineProperty(exports, "__esModule", { value: true });
5
+ exports.dockerBuildProvideDefaults = void 0;
6
+ /**
7
+ * dockerBuildProvideDefaults sets the appropriate defaults for DockerBuild
8
+ */
9
+ function dockerBuildProvideDefaults(val) {
10
+ var _a, _b;
11
+ return Object.assign(Object.assign({}, val), { context: (_a = (val.context)) !== null && _a !== void 0 ? _a : ".", dockerfile: (_b = (val.dockerfile)) !== null && _b !== void 0 ? _b : "Dockerfile" });
12
+ }
13
+ exports.dockerBuildProvideDefaults = dockerBuildProvideDefaults;
5
14
  //# sourceMappingURL=input.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"input.js","sourceRoot":"","sources":["../../types/input.ts"],"names":[],"mappings":";AAAA,wFAAwF;AACxF,iFAAiF"}
1
+ {"version":3,"file":"input.js","sourceRoot":"","sources":["../../types/input.ts"],"names":[],"mappings":";AAAA,wFAAwF;AACxF,iFAAiF;;;AAoTjF;;GAEG;AACH,SAAgB,0BAA0B,CAAC,GAAgB;;IACvD,uCACO,GAAG,KACN,OAAO,EAAE,MAAA,CAAC,GAAG,CAAC,OAAO,CAAC,mCAAI,GAAG,EAC7B,UAAU,EAAE,MAAA,CAAC,GAAG,CAAC,UAAU,CAAC,mCAAI,YAAY,IAC9C;AACN,CAAC;AAND,gEAMC"}
package/docker.d.ts DELETED
@@ -1,77 +0,0 @@
1
- import * as pulumi from "@pulumi/pulumi";
2
- export interface Registry {
3
- registry: pulumi.Input<string>;
4
- username: pulumi.Input<string>;
5
- password: pulumi.Input<string>;
6
- }
7
- /**
8
- * CacheFrom may be used to specify build stages to use for the Docker build cache. The final image
9
- * is always implicitly included.
10
- */
11
- export interface CacheFrom {
12
- /**
13
- * An optional list of build stages to use for caching. Each build stage in this list will be
14
- * built explicitly and pushed to the target repository. A given stage's image will be tagged as
15
- * "[stage-name]".
16
- */
17
- stages?: pulumi.Input<pulumi.Input<string>[]>;
18
- }
19
- /**
20
- * DockerBuild may be used to specify detailed instructions about how to build a container.
21
- */
22
- export interface DockerBuild {
23
- /**
24
- * context is a path to a directory to use for the Docker build context, usually the directory
25
- * in which the Dockerfile resides (although dockerfile may be used to choose a custom location
26
- * independent of this choice). If not specified, the context defaults to the current working
27
- * directory; if a relative path is used, it is relative to the current working directory that
28
- * Pulumi is evaluating.
29
- */
30
- context?: pulumi.Input<string>;
31
- /**
32
- * dockerfile may be used to override the default Dockerfile name and/or location. By default,
33
- * it is assumed to be a file named Dockerfile in the root of the build context.
34
- */
35
- dockerfile?: pulumi.Input<string>;
36
- /**
37
- * An optional map of named build-time argument variables to set during the Docker build. This
38
- * flag allows you to pass built-time variables that can be accessed like environment variables
39
- * inside the `RUN` instruction.
40
- */
41
- args?: pulumi.Input<Record<string, pulumi.Input<string>>>;
42
- /**
43
- * An optional CacheFrom object with information about the build stages to use for the Docker
44
- * build cache. This parameter maps to the --cache-from argument to the Docker CLI. If this
45
- * parameter is `true`, only the final image will be pulled and passed to --cache-from; if it is
46
- * a CacheFrom object, the stages named therein will also be pulled and passed to --cache-from.
47
- */
48
- cacheFrom?: pulumi.Input<boolean | CacheFrom>;
49
- /**
50
- * An optional catch-all list of arguments to provide extra CLI options to the docker build command. For
51
- * example `['--network', 'host']`.
52
- */
53
- extraOptions?: pulumi.Input<pulumi.Input<string>[]>;
54
- /**
55
- * Environment variables to set on the invocation of `docker build`, for example to support
56
- * `DOCKER_BUILDKIT=1 docker build`.
57
- */
58
- env?: Record<string, string>;
59
- /***
60
- * The target of the dockerfile to build
61
- */
62
- target?: pulumi.Input<string>;
63
- }
64
- /**
65
- * @deprecated Use [buildAndPushImage] instead. This function loses the Output resource tracking
66
- * information from [pathOrBuild] and [repositoryUrl]. [buildAndPushImage] properly keeps track of
67
- * this in the result.
68
- */
69
- export declare function buildAndPushImageAsync(baseImageName: string, pathOrBuild: pulumi.Input<string | DockerBuild>, repositoryUrl: pulumi.Input<string>, logResource: pulumi.Resource, connectToRegistry?: () => pulumi.Input<Registry>, skipPush?: boolean): Promise<string>;
70
- /**
71
- * buildAndPushImage will build and push the Dockerfile and context from [pathOrBuild] into the
72
- * requested docker repo [repositoryUrl]. It returns the unique target image name for the image in
73
- * the docker repository. During preview this will build the image, and return the target image
74
- * name, without pushing. During a normal update, it will do the same, as well as tag and push the
75
- * image.
76
- */
77
- export declare function buildAndPushImage(imageName: string, pathOrBuild: pulumi.Input<string | DockerBuild>, repositoryUrl: pulumi.Input<string>, logResource: pulumi.Resource, connectToRegistry?: () => pulumi.Input<Registry>, skipPush?: boolean): pulumi.Output<string>;
package/docker.js DELETED
@@ -1,524 +0,0 @@
1
- "use strict";
2
- // Copyright 2016-2018, Pulumi Corporation.
3
- //
4
- // Licensed under the Apache License, Version 2.0 (the "License");
5
- // you may not use this file except in compliance with the License.
6
- // You may obtain a copy of the License at
7
- //
8
- // http://www.apache.org/licenses/LICENSE-2.0
9
- //
10
- // Unless required by applicable law or agreed to in writing, software
11
- // distributed under the License is distributed on an "AS IS" BASIS,
12
- // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- // See the License for the specific language governing permissions and
14
- // limitations under the License.
15
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
16
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
17
- return new (P || (P = Promise))(function (resolve, reject) {
18
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
19
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
20
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
21
- step((generator = generator.apply(thisArg, _arguments || [])).next());
22
- });
23
- };
24
- Object.defineProperty(exports, "__esModule", { value: true });
25
- exports.checkRepositoryUrl = exports.buildAndPushImage = exports.buildAndPushImageAsync = void 0;
26
- const pulumi = require("@pulumi/pulumi");
27
- const errors_1 = require("@pulumi/pulumi/errors");
28
- const utils = require("./utils");
29
- const child_process = require("child_process");
30
- const readline = require("readline");
31
- const semver = require("semver");
32
- let dockerPasswordPromise;
33
- function useDockerPasswordStdin(logResource) {
34
- if (!dockerPasswordPromise) {
35
- dockerPasswordPromise = useDockerPasswordStdinWorker();
36
- }
37
- return dockerPasswordPromise;
38
- function useDockerPasswordStdinWorker() {
39
- return __awaiter(this, void 0, void 0, function* () {
40
- // Verify that 'docker' is on the PATH and get the client/server versions
41
- let dockerVersionString;
42
- try {
43
- dockerVersionString = yield runCommandThatMustSucceed("docker", ["version", "-f", "{{json .}}"], logResource);
44
- // IDEA: In the future we could warn here on out-of-date versions of Docker which may not support key
45
- // features we want to use.
46
- pulumi.log.debug(`'docker version' => ${dockerVersionString}`, logResource);
47
- }
48
- catch (err) {
49
- throw new errors_1.ResourceError("No 'docker' command available on PATH: Please install to use container 'build' mode.", logResource);
50
- }
51
- // Decide whether to use --password or --password-stdin based on the client version.
52
- try {
53
- const versionData = JSON.parse(dockerVersionString);
54
- const clientVersion = versionData.Client.Version;
55
- return semver.gte(clientVersion, "17.07.0", true);
56
- }
57
- catch (err) {
58
- pulumi.log.info(`Could not process Docker version (${err})`, logResource);
59
- }
60
- return false;
61
- });
62
- }
63
- }
64
- /**
65
- * @deprecated Use [buildAndPushImage] instead. This function loses the Output resource tracking
66
- * information from [pathOrBuild] and [repositoryUrl]. [buildAndPushImage] properly keeps track of
67
- * this in the result.
68
- */
69
- function buildAndPushImageAsync(baseImageName, pathOrBuild, repositoryUrl, logResource, connectToRegistry, skipPush = false) {
70
- const output = buildAndPushImage(baseImageName, pathOrBuild, repositoryUrl, logResource, connectToRegistry, skipPush);
71
- // Ugly, but necessary to bridge between the proper Output-returning function and this
72
- // Promise-returning one.
73
- return output.promise();
74
- }
75
- exports.buildAndPushImageAsync = buildAndPushImageAsync;
76
- /**
77
- * buildAndPushImage will build and push the Dockerfile and context from [pathOrBuild] into the
78
- * requested docker repo [repositoryUrl]. It returns the unique target image name for the image in
79
- * the docker repository. During preview this will build the image, and return the target image
80
- * name, without pushing. During a normal update, it will do the same, as well as tag and push the
81
- * image.
82
- */
83
- function buildAndPushImage(imageName, pathOrBuild, repositoryUrl, logResource, connectToRegistry, skipPush = false) {
84
- return pulumi.all([pathOrBuild, repositoryUrl])
85
- .apply(([pathOrBuildVal, repositoryUrlVal]) => __awaiter(this, void 0, void 0, function* () {
86
- // Give an initial message indicating what we're about to do. That way, if anything
87
- // takes a while, the user has an idea about what's going on.
88
- logDebug("Starting docker build and push...", logResource);
89
- const result = yield buildAndPushImageWorkerAsync(imageName, pathOrBuildVal, repositoryUrlVal, logResource, connectToRegistry, skipPush);
90
- // If we got here, then building/pushing didn't throw any errors. Update the status bar
91
- // indicating that things worked properly. That way, the info bar isn't stuck showing the very
92
- // last thing printed by some subcommand we launched.
93
- logDebug("Successfully pushed to docker", logResource);
94
- return result;
95
- }));
96
- }
97
- exports.buildAndPushImage = buildAndPushImage;
98
- function logEphemeral(message, logResource) {
99
- pulumi.log.info(message, logResource, /*streamId:*/ undefined, /*ephemeral:*/ true);
100
- }
101
- function logDebug(message, logResource) {
102
- pulumi.log.debug(message, logResource, /*streamId:*/ undefined, /*ephemeral:*/ true);
103
- }
104
- /** @internal for testing purposes */
105
- function checkRepositoryUrl(repositoryUrl) {
106
- const { tag } = utils.getImageNameAndTag(repositoryUrl);
107
- // We want to report an advisory error to users so that they don't accidentally include a 'tag'
108
- // in the repo url they supply. i.e. their repo url can be:
109
- //
110
- // docker.mycompany.com/namespace/myimage
111
- //
112
- // but should not be:
113
- //
114
- // docker.mycompany.com/namespace/myimage:latest
115
- //
116
- // We could consider removing this check entirely. However, it is likely valuable to catch
117
- // clear mistakes where a tag was included in a repo url inappropriately.
118
- //
119
- // However, since we do have the check, we need to ensure that we do allow the user to specify
120
- // a *port* on their repository that the are communicating with. i.e. it's fine to have:
121
- //
122
- // docker.mycompany.com:5000 or
123
- // docker.mycompany.com:5000/namespace/myimage
124
- //
125
- // So check if this actually does look like a port, and don't report an error in that case.
126
- //
127
- // From: https://www.w3.org/Addressing/URL/url-spec.txt
128
- //
129
- // port digits
130
- //
131
- // Regex = any number of digits, optionally followed by / and any remainder.
132
- if (tag && !/^\d+(\/.*)?/g.test(tag)) {
133
- throw new Error(`[repositoryUrl] should not contain a tag: ${tag}`);
134
- }
135
- }
136
- exports.checkRepositoryUrl = checkRepositoryUrl;
137
- function buildAndPushImageWorkerAsync(baseImageName, pathOrBuild, repositoryUrl, logResource, connectToRegistry, skipPush) {
138
- return __awaiter(this, void 0, void 0, function* () {
139
- checkRepositoryUrl(repositoryUrl);
140
- const tag = utils.getImageNameAndTag(baseImageName).tag;
141
- // login immediately if we're going to have to actually communicate with a remote registry.
142
- //
143
- // We know we have to login if:
144
- //
145
- // 1. We're doing an update. In that case, we'll always want to login so we can push our
146
- // images to the remote registry.
147
- //
148
- // 2. We're in preview or update and the build information contains 'cache from' information. In
149
- // that case, we'll want want to pull from the registry and will need to login for that.
150
- //
151
- // Logging in immediately also helps us side-step a strange issue we've seen downstream where
152
- // Node can be unhappy if we try to call connectToRegistry (which may end up calling deasync'ed
153
- // invoke calls) *after* we've spawned some calls to docker builds. Front-loading this step
154
- // seems to avoid all those issues.
155
- const pullFromCache = typeof pathOrBuild !== "string" && pathOrBuild && pathOrBuild.cacheFrom && !!repositoryUrl;
156
- // If no `connectToRegistry` function was passed in we simply assume docker is already
157
- // logged-in to the correct registry (or uses auto-login via credential helpers).
158
- if (connectToRegistry) {
159
- if (!pulumi.runtime.isDryRun() || pullFromCache) {
160
- logDebug("Logging in to registry...", logResource);
161
- const registryOutput = pulumi.output(connectToRegistry());
162
- const registry = yield registryOutput.promise();
163
- yield loginToRegistry(registry, logResource);
164
- }
165
- }
166
- // If the container specified a cacheFrom parameter, first set up the cached stages.
167
- let cacheFrom = [];
168
- if (pullFromCache) {
169
- const dockerBuild = pathOrBuild;
170
- const cacheFromParam = (typeof dockerBuild.cacheFrom === "boolean" ? {} : dockerBuild.cacheFrom) || {};
171
- cacheFrom = yield pullCacheAsync(baseImageName, cacheFromParam, repositoryUrl, logResource);
172
- }
173
- // Next, build the image.
174
- logEphemeral(`Building image '${typeof pathOrBuild == "string" ? pathOrBuild : pathOrBuild.context || "."}'...`, logResource);
175
- const { imageId, stages } = yield buildImageAsync(baseImageName, pathOrBuild, logResource, cacheFrom);
176
- logEphemeral("Image build succeeded.", logResource);
177
- // Generate a name that uniquely will identify this built image. This is similar in purpose to
178
- // the name@digest form that can be normally be retrieved from a docker repository. However,
179
- // this tag doesn't require actually pushing the image, nor does it require communicating with
180
- // some external system, making it suitable for unique identification, even during preview.
181
- // This also means that if docker produces a new imageId, we'll get a new name here, ensuring that
182
- // resources (like docker.Image and cloud.Service) will be appropriately replaced.
183
- const uniqueTaggedImageName = createTaggedImageName(repositoryUrl, tag, imageId);
184
- // Use those to push the image. Then just return the unique target name. as the final result
185
- // for our caller to use. Only push the image during an update, do not push during a preview.
186
- if (!pulumi.runtime.isDryRun() && !skipPush) {
187
- // Push the final image first, then push the stage images to use for caching.
188
- logEphemeral(`Pushing image '${baseImageName}'...`, logResource);
189
- // First, push with both the optionally-requested-tag *and* imageId (which is guaranteed to
190
- // be defined). By using the imageId we give the image a fully unique location that we can
191
- // successfully pull regardless of whatever else has happened at this repositoryUrl.
192
- // Next, push only with the optionally-requested-tag. Users of this API still want to get a
193
- // nice and simple url that they can reach this image at, without having the explicit imageId
194
- // hash added to it. Note: this location is not guaranteed to be idempotent. For example,
195
- // pushes on other machines might overwrite that location.
196
- yield tagAndPushImageAsync(baseImageName, repositoryUrl, tag, imageId, logResource);
197
- yield tagAndPushImageAsync(baseImageName, repositoryUrl, tag, /*imageId:*/ undefined, logResource);
198
- for (const stage of stages) {
199
- yield tagAndPushImageAsync(localStageImageName(baseImageName, stage), repositoryUrl, stage, /*imageId:*/ undefined, logResource);
200
- }
201
- logEphemeral("Image push succeeded.", logResource);
202
- }
203
- return uniqueTaggedImageName;
204
- });
205
- }
206
- function localStageImageName(imageName, stage) {
207
- return `${imageName}-${stage}`;
208
- }
209
- function createTaggedImageName(repositoryUrl, tag, imageId) {
210
- const pieces = [];
211
- if (tag) {
212
- pieces.push(tag);
213
- }
214
- if (imageId) {
215
- pieces.push(imageId);
216
- }
217
- // Note: we don't do any validation that the tag is well formed, as per:
218
- // https://docs.docker.com/engine/reference/commandline/tag
219
- //
220
- // If there are any issues with it, we'll just let docker report the problem.
221
- const fullTag = pieces.join("-");
222
- return fullTag ? `${repositoryUrl}:${fullTag}` : repositoryUrl;
223
- }
224
- function pullCacheAsync(imageName, cacheFrom, repoUrl, logResource) {
225
- return __awaiter(this, void 0, void 0, function* () {
226
- // Ensure that we have a repository URL. If we don't, we won't be able to pull anything.
227
- if (!repoUrl) {
228
- return [];
229
- }
230
- pulumi.log.debug(`pulling cache for ${imageName} from ${repoUrl}`, logResource);
231
- const cacheFromImages = [];
232
- const stages = (cacheFrom.stages || []).concat([""]);
233
- for (const stage of stages) {
234
- const tag = stage ? `:${stage}` : "";
235
- const image = `${repoUrl}${tag}`;
236
- // Try to pull the existing image if it exists. This may fail if the image does not exist.
237
- // That's fine, just move onto the next stage. Also, pass along a flag saying that we
238
- // should print that error as a warning instead. We don't want the update to succeed but
239
- // the user to then get a nasty "error:" message at the end.
240
- const { code } = yield runCommandThatCanFail("docker", ["pull", image], logResource,
241
- /*reportFullCommand:*/ true, /*reportErrorAsWarning:*/ true);
242
- if (code) {
243
- continue;
244
- }
245
- cacheFromImages.push(image);
246
- }
247
- return cacheFromImages;
248
- });
249
- }
250
- function buildImageAsync(imageName, pathOrBuild, logResource, cacheFrom) {
251
- return __awaiter(this, void 0, void 0, function* () {
252
- let build;
253
- if (typeof pathOrBuild === "string") {
254
- build = {
255
- context: pathOrBuild,
256
- };
257
- }
258
- else if (pathOrBuild) {
259
- build = pathOrBuild;
260
- }
261
- else {
262
- throw new errors_1.ResourceError(`Cannot build a container with an empty build specification`, logResource);
263
- }
264
- // If the build context is missing, default it to the working directory.
265
- if (!build.context) {
266
- build.context = ".";
267
- }
268
- logDebug(`Building container image '${imageName}': context=${build.context}` +
269
- (build.dockerfile ? `, dockerfile=${build.dockerfile}` : "") +
270
- (build.args ? `, args=${JSON.stringify(build.args)}` : "") +
271
- (build.target ? `, target=${build.target}` : ""), logResource);
272
- // If the container build specified build stages to cache, build each in turn.
273
- const stages = [];
274
- if (build.cacheFrom && typeof build.cacheFrom !== "boolean" && build.cacheFrom.stages) {
275
- for (const stage of build.cacheFrom.stages) {
276
- yield dockerBuild(localStageImageName(imageName, stage), build, cacheFrom, logResource, stage);
277
- stages.push(stage);
278
- }
279
- }
280
- // Invoke Docker CLI commands to build.
281
- yield dockerBuild(imageName, build, cacheFrom, logResource);
282
- // Finally, inspect the image so we can return the SHA digest. Do not forward the output of this
283
- // command this to the CLI to show the user.
284
- const inspectResult = yield runCommandThatMustSucceed("docker", ["image", "inspect", "-f", "{{.Id}}", imageName], logResource);
285
- if (!inspectResult) {
286
- throw new errors_1.ResourceError(`No digest available for image ${imageName}`, logResource);
287
- }
288
- // From https://docs.docker.com/registry/spec/api/#content-digests
289
- //
290
- // the image id will be a "algorithm:hex" pair. We don't care about the algorithm part. All we
291
- // want is the unique portion we can use elsewhere. Since we are also going to place this in an
292
- // image tag, we also don't want the colon, as that's not legal there. So simply grab the hex
293
- // portion after the colon and return that.
294
- let imageId = inspectResult.trim();
295
- const colonIndex = imageId.lastIndexOf(":");
296
- imageId = colonIndex < 0 ? imageId : imageId.substr(colonIndex + 1);
297
- return { imageId, stages };
298
- });
299
- }
300
- function dockerBuild(imageName, build, cacheFrom, logResource, target) {
301
- return __awaiter(this, void 0, void 0, function* () {
302
- // Prepare the build arguments.
303
- const buildArgs = ["build"];
304
- if (build.dockerfile) {
305
- buildArgs.push(...["-f", build.dockerfile]); // add a custom Dockerfile location.
306
- }
307
- if (build.args) {
308
- for (const arg of Object.keys(build.args)) {
309
- buildArgs.push(...["--build-arg", `${arg}=${build.args[arg]}`]);
310
- }
311
- }
312
- if (build.target) {
313
- buildArgs.push(...["--target", build.target]);
314
- }
315
- if (cacheFrom.length) {
316
- buildArgs.push(...["--cache-from", cacheFrom.join()]);
317
- }
318
- if (build.extraOptions) {
319
- buildArgs.push(...build.extraOptions);
320
- }
321
- buildArgs.push(build.context); // push the docker build context onto the path.
322
- buildArgs.push(...["-t", imageName]); // tag the image with the chosen name.
323
- if (target) {
324
- buildArgs.push(...["--target", target]);
325
- }
326
- yield runCommandThatMustSucceed("docker", buildArgs, logResource, undefined, undefined, build.env);
327
- });
328
- }
329
- // Keep track of registries and users that have been logged in. If we've already logged into that
330
- // registry with that user, there's no need to do it again.
331
- const loginResults = [];
332
- function loginToRegistry(registry, logResource) {
333
- const { registry: registryName, username, password } = registry;
334
- // See if we've issued an outstanding requests to login into this registry. If so, just
335
- // await the results of that login request. Otherwise, create a new request and keep it
336
- // around so that future login requests will see it.
337
- let loginResult = loginResults.find(r => r.registryName === registryName && r.username === username);
338
- if (!loginResult) {
339
- // Note: we explicitly do not 'await' the 'loginAsync' call here. We do not want
340
- // to relinquish control of this thread-of-execution yet. We want to ensure that
341
- // we first update `loginResults` with our record object so that any future executions
342
- // through this method see that the login was kicked off and can wait on that.
343
- loginResult = { registryName, username, loginCommand: loginAsync() };
344
- loginResults.push(loginResult);
345
- }
346
- else {
347
- logDebug(`Reusing existing login for ${username}@${registryName}`, logResource);
348
- }
349
- return loginResult.loginCommand;
350
- function loginAsync() {
351
- return __awaiter(this, void 0, void 0, function* () {
352
- const dockerPasswordStdin = yield useDockerPasswordStdin(logResource);
353
- // pass 'reportFullCommandLine: false' here so that if we fail to login we don't emit the
354
- // username/password in our logs. Instead, we'll just say "'docker login' failed with code ..."
355
- if (dockerPasswordStdin) {
356
- yield runCommandThatMustSucceed("docker", ["login", "-u", username, "--password-stdin", registryName], logResource, /*reportFullCommandLine*/ false, password);
357
- }
358
- else {
359
- yield runCommandThatMustSucceed("docker", ["login", "-u", username, "-p", password, registryName], logResource, /*reportFullCommandLine*/ false);
360
- }
361
- });
362
- }
363
- }
364
- function tagAndPushImageAsync(imageName, repositoryUrl, tag, imageId, logResource) {
365
- return __awaiter(this, void 0, void 0, function* () {
366
- // Ensure we have a unique target name for this image, and tag and push to that unique target.
367
- yield doTagAndPushAsync(createTaggedImageName(repositoryUrl, tag, imageId));
368
- // If the user provided a tag themselves (like "x/y:dev") then also tag and push directly to
369
- // that 'dev' tag. This is not going to be a unique location, and future pushes will overwrite
370
- // this location. However, that's ok as there's still the unique target we generated above.
371
- //
372
- // Note: don't need to do this if imageId was 'undefined' as the above line will have already
373
- // taken care of things for us.
374
- if (tag !== undefined && imageId !== undefined) {
375
- yield doTagAndPushAsync(createTaggedImageName(repositoryUrl, tag, /*imageId:*/ undefined));
376
- }
377
- return;
378
- function doTagAndPushAsync(targetName) {
379
- return __awaiter(this, void 0, void 0, function* () {
380
- yield runCommandThatMustSucceed("docker", ["tag", imageName, targetName], logResource);
381
- yield runCommandThatMustSucceed("docker", ["push", targetName], logResource);
382
- });
383
- }
384
- });
385
- }
386
- function getCommandLineMessage(cmd, args, reportFullCommandLine, env) {
387
- const argString = reportFullCommandLine ? args.join(" ") : args[0];
388
- const envString = env === undefined ? "" : Object.keys(env).map(k => `${k}=${env[k]}`).join(" ");
389
- return `'${envString} ${cmd} ${argString}'`;
390
- }
391
- function getFailureMessage(cmd, args, reportFullCommandLine, code, env) {
392
- return `${getCommandLineMessage(cmd, args, reportFullCommandLine, env)} failed with exit code ${code}`;
393
- }
394
- // [reportFullCommandLine] is used to determine if the full command line should be reported
395
- // when an error happens. In general reporting the full command line is fine. But it should be set
396
- // to false if it might contain sensitive information (like a username/password)
397
- function runCommandThatMustSucceed(cmd, args, logResource, reportFullCommandLine = true, stdin, env) {
398
- return __awaiter(this, void 0, void 0, function* () {
399
- const { code, stdout } = yield runCommandThatCanFail(cmd, args, logResource, reportFullCommandLine, /*reportErrorAsWarning:*/ false, stdin, env);
400
- if (code !== 0) {
401
- // Fail the entire build and push. This includes the full output of the command so that at
402
- // the end the user can review the full docker message about what the problem was.
403
- //
404
- // Note: a message about the command failing will have already been ephemerally reported to
405
- // the status column.
406
- throw new errors_1.ResourceError(`${getFailureMessage(cmd, args, reportFullCommandLine, code)}\n${stdout}`, logResource);
407
- }
408
- return stdout;
409
- });
410
- }
411
- // Runs a CLI command in a child process, returning a promise for the process's exit. Both stdout
412
- // and stderr are redirected to process.stdout and process.stder by default.
413
- //
414
- // If the [stdin] argument is defined, it's contents are piped into stdin for the child process.
415
- //
416
- // [logResource] is used to specify the resource to associate command output with. Stderr messages
417
- // are always sent (since they may contain important information about something that's gone wrong).
418
- // Stdout messages will be logged ephemerally to this resource. This lets the user know there is
419
- // progress, without having that dumped on them at the end. If an error occurs though, the stdout
420
- // content will be printed.
421
- //
422
- // The promise returned by this function should never reach the rejected state. Even if the
423
- // underlying spawned command has a problem, this will result in a resolved promise with the
424
- // [CommandResult.code] value set to a non-zero value.
425
- function runCommandThatCanFail(cmd, args, logResource, reportFullCommandLine, reportErrorAsWarning, stdin, env) {
426
- return __awaiter(this, void 0, void 0, function* () {
427
- // Let the user ephemerally know the command we're going to execute.
428
- logDebug(`Executing ${getCommandLineMessage(cmd, args, reportFullCommandLine, env)}`, logResource);
429
- // Generate a unique stream-ID that we'll associate all the docker output with. This will allow
430
- // each spawned CLI command's output to associated with 'resource' and also streamed to the UI
431
- // in pieces so that it can be displayed live. The stream-ID is so that the UI knows these
432
- // messages are all related and should be considered as one large message (just one that was
433
- // sent over in chunks).
434
- //
435
- // We use Math.random here in case our package is loaded multiple times in memory (i.e. because
436
- // different downstream dependencies depend on different versions of us). By being random we
437
- // effectively make it completely unlikely that any two cli outputs could map to the same stream
438
- // id.
439
- //
440
- // Pick a reasonably distributed number between 0 and 2^30. This will fit as an int32
441
- // which the grpc layer needs.
442
- const streamID = Math.floor(Math.random() * (1 << 30));
443
- return new Promise((resolve, reject) => {
444
- const osEnv = Object.assign({}, process.env);
445
- env = Object.assign(osEnv, env);
446
- const p = child_process.spawn(cmd, args, { env });
447
- // We store the results from stdout in memory and will return them as a string.
448
- let stdOutChunks = [];
449
- let stdErrChunks = [];
450
- p.stdout.on("data", (chunk) => stdOutChunks.push(chunk));
451
- p.stderr.on("data", (chunk) => stdErrChunks.push(chunk));
452
- // Also report all stdout messages as ephemeral messages. That way they show up in the
453
- // info bar as they're happening. But they do not overwhelm the user as the end
454
- // of the run.
455
- const rl = readline.createInterface({ input: p.stdout });
456
- rl.on("line", line => logEphemeral(line, logResource));
457
- // In both cases of 'error' or 'close' we execute the same 'finish up' codepath. This
458
- // codepath effectively flushes (and clears) the stdout and stderr streams we've been
459
- // buffering. We'll also return the stdout stream to the caller, and we'll appropriately
460
- // return if we failed or not depending on if we got an actual exception, or if the spawned
461
- // process returned a non-0 error code.
462
- //
463
- // Effectively, we are ensuring that we never reject the promise we're returning. It will
464
- // always 'resolve', and we will always have the behaviors that:
465
- //
466
- // 1. all stderr information is flushed (including the message of an exception if we got one).
467
- // 2. an ephemeral info message is printed stating if there were any exceptions/status-codes
468
- // 3. all stdout information is returned to the caller.
469
- // 4. the caller gets a 0-code on success, and a non-0-code for either an exception or an
470
- // error status code.
471
- //
472
- // The caller can then decide what to do with this. Nearly all callers will will be coming
473
- // through runCommandThatMustSucceed, which will see a non-0 code and will then throw with
474
- // a full message.
475
- p.on("error", err => {
476
- // received some sort of real error. push the message of that error to our stdErr
477
- // stream (so it will get reported) and then move this promise to the resolved, 1-code
478
- // state to indicate failure.
479
- stdErrChunks.push(new Buffer(err.message));
480
- finish(/*code: */ 1);
481
- });
482
- p.on("close", code => {
483
- finish(code);
484
- });
485
- if (stdin) {
486
- p.stdin.end(stdin);
487
- }
488
- return;
489
- // Moves our promise to the resolved state, after appropriately dealing with any errors
490
- // we've encountered. Importantly, this function can be called multiple times safely.
491
- // It will clean up after itself so that multiple calls don't end up causing any issues.
492
- function finish(code) {
493
- // Collapse our stored stdout/stderr messages into single strings.
494
- const stderr = Buffer.concat(stdErrChunks).toString();
495
- const stdout = Buffer.concat(stdOutChunks).toString();
496
- // Clear out our output buffers. This ensures that if we get called again, we don't
497
- // double print these messages.
498
- stdOutChunks = [];
499
- stdErrChunks = [];
500
- // If we got any stderr messages, report them as an error/warning depending on the
501
- // result of the operation.
502
- if (stderr.length > 0) {
503
- if (code && !reportErrorAsWarning) {
504
- // Command returned non-zero code. Treat these stderr messages as an error.
505
- pulumi.log.error(stderr, logResource, streamID);
506
- }
507
- else {
508
- // command succeeded. These were just warning.
509
- pulumi.log.warn(stderr, logResource, streamID);
510
- }
511
- }
512
- // If the command failed report an ephemeral message indicating which command it was.
513
- // That way the user can immediately see something went wrong in the info bar. The
514
- // caller (normally runCommandThatMustSucceed) can choose to also report this
515
- // non-ephemerally.
516
- if (code) {
517
- logEphemeral(getFailureMessage(cmd, args, reportFullCommandLine, code), logResource);
518
- }
519
- resolve({ code, stdout });
520
- }
521
- });
522
- });
523
- }
524
- //# sourceMappingURL=docker.js.map
package/docker.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"docker.js","sourceRoot":"","sources":["../docker.ts"],"names":[],"mappings":";AAAA,2CAA2C;AAC3C,EAAE;AACF,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,iDAAiD;AACjD,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;;;;;;;;;;;;AAEjC,yCAAyC;AACzC,kDAAsD;AACtD,iCAAiC;AAEjC,+CAA+C;AAC/C,qCAAqC;AACrC,iCAAiC;AA0EjC,IAAI,qBAAmD,CAAC;AAExD,SAAS,sBAAsB,CAAC,WAA4B;IACxD,IAAI,CAAC,qBAAqB,EAAE;QACxB,qBAAqB,GAAG,4BAA4B,EAAE,CAAC;KAC1D;IAED,OAAO,qBAAqB,CAAC;IAE7B,SAAe,4BAA4B;;YACvC,yEAAyE;YACzE,IAAI,mBAA2B,CAAC;YAChC,IAAI;gBACA,mBAAmB,GAAG,MAAM,yBAAyB,CACjD,QAAQ,EAAE,CAAC,SAAS,EAAE,IAAI,EAAE,YAAY,CAAC,EAAE,WAAW,CAAC,CAAC;gBAC5D,qGAAqG;gBACrG,2BAA2B;gBAE3B,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,uBAAuB,mBAAmB,EAAE,EAAE,WAAW,CAAC,CAAC;aAC/E;YAAC,OAAO,GAAG,EAAE;gBACV,MAAM,IAAI,sBAAa,CAAC,sFAAsF,EAAE,WAAW,CAAC,CAAC;aAChI;YAED,oFAAoF;YACpF,IAAI;gBACA,MAAM,WAAW,GAAQ,IAAI,CAAC,KAAK,CAAC,mBAAoB,CAAC,CA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pF,+BAA+B;gBAC/B,YAAY,GAAG,EAAE,CAAC;gBAClB,YAAY,GAAG,EAAE,CAAC;gBAElB,kFAAkF;gBAClF,2BAA2B;gBAC3B,IAAI,MAAM,CAAC,MAAM,GAAG,CAAC,EAAE;oBACnB,IAAI,IAAI,IAAI,CAAC,oBAAoB,EAAE;wBAC/B,4EAA4E;wBAC5E,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,MAAM,EAAE,WAAW,EAAE,QAAQ,CAAC,CAAC;qBACnD;yBAAM;wBACH,+CAA+C;wBAC/C,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,MAAM,EAAE,WAAW,EAAE,QAAQ,CAAC,CAAC;qBAClD;iBACJ;gBAED,qFAAqF;gBACrF,mFAAmF;gBACnF,6EAA6E;gBAC7E,mBAAmB;gBACnB,IAAI,IAAI,EAAE;oBACN,YAAY,CAAC,iBAAiB,CAAC,GAAG,EAAE,IAAI,EAAE,qBAAqB,EAAE,IAAI,CAAC,EAAE,WAAW,CAAC,CAAC;iBACxF;gBAED,OAAO,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC,CAAC;YAC9B,CAAC;QACL,CAAC,CAAC,CAAC;IACP,CAAC;CAAA"}
package/utils.d.ts DELETED
@@ -1,4 +0,0 @@
1
- export declare function getImageNameAndTag(baseImageName: string): {
2
- imageName: string;
3
- tag: string | undefined;
4
- };
package/utils.js DELETED
@@ -1,32 +0,0 @@
1
- "use strict";
2
- // Copyright 2016-2018, Pulumi Corporation.
3
- //
4
- // Licensed under the Apache License, Version 2.0 (the "License");
5
- // you may not use this file except in compliance with the License.
6
- // You may obtain a copy of the License at
7
- //
8
- // http://www.apache.org/licenses/LICENSE-2.0
9
- //
10
- // Unless required by applicable law or agreed to in writing, software
11
- // distributed under the License is distributed on an "AS IS" BASIS,
12
- // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- // See the License for the specific language governing permissions and
14
- // limitations under the License.
15
- Object.defineProperty(exports, "__esModule", { value: true });
16
- exports.getImageNameAndTag = void 0;
17
- function getImageNameAndTag(baseImageName) {
18
- // From https://docs.docker.com/engine/reference/commandline/tag
19
- //
20
- // "A tag name must be valid ASCII and may contain lowercase and uppercase letters, digits,
21
- // underscores, periods and dashes. A tag name may not start with a period or a dash and may
22
- // contain a maximum of 128 characters."
23
- //
24
- // So it is safe for us to just look for the colon, and consume whatever follows as the tag
25
- // for the image.
26
- const lastColon = baseImageName.lastIndexOf(":");
27
- const imageName = lastColon < 0 ? baseImageName : baseImageName.substr(0, lastColon);
28
- const tag = lastColon < 0 ? undefined : baseImageName.substr(lastColon + 1);
29
- return { imageName, tag };
30
- }
31
- exports.getImageNameAndTag = getImageNameAndTag;
32
- //# sourceMappingURL=utils.js.map
package/utils.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"utils.js","sourceRoot":"","sources":["../utils.ts"],"names":[],"mappings":";AAAA,2CAA2C;AAC3C,EAAE;AACF,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,iDAAiD;AACjD,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;;;AAEjC,SAAgB,kBAAkB,CAAC,aAAqB;IACpD,gEAAgE;IAChE,EAAE;IACF,2FAA2F;IAC3F,4FAA4F;IAC5F,wCAAwC;IACxC,EAAE;IACF,2FAA2F;IAC3F,iBAAiB;IAEjB,MAAM,SAAS,GAAG,aAAa,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC;IACjD,MAAM,SAAS,GAAG,SAAS,GAAG,CAAC,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC,EAAE,SAAS,CAAC,CAAC;IACrF,MAAM,GAAG,GAAG,SAAS,GAAG,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,aAAa,CAAC,MAAM,CAAC,SAAS,GAAG,CAAC,CAAC,CAAC;IAE5E,OAAQ,EAAE,SAAS,EAAE,GAAG,EAAE,CAAC;AAC/B,CAAC;AAfD,gDAeC"}