DockerBuildImageArgs
interface DockerBuildImageArgs extends module:@jobcloud/pulumi-components..DockerBuildImageIdentityArgs, Omit<dockerbuild.ImageArgs, 'buildOnPreview' | 'push' | 'registries' | 'tags'> {
addHosts?: Input<Input<string>[] | undefined>;
buildArgs?: Input<{ [key: string]: Input<string> } | undefined>;
builder?: Input<BuilderConfigArgs | undefined>;
buildOnPreview?: Input<boolean>;
cacheFrom?: Input<Input<CacheFromArgs>[] | undefined>;
cacheTo?: Input<Input<CacheToArgs>[] | undefined>;
context?: Input<BuildContextArgs | undefined>;
dockerfile?: Input<DockerfileArgs | undefined>;
ecr: DockerBuildImageEcrTargetArgs;
exec?: Input<boolean | undefined>;
exports?: Input<Input<ExportArgs>[] | undefined>;
identity: string;
ignoreSecretsInDiffCalculation?: Input<Input<string>[] | undefined>;
labels?: Input<{ [key: string]: Input<string> } | undefined>;
load?: Input<boolean | undefined>;
network?: Input<NetworkMode | undefined>;
noCache?: Input<boolean | undefined>;
platforms?: Input<Input<Platform>[] | undefined>;
pull?: Input<boolean | undefined>;
push?: Input<boolean>;
registries?: Input<Input<RegistryArgs>[]>;
secrets?: Input<{ [key: string]: Input<string> } | undefined>;
ssh?: Input<Input<SSHArgs>[] | undefined>;
target?: Input<string | undefined>;
}Input arguments for DockerBuildImage.
Remarks
This component is ECR-first. It resolves ECR authentication via AWS lookups, builds deterministic ECR tags, and creates a dockerbuild.Image child resource with pushing enabled by default.
Example
const imageArgs: DockerBuildImageArgs = {
identity: 'payments-image',
context: { location: './services/payments' },
dockerfile: { location: './services/payments/Dockerfile' },
ecr: { repository: 'payments-api', tag: 'v1.2.3' },
};Hierarchy
ImageArgs, "buildOnPreview" | "push" | "registries" | "tags">DockerBuildImageIdentityArgsDockerBuildImageArgs
Properties
addHosts: Input<Input<string>[] | undefined>
Inherited from addHosts
Custom host:ip mappings to use during the build.
Equivalent to Docker's --add-host flag.
buildArgs: Input<{ [key: string]: Input<string> } | undefined>
Inherited from buildArgs
ARG names and values to set during the build.
These variables are accessed like environment variables inside RUN instructions.
Build arguments are persisted in the image, so you should use secrets if these arguments are sensitive.
Equivalent to Docker's --build-arg flag.
builder: Input<BuilderConfigArgs | undefined>
Inherited from builder
Builder configuration.
buildOnPreview: Input<boolean>
Whether to build the image during Pulumi previews.
Default: `false`
cacheFrom: Input<Input<CacheFromArgs>[] | undefined>
Inherited from cacheFrom
Cache export configuration.
Equivalent to Docker's --cache-from flag.
cacheTo: Input<Input<CacheToArgs>[] | undefined>
Inherited from cacheTo
Cache import configuration.
Equivalent to Docker's --cache-to flag.
context: Input<BuildContextArgs | undefined>
Inherited from context
Build context settings. Defaults to the current directory.
Equivalent to Docker's PATH | URL | - positional argument.
dockerfile: Input<DockerfileArgs | undefined>
Inherited from dockerfile
Dockerfile settings.
Equivalent to Docker's --file flag.
ecr: DockerBuildImageEcrTargetArgs
Required ECR publishing target configuration.
exec: Input<boolean | undefined>
Inherited from exec
Use exec mode to build this image.
By default the provider embeds a v25 Docker client with v0.12 buildx support. This helps ensure consistent behavior across environments and is compatible with alternative build backends (e.g. buildkitd), but it may not be desirable if you require a specific version of buildx. For example you may want to run a custom docker-buildx binary with support for Docker Build Cloud (DBC).
When this is set to true the provider will instead execute the docker-buildx binary directly to perform its operations. The user is responsible for ensuring this binary exists, with correct permissions and pre-configured builders, at a path Docker expects (e.g. ~/.docker/cli-plugins).
Debugging exec mode may be more difficult as Pulumi will not be able to surface fine-grained errors and warnings. Additionally credentials are temporarily written to disk in order to provide them to the docker-buildx binary.
exports: Input<Input<ExportArgs>[] | undefined>
Inherited from exports
Controls where images are persisted after building.
Images are only stored in the local cache unless exports are explicitly configured.
Exporting to multiple destinations requires a daemon running BuildKit 0.13 or later.
Equivalent to Docker's --output flag.
identity: string
Inherited from identity
Stable identity segment used to derive Pulumi logical names for this component and its child image resource.
Remarks
Must be a plain, non-empty synchronous string (not a pulumi.Input, pulumi.Output, or promise-derived value), and must contain supported characters that survive sanitisation to a non-empty segment. Keep this value stable for the lifetime of the component instance because changing it changes logical names and forces replacement.
ignoreSecretsInDiffCalculation: Input<Input<string>[] | undefined>
Inherited from ignoreSecretsInDiffCalculation
A list of secret names to ignore when calculating diffs.
These secrets will not be considered when calculating diffs, even if they are changed. Note: only applicable if the secret is present in both the old and the new state.
This is useful when you want to avoid unnecessary rebuilds caused by short-lived secrets that change on every run.
labels: Input<{ [key: string]: Input<string> } | undefined>
Inherited from labels
Attach arbitrary key/value metadata to the image.
Equivalent to Docker's --label flag.
load: Input<boolean | undefined>
Inherited from load
When true the build will automatically include a docker export.
Defaults to false.
Equivalent to Docker's --load flag.
network: Input<NetworkMode | undefined>
Inherited from network
Set the network mode for RUN instructions. Defaults to default.
For custom networks, configure your builder with --driver-opt network=....
Equivalent to Docker's --network flag.
noCache: Input<boolean | undefined>
Inherited from noCache
Do not import cache manifests when building the image.
Equivalent to Docker's --no-cache flag.
platforms: Input<Input<Platform>[] | undefined>
Inherited from platforms
Set target platform(s) for the build. Defaults to the host's platform.
Equivalent to Docker's --platform flag.
pull: Input<boolean | undefined>
Inherited from pull
Always pull referenced images.
Equivalent to Docker's --pull flag.
push: Input<boolean>
Whether to push the built image. Defaults to true.
registries: Input<Input<RegistryArgs>[]>
Optional additional registry credentials merged after the ECR registry entry.
secrets: Input<{ [key: string]: Input<string> } | undefined>
Inherited from secrets
A mapping of secret names to their corresponding values.
Unlike the Docker CLI, these can be passed by value and do not need to exist on-disk or in environment variables.
Build arguments and environment variables are persistent in the final image, so you should use this for sensitive values.
Similar to Docker's --secret flag.
ssh: Input<Input<SSHArgs>[] | undefined>
Inherited from ssh
SSH agent socket or keys to expose to the build.
Equivalent to Docker's --ssh flag.
target: Input<string | undefined>
Inherited from target
Set the target build stage(s) to build.
If not specified all targets will be built by default.
Equivalent to Docker's --target flag.