DockerBuildImage
Service-level Docker image build component with ECR-first authentication.
Remarks
Naming:
- The component type is
${namespace}:docker:DockerBuildImage; its logical-onlyargs.identityproduces${env}-${projectHash}-docker-build-image-${sanitised args.identity}. - Under parent
${namespace}:docker:DockerBuildImage, the provider-authoreddocker-build:index:Imageuses[args.identity], producing${env}-${projectHash}-${sanitised args.identity}. - This component creates no AWS resource. The Docker image tags are semantic ECR image references assembled from
args.ecr.repository,args.ecr.tag, optionalargs.ecr.additionalTags, and the resolved registry address. The component requires every supplied string to be non-empty and trims it before rendering; ECR repository-name and Docker tag grammar remain provider-owned.
Example
const image = new DockerBuildImage({
identity: 'payments-image',
context: {
location: './services/payments',
},
dockerfile: {
location: './services/payments/Dockerfile',
},
ecr: {
repository: 'payments-api',
},
});Constructors
new DockerBuildImage(
args: DockerBuildImageArgs,
options?: ComponentResourceOptions,
): DockerBuildImage
Parameters
args(DockerBuildImageArgs) — Docker build and ECR target inputs.options(ComponentResourceOptions, optional) — Optional Pulumi resource behaviour settings.
Returns
DockerBuildImage
Hierarchy
ComponentResourceDockerBuildImage
Properties
digest: Output<string>
Built image digest.
image: Image
The underlying docker-build image resource.
ref: Output<string>
Primary image reference emitted by docker-build.
registryAddress: Output<string>
Resolved ECR registry address.
tags: Output<string[]>
Resolved ECR tags used for the build and push operation.
urn: Output<string>
Inherited from urn
The stable logical URN used to distinctly address a resource, both before and after deployments.
Methods
getData(): Promise<any>
Inherited from getData
Retrieves the data produces by initialize. The data is immediately available in a derived class's constructor after the super(...) call to ComponentResource.
Returns
Promise<any>
getProvider(moduleMember: string): ProviderResource | undefined
Inherited from getProvider
Returns the provider for the given module member, if one exists.
Parameters
moduleMember(string)
Returns
ProviderResource | undefined
initialize(
args: Inputs,
opts?: ComponentResourceOptions,
name?: string,
type?: string,
): Promise<any>
Inherited from initialize
Can be overridden by a subclass to asynchronously initialize data for this component automatically when constructed. The data will be available immediately for subclass constructors to use. To access the data use getData.
Parameters
args(Inputs)opts(ComponentResourceOptions, optional)name(string, optional)type(string, optional)
Returns
Promise<any>
registerOutputs(
outputs?: Inputs | Promise<Inputs> | Output<Inputs>,
): void
Inherited from registerOutputs
Registers synthetic outputs that a component has initialized, usually by allocating other child sub-resources and propagating their resulting property values.
Component resources can call this at the end of their constructor to indicate that they are done creating child resources. This is not strictly necessary as this will automatically be called after the initialize method completes.
Parameters
outputs(Inputs | Promise<Inputs> | Output<Inputs>, optional)
Returns
void
Static Methods
isInstance(obj: any): obj is ComponentResource<any>
Inherited from isInstance
Returns true if the given object is a CustomResource. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.
Parameters
obj(any)
Returns
obj is ComponentResource<any>