dockerbuild

package
v0.0.15 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 17, 2025 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

A Pulumi provider for building modern Docker images with buildx and BuildKit.

Index

Constants

View Source
const (
	// Only layers that are exported into the resulting image are cached.
	CacheModeCacheModeMin = CacheMode("min")
	// All layers are cached, even those of intermediate steps.
	CacheModeCacheModeMax = CacheMode("max")
)
View Source
const (
	// Use `gzip` for compression.
	CompressionTypeCompressionTypeGzip = CompressionType("gzip")
	// Use `estargz` for compression.
	CompressionTypeCompressionTypeEstargz = CompressionType("estargz")
	// Use `zstd` for compression.
	CompressionTypeCompressionTypeZstd = CompressionType("zstd")
)
View Source
const (
	// The default sandbox network mode.
	NetworkModeNetworkModeDefault = NetworkMode("default")
	// Host network mode.
	NetworkModeNetworkModeHost = NetworkMode("host")
	// Disable network access.
	NetworkModeNetworkModeNone = NetworkMode("none")
)
View Source
const (
	Platform_Platform_Darwin_386      = Platform("darwin/386")
	Platform_Platform_Darwin_amd64    = Platform("darwin/amd64")
	Platform_Platform_Darwin_arm      = Platform("darwin/arm")
	Platform_Platform_Darwin_arm64    = Platform("darwin/arm64")
	Platform_Platform_Dragonfly_amd64 = Platform("dragonfly/amd64")
	Platform_Platform_Freebsd_386     = Platform("freebsd/386")
	Platform_Platform_Freebsd_amd64   = Platform("freebsd/amd64")
	Platform_Platform_Freebsd_arm     = Platform("freebsd/arm")
	Platform_Platform_Linux_386       = Platform("linux/386")
	Platform_Platform_Linux_amd64     = Platform("linux/amd64")
	Platform_Platform_Linux_arm       = Platform("linux/arm")
	Platform_Platform_Linux_arm64     = Platform("linux/arm64")
	Platform_Platform_Linux_mips64    = Platform("linux/mips64")
	Platform_Platform_Linux_mips64le  = Platform("linux/mips64le")
	Platform_Platform_Linux_ppc64le   = Platform("linux/ppc64le")
	Platform_Platform_Linux_riscv64   = Platform("linux/riscv64")
	Platform_Platform_Linux_s390x     = Platform("linux/s390x")
	Platform_Platform_Netbsd_386      = Platform("netbsd/386")
	Platform_Platform_Netbsd_amd64    = Platform("netbsd/amd64")
	Platform_Platform_Netbsd_arm      = Platform("netbsd/arm")
	Platform_Platform_Openbsd_386     = Platform("openbsd/386")
	Platform_Platform_Openbsd_amd64   = Platform("openbsd/amd64")
	Platform_Platform_Openbsd_arm     = Platform("openbsd/arm")
	Platform_Platform_Plan9_386       = Platform("plan9/386")
	Platform_Platform_Plan9_amd64     = Platform("plan9/amd64")
	Platform_Platform_Solaris_amd64   = Platform("solaris/amd64")
	Platform_Platform_Windows_386     = Platform("windows/386")
	Platform_Platform_Windows_amd64   = Platform("windows/amd64")
)

Variables

This section is empty.

Functions

This section is empty.

Types

type BuildContext

type BuildContext struct {
	// Resources to use for build context.
	//
	// The location can be:
	// * A relative or absolute path to a local directory (`.`, `./app`,
	//   `/app`, etc.).
	// * A remote URL of a Git repository, tarball, or plain text file
	//   (`https://github.com/user/myrepo.git`, `http://server/context.tar.gz`,
	//   etc.).
	Location string `pulumi:"location"`
	// Additional build contexts to use.
	//
	// These contexts are accessed with `FROM name` or `--from=name`
	// statements when using Dockerfile 1.4+ syntax.
	//
	// Values can be local paths, HTTP URLs, or  `docker-image://` images.
	Named map[string]*Context `pulumi:"named"`
}

type BuildContextArgs

type BuildContextArgs struct {
	// Resources to use for build context.
	//
	// The location can be:
	// * A relative or absolute path to a local directory (`.`, `./app`,
	//   `/app`, etc.).
	// * A remote URL of a Git repository, tarball, or plain text file
	//   (`https://github.com/user/myrepo.git`, `http://server/context.tar.gz`,
	//   etc.).
	Location pulumix.Input[string] `pulumi:"location"`
	// Additional build contexts to use.
	//
	// These contexts are accessed with `FROM name` or `--from=name`
	// statements when using Dockerfile 1.4+ syntax.
	//
	// Values can be local paths, HTTP URLs, or  `docker-image://` images.
	Named pulumix.Input[map[string]*ContextArgs] `pulumi:"named"`
}

func (BuildContextArgs) ElementType

func (BuildContextArgs) ElementType() reflect.Type

func (BuildContextArgs) ToBuildContextOutput

func (i BuildContextArgs) ToBuildContextOutput() BuildContextOutput

func (BuildContextArgs) ToBuildContextOutputWithContext

func (i BuildContextArgs) ToBuildContextOutputWithContext(ctx context.Context) BuildContextOutput

func (*BuildContextArgs) ToOutput

type BuildContextOutput

type BuildContextOutput struct{ *pulumi.OutputState }

func (BuildContextOutput) ElementType

func (BuildContextOutput) ElementType() reflect.Type

func (BuildContextOutput) Location

func (o BuildContextOutput) Location() pulumix.Output[string]

Resources to use for build context.

The location can be:

func (BuildContextOutput) Named

Additional build contexts to use.

These contexts are accessed with `FROM name` or `--from=name` statements when using Dockerfile 1.4+ syntax.

Values can be local paths, HTTP URLs, or `docker-image://` images.

func (BuildContextOutput) ToBuildContextOutput

func (o BuildContextOutput) ToBuildContextOutput() BuildContextOutput

func (BuildContextOutput) ToBuildContextOutputWithContext

func (o BuildContextOutput) ToBuildContextOutputWithContext(ctx context.Context) BuildContextOutput

func (BuildContextOutput) ToOutput

type BuilderConfig

type BuilderConfig struct {
	// Name of an existing buildx builder to use.
	//
	// Only `docker-container`, `kubernetes`, or `remote` drivers are
	// supported. The legacy `docker` driver is not supported.
	//
	// Equivalent to Docker's `--builder` flag.
	Name *string `pulumi:"name"`
}

type BuilderConfigArgs

type BuilderConfigArgs struct {
	// Name of an existing buildx builder to use.
	//
	// Only `docker-container`, `kubernetes`, or `remote` drivers are
	// supported. The legacy `docker` driver is not supported.
	//
	// Equivalent to Docker's `--builder` flag.
	Name pulumix.Input[*string] `pulumi:"name"`
}

func (BuilderConfigArgs) ElementType

func (BuilderConfigArgs) ElementType() reflect.Type

func (BuilderConfigArgs) ToBuilderConfigOutput

func (i BuilderConfigArgs) ToBuilderConfigOutput() BuilderConfigOutput

func (BuilderConfigArgs) ToBuilderConfigOutputWithContext

func (i BuilderConfigArgs) ToBuilderConfigOutputWithContext(ctx context.Context) BuilderConfigOutput

func (*BuilderConfigArgs) ToOutput

type BuilderConfigOutput

type BuilderConfigOutput struct{ *pulumi.OutputState }

func (BuilderConfigOutput) ElementType

func (BuilderConfigOutput) ElementType() reflect.Type

func (BuilderConfigOutput) Name

Name of an existing buildx builder to use.

Only `docker-container`, `kubernetes`, or `remote` drivers are supported. The legacy `docker` driver is not supported.

Equivalent to Docker's `--builder` flag.

func (BuilderConfigOutput) ToBuilderConfigOutput

func (o BuilderConfigOutput) ToBuilderConfigOutput() BuilderConfigOutput

func (BuilderConfigOutput) ToBuilderConfigOutputWithContext

func (o BuilderConfigOutput) ToBuilderConfigOutputWithContext(ctx context.Context) BuilderConfigOutput

func (BuilderConfigOutput) ToOutput

type CacheFrom

type CacheFrom struct {
	// Upload build caches to Azure's blob storage service.
	Azblob *CacheFromAzureBlob `pulumi:"azblob"`
	// When `true` this entry will be excluded. Defaults to `false`.
	Disabled *bool `pulumi:"disabled"`
	// Recommended for use with GitHub Actions workflows.
	//
	// An action like `crazy-max/ghaction-github-runtime` is recommended to
	// expose appropriate credentials to your GitHub workflow.
	Gha *CacheFromGitHubActions `pulumi:"gha"`
	// A simple backend which caches images on your local filesystem.
	Local *CacheFromLocal `pulumi:"local"`
	// A raw string as you would provide it to the Docker CLI (e.g.,
	// `type=inline`).
	Raw *string `pulumi:"raw"`
	// Upload build caches to remote registries.
	Registry *CacheFromRegistry `pulumi:"registry"`
	// Upload build caches to AWS S3 or an S3-compatible services such as
	// MinIO.
	S3 *CacheFromS3 `pulumi:"s3"`
}

func (*CacheFrom) Defaults

func (val *CacheFrom) Defaults() *CacheFrom

Defaults sets the appropriate defaults for CacheFrom

type CacheFromArgs

type CacheFromArgs struct {
	// Upload build caches to Azure's blob storage service.
	Azblob pulumix.Input[*CacheFromAzureBlobArgs] `pulumi:"azblob"`
	// When `true` this entry will be excluded. Defaults to `false`.
	Disabled pulumix.Input[*bool] `pulumi:"disabled"`
	// Recommended for use with GitHub Actions workflows.
	//
	// An action like `crazy-max/ghaction-github-runtime` is recommended to
	// expose appropriate credentials to your GitHub workflow.
	Gha pulumix.Input[*CacheFromGitHubActionsArgs] `pulumi:"gha"`
	// A simple backend which caches images on your local filesystem.
	Local pulumix.Input[*CacheFromLocalArgs] `pulumi:"local"`
	// A raw string as you would provide it to the Docker CLI (e.g.,
	// `type=inline`).
	Raw pulumix.Input[*string] `pulumi:"raw"`
	// Upload build caches to remote registries.
	Registry pulumix.Input[*CacheFromRegistryArgs] `pulumi:"registry"`
	// Upload build caches to AWS S3 or an S3-compatible services such as
	// MinIO.
	S3 pulumix.Input[*CacheFromS3Args] `pulumi:"s3"`
}

func (*CacheFromArgs) Defaults

func (val *CacheFromArgs) Defaults() *CacheFromArgs

Defaults sets the appropriate defaults for CacheFromArgs

func (CacheFromArgs) ElementType

func (CacheFromArgs) ElementType() reflect.Type

func (CacheFromArgs) ToCacheFromOutput

func (i CacheFromArgs) ToCacheFromOutput() CacheFromOutput

func (CacheFromArgs) ToCacheFromOutputWithContext

func (i CacheFromArgs) ToCacheFromOutputWithContext(ctx context.Context) CacheFromOutput

func (*CacheFromArgs) ToOutput

type CacheFromAzureBlob

type CacheFromAzureBlob struct {
	// Base URL of the storage account.
	AccountUrl *string `pulumi:"accountUrl"`
	// The name of the cache image.
	Name string `pulumi:"name"`
	// Blob storage account key.
	SecretAccessKey *string `pulumi:"secretAccessKey"`
}

type CacheFromAzureBlobArgs

type CacheFromAzureBlobArgs struct {
	// Base URL of the storage account.
	AccountUrl pulumix.Input[*string] `pulumi:"accountUrl"`
	// The name of the cache image.
	Name pulumix.Input[string] `pulumi:"name"`
	// Blob storage account key.
	SecretAccessKey pulumix.Input[*string] `pulumi:"secretAccessKey"`
}

func (CacheFromAzureBlobArgs) ElementType

func (CacheFromAzureBlobArgs) ElementType() reflect.Type

func (CacheFromAzureBlobArgs) ToCacheFromAzureBlobOutput

func (i CacheFromAzureBlobArgs) ToCacheFromAzureBlobOutput() CacheFromAzureBlobOutput

func (CacheFromAzureBlobArgs) ToCacheFromAzureBlobOutputWithContext

func (i CacheFromAzureBlobArgs) ToCacheFromAzureBlobOutputWithContext(ctx context.Context) CacheFromAzureBlobOutput

func (*CacheFromAzureBlobArgs) ToOutput

type CacheFromAzureBlobOutput

type CacheFromAzureBlobOutput struct{ *pulumi.OutputState }

func (CacheFromAzureBlobOutput) AccountUrl

func (o CacheFromAzureBlobOutput) AccountUrl() pulumix.Output[*string]

Base URL of the storage account.

func (CacheFromAzureBlobOutput) ElementType

func (CacheFromAzureBlobOutput) ElementType() reflect.Type

func (CacheFromAzureBlobOutput) Name

The name of the cache image.

func (CacheFromAzureBlobOutput) SecretAccessKey

func (o CacheFromAzureBlobOutput) SecretAccessKey() pulumix.Output[*string]

Blob storage account key.

func (CacheFromAzureBlobOutput) ToCacheFromAzureBlobOutput

func (o CacheFromAzureBlobOutput) ToCacheFromAzureBlobOutput() CacheFromAzureBlobOutput

func (CacheFromAzureBlobOutput) ToCacheFromAzureBlobOutputWithContext

func (o CacheFromAzureBlobOutput) ToCacheFromAzureBlobOutputWithContext(ctx context.Context) CacheFromAzureBlobOutput

func (CacheFromAzureBlobOutput) ToOutput

type CacheFromGitHubActions

type CacheFromGitHubActions struct {
	// The scope to use for cache keys. Defaults to `buildkit`.
	//
	// This should be set if building and caching multiple images in one
	// workflow, otherwise caches will overwrite each other.
	Scope *string `pulumi:"scope"`
}

Recommended for use with GitHub Actions workflows.

An action like `crazy-max/ghaction-github-runtime` is recommended to expose appropriate credentials to your GitHub workflow.

func (*CacheFromGitHubActions) Defaults

Defaults sets the appropriate defaults for CacheFromGitHubActions

type CacheFromGitHubActionsArgs

type CacheFromGitHubActionsArgs struct {
	// The scope to use for cache keys. Defaults to `buildkit`.
	//
	// This should be set if building and caching multiple images in one
	// workflow, otherwise caches will overwrite each other.
	Scope pulumix.Input[*string] `pulumi:"scope"`
}

Recommended for use with GitHub Actions workflows.

An action like `crazy-max/ghaction-github-runtime` is recommended to expose appropriate credentials to your GitHub workflow.

func (*CacheFromGitHubActionsArgs) Defaults

Defaults sets the appropriate defaults for CacheFromGitHubActionsArgs

func (CacheFromGitHubActionsArgs) ElementType

func (CacheFromGitHubActionsArgs) ElementType() reflect.Type

func (CacheFromGitHubActionsArgs) ToCacheFromGitHubActionsOutput

func (i CacheFromGitHubActionsArgs) ToCacheFromGitHubActionsOutput() CacheFromGitHubActionsOutput

func (CacheFromGitHubActionsArgs) ToCacheFromGitHubActionsOutputWithContext

func (i CacheFromGitHubActionsArgs) ToCacheFromGitHubActionsOutputWithContext(ctx context.Context) CacheFromGitHubActionsOutput

func (*CacheFromGitHubActionsArgs) ToOutput

type CacheFromGitHubActionsOutput

type CacheFromGitHubActionsOutput struct{ *pulumi.OutputState }

Recommended for use with GitHub Actions workflows.

An action like `crazy-max/ghaction-github-runtime` is recommended to expose appropriate credentials to your GitHub workflow.

func (CacheFromGitHubActionsOutput) ElementType

func (CacheFromGitHubActionsOutput) Scope

The scope to use for cache keys. Defaults to `buildkit`.

This should be set if building and caching multiple images in one workflow, otherwise caches will overwrite each other.

func (CacheFromGitHubActionsOutput) ToCacheFromGitHubActionsOutput

func (o CacheFromGitHubActionsOutput) ToCacheFromGitHubActionsOutput() CacheFromGitHubActionsOutput

func (CacheFromGitHubActionsOutput) ToCacheFromGitHubActionsOutputWithContext

func (o CacheFromGitHubActionsOutput) ToCacheFromGitHubActionsOutputWithContext(ctx context.Context) CacheFromGitHubActionsOutput

func (CacheFromGitHubActionsOutput) ToOutput

type CacheFromLocal

type CacheFromLocal struct {
	// Digest of manifest to import.
	Digest *string `pulumi:"digest"`
	// Path of the local directory where cache gets imported from.
	Src string `pulumi:"src"`
}

type CacheFromLocalArgs

type CacheFromLocalArgs struct {
	// Digest of manifest to import.
	Digest pulumix.Input[*string] `pulumi:"digest"`
	// Path of the local directory where cache gets imported from.
	Src pulumix.Input[string] `pulumi:"src"`
}

func (CacheFromLocalArgs) ElementType

func (CacheFromLocalArgs) ElementType() reflect.Type

func (CacheFromLocalArgs) ToCacheFromLocalOutput

func (i CacheFromLocalArgs) ToCacheFromLocalOutput() CacheFromLocalOutput

func (CacheFromLocalArgs) ToCacheFromLocalOutputWithContext

func (i CacheFromLocalArgs) ToCacheFromLocalOutputWithContext(ctx context.Context) CacheFromLocalOutput

func (*CacheFromLocalArgs) ToOutput

type CacheFromLocalOutput

type CacheFromLocalOutput struct{ *pulumi.OutputState }

func (CacheFromLocalOutput) Digest

Digest of manifest to import.

func (CacheFromLocalOutput) ElementType

func (CacheFromLocalOutput) ElementType() reflect.Type

func (CacheFromLocalOutput) Src

Path of the local directory where cache gets imported from.

func (CacheFromLocalOutput) ToCacheFromLocalOutput

func (o CacheFromLocalOutput) ToCacheFromLocalOutput() CacheFromLocalOutput

func (CacheFromLocalOutput) ToCacheFromLocalOutputWithContext

func (o CacheFromLocalOutput) ToCacheFromLocalOutputWithContext(ctx context.Context) CacheFromLocalOutput

func (CacheFromLocalOutput) ToOutput

type CacheFromOutput

type CacheFromOutput struct{ *pulumi.OutputState }

func (CacheFromOutput) Azblob

Upload build caches to Azure's blob storage service.

func (CacheFromOutput) Disabled

func (o CacheFromOutput) Disabled() pulumix.Output[*bool]

When `true` this entry will be excluded. Defaults to `false`.

func (CacheFromOutput) ElementType

func (CacheFromOutput) ElementType() reflect.Type

func (CacheFromOutput) Gha

Recommended for use with GitHub Actions workflows.

An action like `crazy-max/ghaction-github-runtime` is recommended to expose appropriate credentials to your GitHub workflow.

func (CacheFromOutput) Local

A simple backend which caches images on your local filesystem.

func (CacheFromOutput) Raw

A raw string as you would provide it to the Docker CLI (e.g., `type=inline`).

func (CacheFromOutput) Registry

Upload build caches to remote registries.

func (CacheFromOutput) S3

Upload build caches to AWS S3 or an S3-compatible services such as MinIO.

func (CacheFromOutput) ToCacheFromOutput

func (o CacheFromOutput) ToCacheFromOutput() CacheFromOutput

func (CacheFromOutput) ToCacheFromOutputWithContext

func (o CacheFromOutput) ToCacheFromOutputWithContext(ctx context.Context) CacheFromOutput

func (CacheFromOutput) ToOutput

type CacheFromRegistry

type CacheFromRegistry struct {
	// Fully qualified name of the cache image to import.
	Ref string `pulumi:"ref"`
}

type CacheFromRegistryArgs

type CacheFromRegistryArgs struct {
	// Fully qualified name of the cache image to import.
	Ref pulumix.Input[string] `pulumi:"ref"`
}

func (CacheFromRegistryArgs) ElementType

func (CacheFromRegistryArgs) ElementType() reflect.Type

func (CacheFromRegistryArgs) ToCacheFromRegistryOutput

func (i CacheFromRegistryArgs) ToCacheFromRegistryOutput() CacheFromRegistryOutput

func (CacheFromRegistryArgs) ToCacheFromRegistryOutputWithContext

func (i CacheFromRegistryArgs) ToCacheFromRegistryOutputWithContext(ctx context.Context) CacheFromRegistryOutput

func (*CacheFromRegistryArgs) ToOutput

type CacheFromRegistryOutput

type CacheFromRegistryOutput struct{ *pulumi.OutputState }

func (CacheFromRegistryOutput) ElementType

func (CacheFromRegistryOutput) ElementType() reflect.Type

func (CacheFromRegistryOutput) Ref

Fully qualified name of the cache image to import.

func (CacheFromRegistryOutput) ToCacheFromRegistryOutput

func (o CacheFromRegistryOutput) ToCacheFromRegistryOutput() CacheFromRegistryOutput

func (CacheFromRegistryOutput) ToCacheFromRegistryOutputWithContext

func (o CacheFromRegistryOutput) ToCacheFromRegistryOutputWithContext(ctx context.Context) CacheFromRegistryOutput

func (CacheFromRegistryOutput) ToOutput

type CacheFromS3

type CacheFromS3 struct {
	// Defaults to `$AWS_ACCESS_KEY_ID`.
	AccessKeyId *string `pulumi:"accessKeyId"`
	// Prefix to prepend to blob filenames.
	BlobsPrefix *string `pulumi:"blobsPrefix"`
	// Name of the S3 bucket.
	Bucket string `pulumi:"bucket"`
	// Endpoint of the S3 bucket.
	EndpointUrl *string `pulumi:"endpointUrl"`
	// Prefix to prepend on manifest filenames.
	ManifestsPrefix *string `pulumi:"manifestsPrefix"`
	// Name of the cache image.
	Name *string `pulumi:"name"`
	// The geographic location of the bucket. Defaults to `$AWS_REGION`.
	Region string `pulumi:"region"`
	// Defaults to `$AWS_SECRET_ACCESS_KEY`.
	SecretAccessKey *string `pulumi:"secretAccessKey"`
	// Defaults to `$AWS_SESSION_TOKEN`.
	SessionToken *string `pulumi:"sessionToken"`
	// Uses `bucket` in the URL instead of hostname when `true`.
	UsePathStyle *bool `pulumi:"usePathStyle"`
}

func (*CacheFromS3) Defaults

func (val *CacheFromS3) Defaults() *CacheFromS3

Defaults sets the appropriate defaults for CacheFromS3

type CacheFromS3Args

type CacheFromS3Args struct {
	// Defaults to `$AWS_ACCESS_KEY_ID`.
	AccessKeyId pulumix.Input[*string] `pulumi:"accessKeyId"`
	// Prefix to prepend to blob filenames.
	BlobsPrefix pulumix.Input[*string] `pulumi:"blobsPrefix"`
	// Name of the S3 bucket.
	Bucket pulumix.Input[string] `pulumi:"bucket"`
	// Endpoint of the S3 bucket.
	EndpointUrl pulumix.Input[*string] `pulumi:"endpointUrl"`
	// Prefix to prepend on manifest filenames.
	ManifestsPrefix pulumix.Input[*string] `pulumi:"manifestsPrefix"`
	// Name of the cache image.
	Name pulumix.Input[*string] `pulumi:"name"`
	// The geographic location of the bucket. Defaults to `$AWS_REGION`.
	Region pulumix.Input[string] `pulumi:"region"`
	// Defaults to `$AWS_SECRET_ACCESS_KEY`.
	SecretAccessKey pulumix.Input[*string] `pulumi:"secretAccessKey"`
	// Defaults to `$AWS_SESSION_TOKEN`.
	SessionToken pulumix.Input[*string] `pulumi:"sessionToken"`
	// Uses `bucket` in the URL instead of hostname when `true`.
	UsePathStyle pulumix.Input[*bool] `pulumi:"usePathStyle"`
}

func (*CacheFromS3Args) Defaults

func (val *CacheFromS3Args) Defaults() *CacheFromS3Args

Defaults sets the appropriate defaults for CacheFromS3Args

func (CacheFromS3Args) ElementType

func (CacheFromS3Args) ElementType() reflect.Type

func (CacheFromS3Args) ToCacheFromS3Output

func (i CacheFromS3Args) ToCacheFromS3Output() CacheFromS3Output

func (CacheFromS3Args) ToCacheFromS3OutputWithContext

func (i CacheFromS3Args) ToCacheFromS3OutputWithContext(ctx context.Context) CacheFromS3Output

func (*CacheFromS3Args) ToOutput

type CacheFromS3Output

type CacheFromS3Output struct{ *pulumi.OutputState }

func (CacheFromS3Output) AccessKeyId

func (o CacheFromS3Output) AccessKeyId() pulumix.Output[*string]

Defaults to `$AWS_ACCESS_KEY_ID`.

func (CacheFromS3Output) BlobsPrefix

func (o CacheFromS3Output) BlobsPrefix() pulumix.Output[*string]

Prefix to prepend to blob filenames.

func (CacheFromS3Output) Bucket

func (o CacheFromS3Output) Bucket() pulumix.Output[string]

Name of the S3 bucket.

func (CacheFromS3Output) ElementType

func (CacheFromS3Output) ElementType() reflect.Type

func (CacheFromS3Output) EndpointUrl

func (o CacheFromS3Output) EndpointUrl() pulumix.Output[*string]

Endpoint of the S3 bucket.

func (CacheFromS3Output) ManifestsPrefix

func (o CacheFromS3Output) ManifestsPrefix() pulumix.Output[*string]

Prefix to prepend on manifest filenames.

func (CacheFromS3Output) Name

Name of the cache image.

func (CacheFromS3Output) Region

func (o CacheFromS3Output) Region() pulumix.Output[string]

The geographic location of the bucket. Defaults to `$AWS_REGION`.

func (CacheFromS3Output) SecretAccessKey

func (o CacheFromS3Output) SecretAccessKey() pulumix.Output[*string]

Defaults to `$AWS_SECRET_ACCESS_KEY`.

func (CacheFromS3Output) SessionToken

func (o CacheFromS3Output) SessionToken() pulumix.Output[*string]

Defaults to `$AWS_SESSION_TOKEN`.

func (CacheFromS3Output) ToCacheFromS3Output

func (o CacheFromS3Output) ToCacheFromS3Output() CacheFromS3Output

func (CacheFromS3Output) ToCacheFromS3OutputWithContext

func (o CacheFromS3Output) ToCacheFromS3OutputWithContext(ctx context.Context) CacheFromS3Output

func (CacheFromS3Output) ToOutput

func (CacheFromS3Output) UsePathStyle

func (o CacheFromS3Output) UsePathStyle() pulumix.Output[*bool]

Uses `bucket` in the URL instead of hostname when `true`.

type CacheMode

type CacheMode string

type CacheTo

type CacheTo struct {
	// Push cache to Azure's blob storage service.
	Azblob *CacheToAzureBlob `pulumi:"azblob"`
	// When `true` this entry will be excluded. Defaults to `false`.
	Disabled *bool `pulumi:"disabled"`
	// Recommended for use with GitHub Actions workflows.
	//
	// An action like `crazy-max/ghaction-github-runtime` is recommended to
	// expose appropriate credentials to your GitHub workflow.
	Gha *CacheToGitHubActions `pulumi:"gha"`
	// The inline cache storage backend is the simplest implementation to get
	// started with, but it does not handle multi-stage builds. Consider the
	// `registry` cache backend instead.
	Inline *CacheToInline `pulumi:"inline"`
	// A simple backend which caches imagines on your local filesystem.
	Local *CacheToLocal `pulumi:"local"`
	// A raw string as you would provide it to the Docker CLI (e.g.,
	// `type=inline`)
	Raw *string `pulumi:"raw"`
	// Push caches to remote registries. Incompatible with the `docker` build
	// driver.
	Registry *CacheToRegistry `pulumi:"registry"`
	// Push cache to AWS S3 or S3-compatible services such as MinIO.
	S3 *CacheToS3 `pulumi:"s3"`
}

func (*CacheTo) Defaults

func (val *CacheTo) Defaults() *CacheTo

Defaults sets the appropriate defaults for CacheTo

type CacheToArgs

type CacheToArgs struct {
	// Push cache to Azure's blob storage service.
	Azblob pulumix.Input[*CacheToAzureBlobArgs] `pulumi:"azblob"`
	// When `true` this entry will be excluded. Defaults to `false`.
	Disabled pulumix.Input[*bool] `pulumi:"disabled"`
	// Recommended for use with GitHub Actions workflows.
	//
	// An action like `crazy-max/ghaction-github-runtime` is recommended to
	// expose appropriate credentials to your GitHub workflow.
	Gha pulumix.Input[*CacheToGitHubActionsArgs] `pulumi:"gha"`
	// The inline cache storage backend is the simplest implementation to get
	// started with, but it does not handle multi-stage builds. Consider the
	// `registry` cache backend instead.
	Inline pulumix.Input[*CacheToInlineArgs] `pulumi:"inline"`
	// A simple backend which caches imagines on your local filesystem.
	Local pulumix.Input[*CacheToLocalArgs] `pulumi:"local"`
	// A raw string as you would provide it to the Docker CLI (e.g.,
	// `type=inline`)
	Raw pulumix.Input[*string] `pulumi:"raw"`
	// Push caches to remote registries. Incompatible with the `docker` build
	// driver.
	Registry pulumix.Input[*CacheToRegistryArgs] `pulumi:"registry"`
	// Push cache to AWS S3 or S3-compatible services such as MinIO.
	S3 pulumix.Input[*CacheToS3Args] `pulumi:"s3"`
}

func (*CacheToArgs) Defaults

func (val *CacheToArgs) Defaults() *CacheToArgs

Defaults sets the appropriate defaults for CacheToArgs

func (CacheToArgs) ElementType

func (CacheToArgs) ElementType() reflect.Type

func (CacheToArgs) ToCacheToOutput

func (i CacheToArgs) ToCacheToOutput() CacheToOutput

func (CacheToArgs) ToCacheToOutputWithContext

func (i CacheToArgs) ToCacheToOutputWithContext(ctx context.Context) CacheToOutput

func (*CacheToArgs) ToOutput

func (i *CacheToArgs) ToOutput(ctx context.Context) pulumix.Output[*CacheToArgs]

type CacheToAzureBlob

type CacheToAzureBlob struct {
	// Base URL of the storage account.
	AccountUrl *string `pulumi:"accountUrl"`
	// Ignore errors caused by failed cache exports.
	IgnoreError *bool `pulumi:"ignoreError"`
	// The cache mode to use. Defaults to `min`.
	Mode *CacheMode `pulumi:"mode"`
	// The name of the cache image.
	Name string `pulumi:"name"`
	// Blob storage account key.
	SecretAccessKey *string `pulumi:"secretAccessKey"`
}

func (*CacheToAzureBlob) Defaults

func (val *CacheToAzureBlob) Defaults() *CacheToAzureBlob

Defaults sets the appropriate defaults for CacheToAzureBlob

type CacheToAzureBlobArgs

type CacheToAzureBlobArgs struct {
	// Base URL of the storage account.
	AccountUrl pulumix.Input[*string] `pulumi:"accountUrl"`
	// Ignore errors caused by failed cache exports.
	IgnoreError pulumix.Input[*bool] `pulumi:"ignoreError"`
	// The cache mode to use. Defaults to `min`.
	Mode pulumix.Input[*CacheMode] `pulumi:"mode"`
	// The name of the cache image.
	Name pulumix.Input[string] `pulumi:"name"`
	// Blob storage account key.
	SecretAccessKey pulumix.Input[*string] `pulumi:"secretAccessKey"`
}

func (*CacheToAzureBlobArgs) Defaults

func (val *CacheToAzureBlobArgs) Defaults() *CacheToAzureBlobArgs

Defaults sets the appropriate defaults for CacheToAzureBlobArgs

func (CacheToAzureBlobArgs) ElementType

func (CacheToAzureBlobArgs) ElementType() reflect.Type

func (CacheToAzureBlobArgs) ToCacheToAzureBlobOutput

func (i CacheToAzureBlobArgs) ToCacheToAzureBlobOutput() CacheToAzureBlobOutput

func (CacheToAzureBlobArgs) ToCacheToAzureBlobOutputWithContext

func (i CacheToAzureBlobArgs) ToCacheToAzureBlobOutputWithContext(ctx context.Context) CacheToAzureBlobOutput

func (*CacheToAzureBlobArgs) ToOutput

type CacheToAzureBlobOutput

type CacheToAzureBlobOutput struct{ *pulumi.OutputState }

func (CacheToAzureBlobOutput) AccountUrl

func (o CacheToAzureBlobOutput) AccountUrl() pulumix.Output[*string]

Base URL of the storage account.

func (CacheToAzureBlobOutput) ElementType

func (CacheToAzureBlobOutput) ElementType() reflect.Type

func (CacheToAzureBlobOutput) IgnoreError

func (o CacheToAzureBlobOutput) IgnoreError() pulumix.Output[*bool]

Ignore errors caused by failed cache exports.

func (CacheToAzureBlobOutput) Mode

The cache mode to use. Defaults to `min`.

func (CacheToAzureBlobOutput) Name

The name of the cache image.

func (CacheToAzureBlobOutput) SecretAccessKey

func (o CacheToAzureBlobOutput) SecretAccessKey() pulumix.Output[*string]

Blob storage account key.

func (CacheToAzureBlobOutput) ToCacheToAzureBlobOutput

func (o CacheToAzureBlobOutput) ToCacheToAzureBlobOutput() CacheToAzureBlobOutput

func (CacheToAzureBlobOutput) ToCacheToAzureBlobOutputWithContext

func (o CacheToAzureBlobOutput) ToCacheToAzureBlobOutputWithContext(ctx context.Context) CacheToAzureBlobOutput

func (CacheToAzureBlobOutput) ToOutput

type CacheToGitHubActions

type CacheToGitHubActions struct {
	// Ignore errors caused by failed cache exports.
	IgnoreError *bool `pulumi:"ignoreError"`
	// The cache mode to use. Defaults to `min`.
	Mode *CacheMode `pulumi:"mode"`
	// The scope to use for cache keys. Defaults to `buildkit`.
	//
	// This should be set if building and caching multiple images in one
	// workflow, otherwise caches will overwrite each other.
	Scope *string `pulumi:"scope"`
}

Recommended for use with GitHub Actions workflows.

An action like `crazy-max/ghaction-github-runtime` is recommended to expose appropriate credentials to your GitHub workflow.

func (*CacheToGitHubActions) Defaults

func (val *CacheToGitHubActions) Defaults() *CacheToGitHubActions

Defaults sets the appropriate defaults for CacheToGitHubActions

type CacheToGitHubActionsArgs

type CacheToGitHubActionsArgs struct {
	// Ignore errors caused by failed cache exports.
	IgnoreError pulumix.Input[*bool] `pulumi:"ignoreError"`
	// The cache mode to use. Defaults to `min`.
	Mode pulumix.Input[*CacheMode] `pulumi:"mode"`
	// The scope to use for cache keys. Defaults to `buildkit`.
	//
	// This should be set if building and caching multiple images in one
	// workflow, otherwise caches will overwrite each other.
	Scope pulumix.Input[*string] `pulumi:"scope"`
}

Recommended for use with GitHub Actions workflows.

An action like `crazy-max/ghaction-github-runtime` is recommended to expose appropriate credentials to your GitHub workflow.

func (*CacheToGitHubActionsArgs) Defaults

Defaults sets the appropriate defaults for CacheToGitHubActionsArgs

func (CacheToGitHubActionsArgs) ElementType

func (CacheToGitHubActionsArgs) ElementType() reflect.Type

func (CacheToGitHubActionsArgs) ToCacheToGitHubActionsOutput

func (i CacheToGitHubActionsArgs) ToCacheToGitHubActionsOutput() CacheToGitHubActionsOutput

func (CacheToGitHubActionsArgs) ToCacheToGitHubActionsOutputWithContext

func (i CacheToGitHubActionsArgs) ToCacheToGitHubActionsOutputWithContext(ctx context.Context) CacheToGitHubActionsOutput

func (*CacheToGitHubActionsArgs) ToOutput

type CacheToGitHubActionsOutput

type CacheToGitHubActionsOutput struct{ *pulumi.OutputState }

Recommended for use with GitHub Actions workflows.

An action like `crazy-max/ghaction-github-runtime` is recommended to expose appropriate credentials to your GitHub workflow.

func (CacheToGitHubActionsOutput) ElementType

func (CacheToGitHubActionsOutput) ElementType() reflect.Type

func (CacheToGitHubActionsOutput) IgnoreError

func (o CacheToGitHubActionsOutput) IgnoreError() pulumix.Output[*bool]

Ignore errors caused by failed cache exports.

func (CacheToGitHubActionsOutput) Mode

The cache mode to use. Defaults to `min`.

func (CacheToGitHubActionsOutput) Scope

The scope to use for cache keys. Defaults to `buildkit`.

This should be set if building and caching multiple images in one workflow, otherwise caches will overwrite each other.

func (CacheToGitHubActionsOutput) ToCacheToGitHubActionsOutput

func (o CacheToGitHubActionsOutput) ToCacheToGitHubActionsOutput() CacheToGitHubActionsOutput

func (CacheToGitHubActionsOutput) ToCacheToGitHubActionsOutputWithContext

func (o CacheToGitHubActionsOutput) ToCacheToGitHubActionsOutputWithContext(ctx context.Context) CacheToGitHubActionsOutput

func (CacheToGitHubActionsOutput) ToOutput

type CacheToInline

type CacheToInline struct {
}

Include an inline cache with the exported image.

type CacheToInlineArgs

type CacheToInlineArgs struct {
}

Include an inline cache with the exported image.

func (CacheToInlineArgs) ElementType

func (CacheToInlineArgs) ElementType() reflect.Type

func (CacheToInlineArgs) ToCacheToInlineOutput

func (i CacheToInlineArgs) ToCacheToInlineOutput() CacheToInlineOutput

func (CacheToInlineArgs) ToCacheToInlineOutputWithContext

func (i CacheToInlineArgs) ToCacheToInlineOutputWithContext(ctx context.Context) CacheToInlineOutput

func (*CacheToInlineArgs) ToOutput

type CacheToInlineOutput

type CacheToInlineOutput struct{ *pulumi.OutputState }

Include an inline cache with the exported image.

func (CacheToInlineOutput) ElementType

func (CacheToInlineOutput) ElementType() reflect.Type

func (CacheToInlineOutput) ToCacheToInlineOutput

func (o CacheToInlineOutput) ToCacheToInlineOutput() CacheToInlineOutput

func (CacheToInlineOutput) ToCacheToInlineOutputWithContext

func (o CacheToInlineOutput) ToCacheToInlineOutputWithContext(ctx context.Context) CacheToInlineOutput

func (CacheToInlineOutput) ToOutput

type CacheToLocal

type CacheToLocal struct {
	// The compression type to use.
	Compression *CompressionType `pulumi:"compression"`
	// Compression level from 0 to 22.
	CompressionLevel *int `pulumi:"compressionLevel"`
	// Path of the local directory to export the cache.
	Dest string `pulumi:"dest"`
	// Forcefully apply compression.
	ForceCompression *bool `pulumi:"forceCompression"`
	// Ignore errors caused by failed cache exports.
	IgnoreError *bool `pulumi:"ignoreError"`
	// The cache mode to use. Defaults to `min`.
	Mode *CacheMode `pulumi:"mode"`
}

func (*CacheToLocal) Defaults

func (val *CacheToLocal) Defaults() *CacheToLocal

Defaults sets the appropriate defaults for CacheToLocal

type CacheToLocalArgs

type CacheToLocalArgs struct {
	// The compression type to use.
	Compression pulumix.Input[*CompressionType] `pulumi:"compression"`
	// Compression level from 0 to 22.
	CompressionLevel pulumix.Input[*int] `pulumi:"compressionLevel"`
	// Path of the local directory to export the cache.
	Dest pulumix.Input[string] `pulumi:"dest"`
	// Forcefully apply compression.
	ForceCompression pulumix.Input[*bool] `pulumi:"forceCompression"`
	// Ignore errors caused by failed cache exports.
	IgnoreError pulumix.Input[*bool] `pulumi:"ignoreError"`
	// The cache mode to use. Defaults to `min`.
	Mode pulumix.Input[*CacheMode] `pulumi:"mode"`
}

func (*CacheToLocalArgs) Defaults

func (val *CacheToLocalArgs) Defaults() *CacheToLocalArgs

Defaults sets the appropriate defaults for CacheToLocalArgs

func (CacheToLocalArgs) ElementType

func (CacheToLocalArgs) ElementType() reflect.Type

func (CacheToLocalArgs) ToCacheToLocalOutput

func (i CacheToLocalArgs) ToCacheToLocalOutput() CacheToLocalOutput

func (CacheToLocalArgs) ToCacheToLocalOutputWithContext

func (i CacheToLocalArgs) ToCacheToLocalOutputWithContext(ctx context.Context) CacheToLocalOutput

func (*CacheToLocalArgs) ToOutput

type CacheToLocalOutput

type CacheToLocalOutput struct{ *pulumi.OutputState }

func (CacheToLocalOutput) Compression

The compression type to use.

func (CacheToLocalOutput) CompressionLevel

func (o CacheToLocalOutput) CompressionLevel() pulumix.Output[*int]

Compression level from 0 to 22.

func (CacheToLocalOutput) Dest

Path of the local directory to export the cache.

func (CacheToLocalOutput) ElementType

func (CacheToLocalOutput) ElementType() reflect.Type

func (CacheToLocalOutput) ForceCompression

func (o CacheToLocalOutput) ForceCompression() pulumix.Output[*bool]

Forcefully apply compression.

func (CacheToLocalOutput) IgnoreError

func (o CacheToLocalOutput) IgnoreError() pulumix.Output[*bool]

Ignore errors caused by failed cache exports.

func (CacheToLocalOutput) Mode

The cache mode to use. Defaults to `min`.

func (CacheToLocalOutput) ToCacheToLocalOutput

func (o CacheToLocalOutput) ToCacheToLocalOutput() CacheToLocalOutput

func (CacheToLocalOutput) ToCacheToLocalOutputWithContext

func (o CacheToLocalOutput) ToCacheToLocalOutputWithContext(ctx context.Context) CacheToLocalOutput

func (CacheToLocalOutput) ToOutput

type CacheToOutput

type CacheToOutput struct{ *pulumi.OutputState }

func (CacheToOutput) Azblob

Push cache to Azure's blob storage service.

func (CacheToOutput) Disabled

func (o CacheToOutput) Disabled() pulumix.Output[*bool]

When `true` this entry will be excluded. Defaults to `false`.

func (CacheToOutput) ElementType

func (CacheToOutput) ElementType() reflect.Type

func (CacheToOutput) Gha

Recommended for use with GitHub Actions workflows.

An action like `crazy-max/ghaction-github-runtime` is recommended to expose appropriate credentials to your GitHub workflow.

func (CacheToOutput) Inline

The inline cache storage backend is the simplest implementation to get started with, but it does not handle multi-stage builds. Consider the `registry` cache backend instead.

func (CacheToOutput) Local

A simple backend which caches imagines on your local filesystem.

func (CacheToOutput) Raw

func (o CacheToOutput) Raw() pulumix.Output[*string]

A raw string as you would provide it to the Docker CLI (e.g., `type=inline`)

func (CacheToOutput) Registry

Push caches to remote registries. Incompatible with the `docker` build driver.

func (CacheToOutput) S3

Push cache to AWS S3 or S3-compatible services such as MinIO.

func (CacheToOutput) ToCacheToOutput

func (o CacheToOutput) ToCacheToOutput() CacheToOutput

func (CacheToOutput) ToCacheToOutputWithContext

func (o CacheToOutput) ToCacheToOutputWithContext(ctx context.Context) CacheToOutput

func (CacheToOutput) ToOutput

type CacheToRegistry

type CacheToRegistry struct {
	// The compression type to use.
	Compression *CompressionType `pulumi:"compression"`
	// Compression level from 0 to 22.
	CompressionLevel *int `pulumi:"compressionLevel"`
	// Forcefully apply compression.
	ForceCompression *bool `pulumi:"forceCompression"`
	// Ignore errors caused by failed cache exports.
	IgnoreError *bool `pulumi:"ignoreError"`
	// Export cache manifest as an OCI-compatible image manifest instead of a
	// manifest list. Requires `ociMediaTypes` to also be `true`.
	//
	// Some registries like AWS ECR will not work with caching if this is
	// `false`.
	//
	// Defaults to `false` to match Docker's default behavior.
	ImageManifest *bool `pulumi:"imageManifest"`
	// The cache mode to use. Defaults to `min`.
	Mode *CacheMode `pulumi:"mode"`
	// Whether to use OCI media types in exported manifests. Defaults to
	// `true`.
	OciMediaTypes *bool `pulumi:"ociMediaTypes"`
	// Fully qualified name of the cache image to import.
	Ref string `pulumi:"ref"`
}

func (*CacheToRegistry) Defaults

func (val *CacheToRegistry) Defaults() *CacheToRegistry

Defaults sets the appropriate defaults for CacheToRegistry

type CacheToRegistryArgs

type CacheToRegistryArgs struct {
	// The compression type to use.
	Compression pulumix.Input[*CompressionType] `pulumi:"compression"`
	// Compression level from 0 to 22.
	CompressionLevel pulumix.Input[*int] `pulumi:"compressionLevel"`
	// Forcefully apply compression.
	ForceCompression pulumix.Input[*bool] `pulumi:"forceCompression"`
	// Ignore errors caused by failed cache exports.
	IgnoreError pulumix.Input[*bool] `pulumi:"ignoreError"`
	// Export cache manifest as an OCI-compatible image manifest instead of a
	// manifest list. Requires `ociMediaTypes` to also be `true`.
	//
	// Some registries like AWS ECR will not work with caching if this is
	// `false`.
	//
	// Defaults to `false` to match Docker's default behavior.
	ImageManifest pulumix.Input[*bool] `pulumi:"imageManifest"`
	// The cache mode to use. Defaults to `min`.
	Mode pulumix.Input[*CacheMode] `pulumi:"mode"`
	// Whether to use OCI media types in exported manifests. Defaults to
	// `true`.
	OciMediaTypes pulumix.Input[*bool] `pulumi:"ociMediaTypes"`
	// Fully qualified name of the cache image to import.
	Ref pulumix.Input[string] `pulumi:"ref"`
}

func (*CacheToRegistryArgs) Defaults

func (val *CacheToRegistryArgs) Defaults() *CacheToRegistryArgs

Defaults sets the appropriate defaults for CacheToRegistryArgs

func (CacheToRegistryArgs) ElementType

func (CacheToRegistryArgs) ElementType() reflect.Type

func (CacheToRegistryArgs) ToCacheToRegistryOutput

func (i CacheToRegistryArgs) ToCacheToRegistryOutput() CacheToRegistryOutput

func (CacheToRegistryArgs) ToCacheToRegistryOutputWithContext

func (i CacheToRegistryArgs) ToCacheToRegistryOutputWithContext(ctx context.Context) CacheToRegistryOutput

func (*CacheToRegistryArgs) ToOutput

type CacheToRegistryOutput

type CacheToRegistryOutput struct{ *pulumi.OutputState }

func (CacheToRegistryOutput) Compression

The compression type to use.

func (CacheToRegistryOutput) CompressionLevel

func (o CacheToRegistryOutput) CompressionLevel() pulumix.Output[*int]

Compression level from 0 to 22.

func (CacheToRegistryOutput) ElementType

func (CacheToRegistryOutput) ElementType() reflect.Type

func (CacheToRegistryOutput) ForceCompression

func (o CacheToRegistryOutput) ForceCompression() pulumix.Output[*bool]

Forcefully apply compression.

func (CacheToRegistryOutput) IgnoreError

func (o CacheToRegistryOutput) IgnoreError() pulumix.Output[*bool]

Ignore errors caused by failed cache exports.

func (CacheToRegistryOutput) ImageManifest

func (o CacheToRegistryOutput) ImageManifest() pulumix.Output[*bool]

Export cache manifest as an OCI-compatible image manifest instead of a manifest list. Requires `ociMediaTypes` to also be `true`.

Some registries like AWS ECR will not work with caching if this is `false`.

Defaults to `false` to match Docker's default behavior.

func (CacheToRegistryOutput) Mode

The cache mode to use. Defaults to `min`.

func (CacheToRegistryOutput) OciMediaTypes

func (o CacheToRegistryOutput) OciMediaTypes() pulumix.Output[*bool]

Whether to use OCI media types in exported manifests. Defaults to `true`.

func (CacheToRegistryOutput) Ref

Fully qualified name of the cache image to import.

func (CacheToRegistryOutput) ToCacheToRegistryOutput

func (o CacheToRegistryOutput) ToCacheToRegistryOutput() CacheToRegistryOutput

func (CacheToRegistryOutput) ToCacheToRegistryOutputWithContext

func (o CacheToRegistryOutput) ToCacheToRegistryOutputWithContext(ctx context.Context) CacheToRegistryOutput

func (CacheToRegistryOutput) ToOutput

type CacheToS3

type CacheToS3 struct {
	// Defaults to `$AWS_ACCESS_KEY_ID`.
	AccessKeyId *string `pulumi:"accessKeyId"`
	// Prefix to prepend to blob filenames.
	BlobsPrefix *string `pulumi:"blobsPrefix"`
	// Name of the S3 bucket.
	Bucket string `pulumi:"bucket"`
	// Endpoint of the S3 bucket.
	EndpointUrl *string `pulumi:"endpointUrl"`
	// Ignore errors caused by failed cache exports.
	IgnoreError *bool `pulumi:"ignoreError"`
	// Prefix to prepend on manifest filenames.
	ManifestsPrefix *string `pulumi:"manifestsPrefix"`
	// The cache mode to use. Defaults to `min`.
	Mode *CacheMode `pulumi:"mode"`
	// Name of the cache image.
	Name *string `pulumi:"name"`
	// The geographic location of the bucket. Defaults to `$AWS_REGION`.
	Region string `pulumi:"region"`
	// Defaults to `$AWS_SECRET_ACCESS_KEY`.
	SecretAccessKey *string `pulumi:"secretAccessKey"`
	// Defaults to `$AWS_SESSION_TOKEN`.
	SessionToken *string `pulumi:"sessionToken"`
	// Uses `bucket` in the URL instead of hostname when `true`.
	UsePathStyle *bool `pulumi:"usePathStyle"`
}

func (*CacheToS3) Defaults

func (val *CacheToS3) Defaults() *CacheToS3

Defaults sets the appropriate defaults for CacheToS3

type CacheToS3Args

type CacheToS3Args struct {
	// Defaults to `$AWS_ACCESS_KEY_ID`.
	AccessKeyId pulumix.Input[*string] `pulumi:"accessKeyId"`
	// Prefix to prepend to blob filenames.
	BlobsPrefix pulumix.Input[*string] `pulumi:"blobsPrefix"`
	// Name of the S3 bucket.
	Bucket pulumix.Input[string] `pulumi:"bucket"`
	// Endpoint of the S3 bucket.
	EndpointUrl pulumix.Input[*string] `pulumi:"endpointUrl"`
	// Ignore errors caused by failed cache exports.
	IgnoreError pulumix.Input[*bool] `pulumi:"ignoreError"`
	// Prefix to prepend on manifest filenames.
	ManifestsPrefix pulumix.Input[*string] `pulumi:"manifestsPrefix"`
	// The cache mode to use. Defaults to `min`.
	Mode pulumix.Input[*CacheMode] `pulumi:"mode"`
	// Name of the cache image.
	Name pulumix.Input[*string] `pulumi:"name"`
	// The geographic location of the bucket. Defaults to `$AWS_REGION`.
	Region pulumix.Input[string] `pulumi:"region"`
	// Defaults to `$AWS_SECRET_ACCESS_KEY`.
	SecretAccessKey pulumix.Input[*string] `pulumi:"secretAccessKey"`
	// Defaults to `$AWS_SESSION_TOKEN`.
	SessionToken pulumix.Input[*string] `pulumi:"sessionToken"`
	// Uses `bucket` in the URL instead of hostname when `true`.
	UsePathStyle pulumix.Input[*bool] `pulumi:"usePathStyle"`
}

func (*CacheToS3Args) Defaults

func (val *CacheToS3Args) Defaults() *CacheToS3Args

Defaults sets the appropriate defaults for CacheToS3Args

func (CacheToS3Args) ElementType

func (CacheToS3Args) ElementType() reflect.Type

func (CacheToS3Args) ToCacheToS3Output

func (i CacheToS3Args) ToCacheToS3Output() CacheToS3Output

func (CacheToS3Args) ToCacheToS3OutputWithContext

func (i CacheToS3Args) ToCacheToS3OutputWithContext(ctx context.Context) CacheToS3Output

func (*CacheToS3Args) ToOutput

type CacheToS3Output

type CacheToS3Output struct{ *pulumi.OutputState }

func (CacheToS3Output) AccessKeyId

func (o CacheToS3Output) AccessKeyId() pulumix.Output[*string]

Defaults to `$AWS_ACCESS_KEY_ID`.

func (CacheToS3Output) BlobsPrefix

func (o CacheToS3Output) BlobsPrefix() pulumix.Output[*string]

Prefix to prepend to blob filenames.

func (CacheToS3Output) Bucket

func (o CacheToS3Output) Bucket() pulumix.Output[string]

Name of the S3 bucket.

func (CacheToS3Output) ElementType

func (CacheToS3Output) ElementType() reflect.Type

func (CacheToS3Output) EndpointUrl

func (o CacheToS3Output) EndpointUrl() pulumix.Output[*string]

Endpoint of the S3 bucket.

func (CacheToS3Output) IgnoreError

func (o CacheToS3Output) IgnoreError() pulumix.Output[*bool]

Ignore errors caused by failed cache exports.

func (CacheToS3Output) ManifestsPrefix

func (o CacheToS3Output) ManifestsPrefix() pulumix.Output[*string]

Prefix to prepend on manifest filenames.

func (CacheToS3Output) Mode

The cache mode to use. Defaults to `min`.

func (CacheToS3Output) Name

func (o CacheToS3Output) Name() pulumix.Output[*string]

Name of the cache image.

func (CacheToS3Output) Region

func (o CacheToS3Output) Region() pulumix.Output[string]

The geographic location of the bucket. Defaults to `$AWS_REGION`.

func (CacheToS3Output) SecretAccessKey

func (o CacheToS3Output) SecretAccessKey() pulumix.Output[*string]

Defaults to `$AWS_SECRET_ACCESS_KEY`.

func (CacheToS3Output) SessionToken

func (o CacheToS3Output) SessionToken() pulumix.Output[*string]

Defaults to `$AWS_SESSION_TOKEN`.

func (CacheToS3Output) ToCacheToS3Output

func (o CacheToS3Output) ToCacheToS3Output() CacheToS3Output

func (CacheToS3Output) ToCacheToS3OutputWithContext

func (o CacheToS3Output) ToCacheToS3OutputWithContext(ctx context.Context) CacheToS3Output

func (CacheToS3Output) ToOutput

func (CacheToS3Output) UsePathStyle

func (o CacheToS3Output) UsePathStyle() pulumix.Output[*bool]

Uses `bucket` in the URL instead of hostname when `true`.

type CompressionType

type CompressionType string

type Context

type Context struct {
	// Resources to use for build context.
	//
	// The location can be:
	// * A relative or absolute path to a local directory (`.`, `./app`,
	//   `/app`, etc.).
	// * A remote URL of a Git repository, tarball, or plain text file
	//   (`https://github.com/user/myrepo.git`, `http://server/context.tar.gz`,
	//   etc.).
	Location string `pulumi:"location"`
}

type ContextArgs

type ContextArgs struct {
	// Resources to use for build context.
	//
	// The location can be:
	// * A relative or absolute path to a local directory (`.`, `./app`,
	//   `/app`, etc.).
	// * A remote URL of a Git repository, tarball, or plain text file
	//   (`https://github.com/user/myrepo.git`, `http://server/context.tar.gz`,
	//   etc.).
	Location pulumix.Input[string] `pulumi:"location"`
}

func (ContextArgs) ElementType

func (ContextArgs) ElementType() reflect.Type

func (ContextArgs) ToContextOutput

func (i ContextArgs) ToContextOutput() ContextOutput

func (ContextArgs) ToContextOutputWithContext

func (i ContextArgs) ToContextOutputWithContext(ctx context.Context) ContextOutput

func (*ContextArgs) ToOutput

func (i *ContextArgs) ToOutput(ctx context.Context) pulumix.Output[*ContextArgs]

type ContextOutput

type ContextOutput struct{ *pulumi.OutputState }

func (ContextOutput) ElementType

func (ContextOutput) ElementType() reflect.Type

func (ContextOutput) Location

func (o ContextOutput) Location() pulumix.Output[string]

Resources to use for build context.

The location can be:

func (ContextOutput) ToContextOutput

func (o ContextOutput) ToContextOutput() ContextOutput

func (ContextOutput) ToContextOutputWithContext

func (o ContextOutput) ToContextOutputWithContext(ctx context.Context) ContextOutput

func (ContextOutput) ToOutput

type Dockerfile

type Dockerfile struct {
	// Raw Dockerfile contents.
	//
	// Conflicts with `location`.
	//
	// Equivalent to invoking Docker with `-f -`.
	Inline *string `pulumi:"inline"`
	// Location of the Dockerfile to use.
	//
	// Can be a relative or absolute path to a local file, or a remote URL.
	//
	// Defaults to `${context.location}/Dockerfile` if context is on-disk.
	//
	// Conflicts with `inline`.
	Location *string `pulumi:"location"`
}

type DockerfileArgs

type DockerfileArgs struct {
	// Raw Dockerfile contents.
	//
	// Conflicts with `location`.
	//
	// Equivalent to invoking Docker with `-f -`.
	Inline pulumix.Input[*string] `pulumi:"inline"`
	// Location of the Dockerfile to use.
	//
	// Can be a relative or absolute path to a local file, or a remote URL.
	//
	// Defaults to `${context.location}/Dockerfile` if context is on-disk.
	//
	// Conflicts with `inline`.
	Location pulumix.Input[*string] `pulumi:"location"`
}

func (DockerfileArgs) ElementType

func (DockerfileArgs) ElementType() reflect.Type

func (DockerfileArgs) ToDockerfileOutput

func (i DockerfileArgs) ToDockerfileOutput() DockerfileOutput

func (DockerfileArgs) ToDockerfileOutputWithContext

func (i DockerfileArgs) ToDockerfileOutputWithContext(ctx context.Context) DockerfileOutput

func (*DockerfileArgs) ToOutput

type DockerfileOutput

type DockerfileOutput struct{ *pulumi.OutputState }

func (DockerfileOutput) ElementType

func (DockerfileOutput) ElementType() reflect.Type

func (DockerfileOutput) Inline

func (o DockerfileOutput) Inline() pulumix.Output[*string]

Raw Dockerfile contents.

Conflicts with `location`.

Equivalent to invoking Docker with `-f -`.

func (DockerfileOutput) Location

func (o DockerfileOutput) Location() pulumix.Output[*string]

Location of the Dockerfile to use.

Can be a relative or absolute path to a local file, or a remote URL.

Defaults to `${context.location}/Dockerfile` if context is on-disk.

Conflicts with `inline`.

func (DockerfileOutput) ToDockerfileOutput

func (o DockerfileOutput) ToDockerfileOutput() DockerfileOutput

func (DockerfileOutput) ToDockerfileOutputWithContext

func (o DockerfileOutput) ToDockerfileOutputWithContext(ctx context.Context) DockerfileOutput

func (DockerfileOutput) ToOutput

type Export

type Export struct {
	// A no-op export. Helpful for silencing the 'no exports' warning if you
	// just want to populate caches.
	Cacheonly *ExportCacheOnly `pulumi:"cacheonly"`
	// When `true` this entry will be excluded. Defaults to `false`.
	Disabled *bool `pulumi:"disabled"`
	// Export as a Docker image layout.
	Docker *ExportDocker `pulumi:"docker"`
	// Outputs the build result into a container image format.
	Image *ExportImage `pulumi:"image"`
	// Export to a local directory as files and directories.
	Local *ExportLocal `pulumi:"local"`
	// Identical to the Docker exporter but uses OCI media types by default.
	Oci *ExportOCI `pulumi:"oci"`
	// A raw string as you would provide it to the Docker CLI (e.g.,
	// `type=docker`)
	Raw *string `pulumi:"raw"`
	// Identical to the Image exporter, but pushes by default.
	Registry *ExportRegistry `pulumi:"registry"`
	// Export to a local directory as a tarball.
	Tar *ExportTar `pulumi:"tar"`
}

func (*Export) Defaults

func (val *Export) Defaults() *Export

Defaults sets the appropriate defaults for Export

type ExportArgs

type ExportArgs struct {
	// A no-op export. Helpful for silencing the 'no exports' warning if you
	// just want to populate caches.
	Cacheonly pulumix.Input[*ExportCacheOnlyArgs] `pulumi:"cacheonly"`
	// When `true` this entry will be excluded. Defaults to `false`.
	Disabled pulumix.Input[*bool] `pulumi:"disabled"`
	// Export as a Docker image layout.
	Docker pulumix.Input[*ExportDockerArgs] `pulumi:"docker"`
	// Outputs the build result into a container image format.
	Image pulumix.Input[*ExportImageArgs] `pulumi:"image"`
	// Export to a local directory as files and directories.
	Local pulumix.Input[*ExportLocalArgs] `pulumi:"local"`
	// Identical to the Docker exporter but uses OCI media types by default.
	Oci pulumix.Input[*ExportOCIArgs] `pulumi:"oci"`
	// A raw string as you would provide it to the Docker CLI (e.g.,
	// `type=docker`)
	Raw pulumix.Input[*string] `pulumi:"raw"`
	// Identical to the Image exporter, but pushes by default.
	Registry pulumix.Input[*ExportRegistryArgs] `pulumi:"registry"`
	// Export to a local directory as a tarball.
	Tar pulumix.Input[*ExportTarArgs] `pulumi:"tar"`
}

func (*ExportArgs) Defaults

func (val *ExportArgs) Defaults() *ExportArgs

Defaults sets the appropriate defaults for ExportArgs

func (ExportArgs) ElementType

func (ExportArgs) ElementType() reflect.Type

func (ExportArgs) ToExportOutput

func (i ExportArgs) ToExportOutput() ExportOutput

func (ExportArgs) ToExportOutputWithContext

func (i ExportArgs) ToExportOutputWithContext(ctx context.Context) ExportOutput

func (*ExportArgs) ToOutput

func (i *ExportArgs) ToOutput(ctx context.Context) pulumix.Output[*ExportArgs]

type ExportCacheOnly

type ExportCacheOnly struct {
}

type ExportCacheOnlyArgs

type ExportCacheOnlyArgs struct {
}

func (ExportCacheOnlyArgs) ElementType

func (ExportCacheOnlyArgs) ElementType() reflect.Type

func (ExportCacheOnlyArgs) ToExportCacheOnlyOutput

func (i ExportCacheOnlyArgs) ToExportCacheOnlyOutput() ExportCacheOnlyOutput

func (ExportCacheOnlyArgs) ToExportCacheOnlyOutputWithContext

func (i ExportCacheOnlyArgs) ToExportCacheOnlyOutputWithContext(ctx context.Context) ExportCacheOnlyOutput

func (*ExportCacheOnlyArgs) ToOutput

type ExportCacheOnlyOutput

type ExportCacheOnlyOutput struct{ *pulumi.OutputState }

func (ExportCacheOnlyOutput) ElementType

func (ExportCacheOnlyOutput) ElementType() reflect.Type

func (ExportCacheOnlyOutput) ToExportCacheOnlyOutput

func (o ExportCacheOnlyOutput) ToExportCacheOnlyOutput() ExportCacheOnlyOutput

func (ExportCacheOnlyOutput) ToExportCacheOnlyOutputWithContext

func (o ExportCacheOnlyOutput) ToExportCacheOnlyOutputWithContext(ctx context.Context) ExportCacheOnlyOutput

func (ExportCacheOnlyOutput) ToOutput

type ExportDocker

type ExportDocker struct {
	// Attach an arbitrary key/value annotation to the image.
	Annotations map[string]string `pulumi:"annotations"`
	// The compression type to use.
	Compression *CompressionType `pulumi:"compression"`
	// Compression level from 0 to 22.
	CompressionLevel *int `pulumi:"compressionLevel"`
	// The local export path.
	Dest *string `pulumi:"dest"`
	// Forcefully apply compression.
	ForceCompression *bool `pulumi:"forceCompression"`
	// Specify images names to export. This is overridden if tags are already specified.
	Names []string `pulumi:"names"`
	// Use OCI media types in exporter manifests.
	OciMediaTypes *bool `pulumi:"ociMediaTypes"`
	// Bundle the output into a tarball layout.
	Tar *bool `pulumi:"tar"`
}

func (*ExportDocker) Defaults

func (val *ExportDocker) Defaults() *ExportDocker

Defaults sets the appropriate defaults for ExportDocker

type ExportDockerArgs

type ExportDockerArgs struct {
	// Attach an arbitrary key/value annotation to the image.
	Annotations pulumix.Input[map[string]string] `pulumi:"annotations"`
	// The compression type to use.
	Compression pulumix.Input[*CompressionType] `pulumi:"compression"`
	// Compression level from 0 to 22.
	CompressionLevel pulumix.Input[*int] `pulumi:"compressionLevel"`
	// The local export path.
	Dest pulumix.Input[*string] `pulumi:"dest"`
	// Forcefully apply compression.
	ForceCompression pulumix.Input[*bool] `pulumi:"forceCompression"`
	// Specify images names to export. This is overridden if tags are already specified.
	Names pulumix.Input[[]string] `pulumi:"names"`
	// Use OCI media types in exporter manifests.
	OciMediaTypes pulumix.Input[*bool] `pulumi:"ociMediaTypes"`
	// Bundle the output into a tarball layout.
	Tar pulumix.Input[*bool] `pulumi:"tar"`
}

func (*ExportDockerArgs) Defaults

func (val *ExportDockerArgs) Defaults() *ExportDockerArgs

Defaults sets the appropriate defaults for ExportDockerArgs

func (ExportDockerArgs) ElementType

func (ExportDockerArgs) ElementType() reflect.Type

func (ExportDockerArgs) ToExportDockerOutput

func (i ExportDockerArgs) ToExportDockerOutput() ExportDockerOutput

func (ExportDockerArgs) ToExportDockerOutputWithContext

func (i ExportDockerArgs) ToExportDockerOutputWithContext(ctx context.Context) ExportDockerOutput

func (*ExportDockerArgs) ToOutput

type ExportDockerOutput

type ExportDockerOutput struct{ *pulumi.OutputState }

func (ExportDockerOutput) Annotations

func (o ExportDockerOutput) Annotations() pulumix.MapOutput[string]

Attach an arbitrary key/value annotation to the image.

func (ExportDockerOutput) Compression

The compression type to use.

func (ExportDockerOutput) CompressionLevel

func (o ExportDockerOutput) CompressionLevel() pulumix.Output[*int]

Compression level from 0 to 22.

func (ExportDockerOutput) Dest

The local export path.

func (ExportDockerOutput) ElementType

func (ExportDockerOutput) ElementType() reflect.Type

func (ExportDockerOutput) ForceCompression

func (o ExportDockerOutput) ForceCompression() pulumix.Output[*bool]

Forcefully apply compression.

func (ExportDockerOutput) Names

Specify images names to export. This is overridden if tags are already specified.

func (ExportDockerOutput) OciMediaTypes

func (o ExportDockerOutput) OciMediaTypes() pulumix.Output[*bool]

Use OCI media types in exporter manifests.

func (ExportDockerOutput) Tar

Bundle the output into a tarball layout.

func (ExportDockerOutput) ToExportDockerOutput

func (o ExportDockerOutput) ToExportDockerOutput() ExportDockerOutput

func (ExportDockerOutput) ToExportDockerOutputWithContext

func (o ExportDockerOutput) ToExportDockerOutputWithContext(ctx context.Context) ExportDockerOutput

func (ExportDockerOutput) ToOutput

type ExportImage

type ExportImage struct {
	// Attach an arbitrary key/value annotation to the image.
	Annotations map[string]string `pulumi:"annotations"`
	// The compression type to use.
	Compression *CompressionType `pulumi:"compression"`
	// Compression level from 0 to 22.
	CompressionLevel *int `pulumi:"compressionLevel"`
	// Name image with `prefix@<digest>`, used for anonymous images.
	DanglingNamePrefix *string `pulumi:"danglingNamePrefix"`
	// Forcefully apply compression.
	ForceCompression *bool `pulumi:"forceCompression"`
	// Allow pushing to an insecure registry.
	Insecure *bool `pulumi:"insecure"`
	// Add additional canonical name (`name@<digest>`).
	NameCanonical *bool `pulumi:"nameCanonical"`
	// Specify images names to export. This is overridden if tags are already specified.
	Names []string `pulumi:"names"`
	// Use OCI media types in exporter manifests.
	OciMediaTypes *bool `pulumi:"ociMediaTypes"`
	// Push after creating the image. Defaults to `false`.
	Push *bool `pulumi:"push"`
	// Push image without name.
	PushByDigest *bool `pulumi:"pushByDigest"`
	// Store resulting images to the worker's image store and ensure all of
	// its blobs are in the content store.
	//
	// Defaults to `true`.
	//
	// Ignored if the worker doesn't have image store (when using OCI workers,
	// for example).
	Store *bool `pulumi:"store"`
	// Unpack image after creation (for use with containerd). Defaults to
	// `false`.
	Unpack *bool `pulumi:"unpack"`
}

func (*ExportImage) Defaults

func (val *ExportImage) Defaults() *ExportImage

Defaults sets the appropriate defaults for ExportImage

type ExportImageArgs

type ExportImageArgs struct {
	// Attach an arbitrary key/value annotation to the image.
	Annotations pulumix.Input[map[string]string] `pulumi:"annotations"`
	// The compression type to use.
	Compression pulumix.Input[*CompressionType] `pulumi:"compression"`
	// Compression level from 0 to 22.
	CompressionLevel pulumix.Input[*int] `pulumi:"compressionLevel"`
	// Name image with `prefix@<digest>`, used for anonymous images.
	DanglingNamePrefix pulumix.Input[*string] `pulumi:"danglingNamePrefix"`
	// Forcefully apply compression.
	ForceCompression pulumix.Input[*bool] `pulumi:"forceCompression"`
	// Allow pushing to an insecure registry.
	Insecure pulumix.Input[*bool] `pulumi:"insecure"`
	// Add additional canonical name (`name@<digest>`).
	NameCanonical pulumix.Input[*bool] `pulumi:"nameCanonical"`
	// Specify images names to export. This is overridden if tags are already specified.
	Names pulumix.Input[[]string] `pulumi:"names"`
	// Use OCI media types in exporter manifests.
	OciMediaTypes pulumix.Input[*bool] `pulumi:"ociMediaTypes"`
	// Push after creating the image. Defaults to `false`.
	Push pulumix.Input[*bool] `pulumi:"push"`
	// Push image without name.
	PushByDigest pulumix.Input[*bool] `pulumi:"pushByDigest"`
	// Store resulting images to the worker's image store and ensure all of
	// its blobs are in the content store.
	//
	// Defaults to `true`.
	//
	// Ignored if the worker doesn't have image store (when using OCI workers,
	// for example).
	Store pulumix.Input[*bool] `pulumi:"store"`
	// Unpack image after creation (for use with containerd). Defaults to
	// `false`.
	Unpack pulumix.Input[*bool] `pulumi:"unpack"`
}

func (*ExportImageArgs) Defaults

func (val *ExportImageArgs) Defaults() *ExportImageArgs

Defaults sets the appropriate defaults for ExportImageArgs

func (ExportImageArgs) ElementType

func (ExportImageArgs) ElementType() reflect.Type

func (ExportImageArgs) ToExportImageOutput

func (i ExportImageArgs) ToExportImageOutput() ExportImageOutput

func (ExportImageArgs) ToExportImageOutputWithContext

func (i ExportImageArgs) ToExportImageOutputWithContext(ctx context.Context) ExportImageOutput

func (*ExportImageArgs) ToOutput

type ExportImageOutput

type ExportImageOutput struct{ *pulumi.OutputState }

func (ExportImageOutput) Annotations

func (o ExportImageOutput) Annotations() pulumix.MapOutput[string]

Attach an arbitrary key/value annotation to the image.

func (ExportImageOutput) Compression

func (o ExportImageOutput) Compression() pulumix.Output[*CompressionType]

The compression type to use.

func (ExportImageOutput) CompressionLevel

func (o ExportImageOutput) CompressionLevel() pulumix.Output[*int]

Compression level from 0 to 22.

func (ExportImageOutput) DanglingNamePrefix

func (o ExportImageOutput) DanglingNamePrefix() pulumix.Output[*string]

Name image with `prefix@<digest>`, used for anonymous images.

func (ExportImageOutput) ElementType

func (ExportImageOutput) ElementType() reflect.Type

func (ExportImageOutput) ForceCompression

func (o ExportImageOutput) ForceCompression() pulumix.Output[*bool]

Forcefully apply compression.

func (ExportImageOutput) Insecure

func (o ExportImageOutput) Insecure() pulumix.Output[*bool]

Allow pushing to an insecure registry.

func (ExportImageOutput) NameCanonical

func (o ExportImageOutput) NameCanonical() pulumix.Output[*bool]

Add additional canonical name (`name@<digest>`).

func (ExportImageOutput) Names

Specify images names to export. This is overridden if tags are already specified.

func (ExportImageOutput) OciMediaTypes

func (o ExportImageOutput) OciMediaTypes() pulumix.Output[*bool]

Use OCI media types in exporter manifests.

func (ExportImageOutput) Push

func (o ExportImageOutput) Push() pulumix.Output[*bool]

Push after creating the image. Defaults to `false`.

func (ExportImageOutput) PushByDigest

func (o ExportImageOutput) PushByDigest() pulumix.Output[*bool]

Push image without name.

func (ExportImageOutput) Store

func (o ExportImageOutput) Store() pulumix.Output[*bool]

Store resulting images to the worker's image store and ensure all of its blobs are in the content store.

Defaults to `true`.

Ignored if the worker doesn't have image store (when using OCI workers, for example).

func (ExportImageOutput) ToExportImageOutput

func (o ExportImageOutput) ToExportImageOutput() ExportImageOutput

func (ExportImageOutput) ToExportImageOutputWithContext

func (o ExportImageOutput) ToExportImageOutputWithContext(ctx context.Context) ExportImageOutput

func (ExportImageOutput) ToOutput

func (ExportImageOutput) Unpack

func (o ExportImageOutput) Unpack() pulumix.Output[*bool]

Unpack image after creation (for use with containerd). Defaults to `false`.

type ExportLocal

type ExportLocal struct {
	// Output path.
	Dest string `pulumi:"dest"`
}

type ExportLocalArgs

type ExportLocalArgs struct {
	// Output path.
	Dest pulumix.Input[string] `pulumi:"dest"`
}

func (ExportLocalArgs) ElementType

func (ExportLocalArgs) ElementType() reflect.Type

func (ExportLocalArgs) ToExportLocalOutput

func (i ExportLocalArgs) ToExportLocalOutput() ExportLocalOutput

func (ExportLocalArgs) ToExportLocalOutputWithContext

func (i ExportLocalArgs) ToExportLocalOutputWithContext(ctx context.Context) ExportLocalOutput

func (*ExportLocalArgs) ToOutput

type ExportLocalOutput

type ExportLocalOutput struct{ *pulumi.OutputState }

func (ExportLocalOutput) Dest

Output path.

func (ExportLocalOutput) ElementType

func (ExportLocalOutput) ElementType() reflect.Type

func (ExportLocalOutput) ToExportLocalOutput

func (o ExportLocalOutput) ToExportLocalOutput() ExportLocalOutput

func (ExportLocalOutput) ToExportLocalOutputWithContext

func (o ExportLocalOutput) ToExportLocalOutputWithContext(ctx context.Context) ExportLocalOutput

func (ExportLocalOutput) ToOutput

type ExportOCI

type ExportOCI struct {
	// Attach an arbitrary key/value annotation to the image.
	Annotations map[string]string `pulumi:"annotations"`
	// The compression type to use.
	Compression *CompressionType `pulumi:"compression"`
	// Compression level from 0 to 22.
	CompressionLevel *int `pulumi:"compressionLevel"`
	// The local export path.
	Dest *string `pulumi:"dest"`
	// Forcefully apply compression.
	ForceCompression *bool `pulumi:"forceCompression"`
	// Specify images names to export. This is overridden if tags are already specified.
	Names []string `pulumi:"names"`
	// Use OCI media types in exporter manifests.
	OciMediaTypes *bool `pulumi:"ociMediaTypes"`
	// Bundle the output into a tarball layout.
	Tar *bool `pulumi:"tar"`
}

func (*ExportOCI) Defaults

func (val *ExportOCI) Defaults() *ExportOCI

Defaults sets the appropriate defaults for ExportOCI

type ExportOCIArgs

type ExportOCIArgs struct {
	// Attach an arbitrary key/value annotation to the image.
	Annotations pulumix.Input[map[string]string] `pulumi:"annotations"`
	// The compression type to use.
	Compression pulumix.Input[*CompressionType] `pulumi:"compression"`
	// Compression level from 0 to 22.
	CompressionLevel pulumix.Input[*int] `pulumi:"compressionLevel"`
	// The local export path.
	Dest pulumix.Input[*string] `pulumi:"dest"`
	// Forcefully apply compression.
	ForceCompression pulumix.Input[*bool] `pulumi:"forceCompression"`
	// Specify images names to export. This is overridden if tags are already specified.
	Names pulumix.Input[[]string] `pulumi:"names"`
	// Use OCI media types in exporter manifests.
	OciMediaTypes pulumix.Input[*bool] `pulumi:"ociMediaTypes"`
	// Bundle the output into a tarball layout.
	Tar pulumix.Input[*bool] `pulumi:"tar"`
}

func (*ExportOCIArgs) Defaults

func (val *ExportOCIArgs) Defaults() *ExportOCIArgs

Defaults sets the appropriate defaults for ExportOCIArgs

func (ExportOCIArgs) ElementType

func (ExportOCIArgs) ElementType() reflect.Type

func (ExportOCIArgs) ToExportOCIOutput

func (i ExportOCIArgs) ToExportOCIOutput() ExportOCIOutput

func (ExportOCIArgs) ToExportOCIOutputWithContext

func (i ExportOCIArgs) ToExportOCIOutputWithContext(ctx context.Context) ExportOCIOutput

func (*ExportOCIArgs) ToOutput

type ExportOCIOutput

type ExportOCIOutput struct{ *pulumi.OutputState }

func (ExportOCIOutput) Annotations

func (o ExportOCIOutput) Annotations() pulumix.MapOutput[string]

Attach an arbitrary key/value annotation to the image.

func (ExportOCIOutput) Compression

func (o ExportOCIOutput) Compression() pulumix.Output[*CompressionType]

The compression type to use.

func (ExportOCIOutput) CompressionLevel

func (o ExportOCIOutput) CompressionLevel() pulumix.Output[*int]

Compression level from 0 to 22.

func (ExportOCIOutput) Dest

func (o ExportOCIOutput) Dest() pulumix.Output[*string]

The local export path.

func (ExportOCIOutput) ElementType

func (ExportOCIOutput) ElementType() reflect.Type

func (ExportOCIOutput) ForceCompression

func (o ExportOCIOutput) ForceCompression() pulumix.Output[*bool]

Forcefully apply compression.

func (ExportOCIOutput) Names

Specify images names to export. This is overridden if tags are already specified.

func (ExportOCIOutput) OciMediaTypes

func (o ExportOCIOutput) OciMediaTypes() pulumix.Output[*bool]

Use OCI media types in exporter manifests.

func (ExportOCIOutput) Tar

func (o ExportOCIOutput) Tar() pulumix.Output[*bool]

Bundle the output into a tarball layout.

func (ExportOCIOutput) ToExportOCIOutput

func (o ExportOCIOutput) ToExportOCIOutput() ExportOCIOutput

func (ExportOCIOutput) ToExportOCIOutputWithContext

func (o ExportOCIOutput) ToExportOCIOutputWithContext(ctx context.Context) ExportOCIOutput

func (ExportOCIOutput) ToOutput

type ExportOutput

type ExportOutput struct{ *pulumi.OutputState }

func (ExportOutput) Cacheonly

A no-op export. Helpful for silencing the 'no exports' warning if you just want to populate caches.

func (ExportOutput) Disabled

func (o ExportOutput) Disabled() pulumix.Output[*bool]

When `true` this entry will be excluded. Defaults to `false`.

func (ExportOutput) Docker

Export as a Docker image layout.

func (ExportOutput) ElementType

func (ExportOutput) ElementType() reflect.Type

func (ExportOutput) Image

Outputs the build result into a container image format.

func (ExportOutput) Local

Export to a local directory as files and directories.

func (ExportOutput) Oci

Identical to the Docker exporter but uses OCI media types by default.

func (ExportOutput) Raw

func (o ExportOutput) Raw() pulumix.Output[*string]

A raw string as you would provide it to the Docker CLI (e.g., `type=docker`)

func (ExportOutput) Registry

Identical to the Image exporter, but pushes by default.

func (ExportOutput) Tar

Export to a local directory as a tarball.

func (ExportOutput) ToExportOutput

func (o ExportOutput) ToExportOutput() ExportOutput

func (ExportOutput) ToExportOutputWithContext

func (o ExportOutput) ToExportOutputWithContext(ctx context.Context) ExportOutput

func (ExportOutput) ToOutput

func (o ExportOutput) ToOutput(ctx context.Context) pulumix.Output[Export]

type ExportRegistry

type ExportRegistry struct {
	// Attach an arbitrary key/value annotation to the image.
	Annotations map[string]string `pulumi:"annotations"`
	// The compression type to use.
	Compression *CompressionType `pulumi:"compression"`
	// Compression level from 0 to 22.
	CompressionLevel *int `pulumi:"compressionLevel"`
	// Name image with `prefix@<digest>`, used for anonymous images.
	DanglingNamePrefix *string `pulumi:"danglingNamePrefix"`
	// Forcefully apply compression.
	ForceCompression *bool `pulumi:"forceCompression"`
	// Allow pushing to an insecure registry.
	Insecure *bool `pulumi:"insecure"`
	// Add additional canonical name (`name@<digest>`).
	NameCanonical *bool `pulumi:"nameCanonical"`
	// Specify images names to export. This is overridden if tags are already specified.
	Names []string `pulumi:"names"`
	// Use OCI media types in exporter manifests.
	OciMediaTypes *bool `pulumi:"ociMediaTypes"`
	// Push after creating the image. Defaults to `true`.
	Push *bool `pulumi:"push"`
	// Push image without name.
	PushByDigest *bool `pulumi:"pushByDigest"`
	// Store resulting images to the worker's image store and ensure all of
	// its blobs are in the content store.
	//
	// Defaults to `true`.
	//
	// Ignored if the worker doesn't have image store (when using OCI workers,
	// for example).
	Store *bool `pulumi:"store"`
	// Unpack image after creation (for use with containerd). Defaults to
	// `false`.
	Unpack *bool `pulumi:"unpack"`
}

func (*ExportRegistry) Defaults

func (val *ExportRegistry) Defaults() *ExportRegistry

Defaults sets the appropriate defaults for ExportRegistry

type ExportRegistryArgs

type ExportRegistryArgs struct {
	// Attach an arbitrary key/value annotation to the image.
	Annotations pulumix.Input[map[string]string] `pulumi:"annotations"`
	// The compression type to use.
	Compression pulumix.Input[*CompressionType] `pulumi:"compression"`
	// Compression level from 0 to 22.
	CompressionLevel pulumix.Input[*int] `pulumi:"compressionLevel"`
	// Name image with `prefix@<digest>`, used for anonymous images.
	DanglingNamePrefix pulumix.Input[*string] `pulumi:"danglingNamePrefix"`
	// Forcefully apply compression.
	ForceCompression pulumix.Input[*bool] `pulumi:"forceCompression"`
	// Allow pushing to an insecure registry.
	Insecure pulumix.Input[*bool] `pulumi:"insecure"`
	// Add additional canonical name (`name@<digest>`).
	NameCanonical pulumix.Input[*bool] `pulumi:"nameCanonical"`
	// Specify images names to export. This is overridden if tags are already specified.
	Names pulumix.Input[[]string] `pulumi:"names"`
	// Use OCI media types in exporter manifests.
	OciMediaTypes pulumix.Input[*bool] `pulumi:"ociMediaTypes"`
	// Push after creating the image. Defaults to `true`.
	Push pulumix.Input[*bool] `pulumi:"push"`
	// Push image without name.
	PushByDigest pulumix.Input[*bool] `pulumi:"pushByDigest"`
	// Store resulting images to the worker's image store and ensure all of
	// its blobs are in the content store.
	//
	// Defaults to `true`.
	//
	// Ignored if the worker doesn't have image store (when using OCI workers,
	// for example).
	Store pulumix.Input[*bool] `pulumi:"store"`
	// Unpack image after creation (for use with containerd). Defaults to
	// `false`.
	Unpack pulumix.Input[*bool] `pulumi:"unpack"`
}

func (*ExportRegistryArgs) Defaults

func (val *ExportRegistryArgs) Defaults() *ExportRegistryArgs

Defaults sets the appropriate defaults for ExportRegistryArgs

func (ExportRegistryArgs) ElementType

func (ExportRegistryArgs) ElementType() reflect.Type

func (ExportRegistryArgs) ToExportRegistryOutput

func (i ExportRegistryArgs) ToExportRegistryOutput() ExportRegistryOutput

func (ExportRegistryArgs) ToExportRegistryOutputWithContext

func (i ExportRegistryArgs) ToExportRegistryOutputWithContext(ctx context.Context) ExportRegistryOutput

func (*ExportRegistryArgs) ToOutput

type ExportRegistryOutput

type ExportRegistryOutput struct{ *pulumi.OutputState }

func (ExportRegistryOutput) Annotations

func (o ExportRegistryOutput) Annotations() pulumix.MapOutput[string]

Attach an arbitrary key/value annotation to the image.

func (ExportRegistryOutput) Compression

The compression type to use.

func (ExportRegistryOutput) CompressionLevel

func (o ExportRegistryOutput) CompressionLevel() pulumix.Output[*int]

Compression level from 0 to 22.

func (ExportRegistryOutput) DanglingNamePrefix

func (o ExportRegistryOutput) DanglingNamePrefix() pulumix.Output[*string]

Name image with `prefix@<digest>`, used for anonymous images.

func (ExportRegistryOutput) ElementType

func (ExportRegistryOutput) ElementType() reflect.Type

func (ExportRegistryOutput) ForceCompression

func (o ExportRegistryOutput) ForceCompression() pulumix.Output[*bool]

Forcefully apply compression.

func (ExportRegistryOutput) Insecure

func (o ExportRegistryOutput) Insecure() pulumix.Output[*bool]

Allow pushing to an insecure registry.

func (ExportRegistryOutput) NameCanonical

func (o ExportRegistryOutput) NameCanonical() pulumix.Output[*bool]

Add additional canonical name (`name@<digest>`).

func (ExportRegistryOutput) Names

Specify images names to export. This is overridden if tags are already specified.

func (ExportRegistryOutput) OciMediaTypes

func (o ExportRegistryOutput) OciMediaTypes() pulumix.Output[*bool]

Use OCI media types in exporter manifests.

func (ExportRegistryOutput) Push

Push after creating the image. Defaults to `true`.

func (ExportRegistryOutput) PushByDigest

func (o ExportRegistryOutput) PushByDigest() pulumix.Output[*bool]

Push image without name.

func (ExportRegistryOutput) Store

Store resulting images to the worker's image store and ensure all of its blobs are in the content store.

Defaults to `true`.

Ignored if the worker doesn't have image store (when using OCI workers, for example).

func (ExportRegistryOutput) ToExportRegistryOutput

func (o ExportRegistryOutput) ToExportRegistryOutput() ExportRegistryOutput

func (ExportRegistryOutput) ToExportRegistryOutputWithContext

func (o ExportRegistryOutput) ToExportRegistryOutputWithContext(ctx context.Context) ExportRegistryOutput

func (ExportRegistryOutput) ToOutput

func (ExportRegistryOutput) Unpack

func (o ExportRegistryOutput) Unpack() pulumix.Output[*bool]

Unpack image after creation (for use with containerd). Defaults to `false`.

type ExportTar

type ExportTar struct {
	// Output path.
	Dest string `pulumi:"dest"`
}

type ExportTarArgs

type ExportTarArgs struct {
	// Output path.
	Dest pulumix.Input[string] `pulumi:"dest"`
}

func (ExportTarArgs) ElementType

func (ExportTarArgs) ElementType() reflect.Type

func (ExportTarArgs) ToExportTarOutput

func (i ExportTarArgs) ToExportTarOutput() ExportTarOutput

func (ExportTarArgs) ToExportTarOutputWithContext

func (i ExportTarArgs) ToExportTarOutputWithContext(ctx context.Context) ExportTarOutput

func (*ExportTarArgs) ToOutput

type ExportTarOutput

type ExportTarOutput struct{ *pulumi.OutputState }

func (ExportTarOutput) Dest

Output path.

func (ExportTarOutput) ElementType

func (ExportTarOutput) ElementType() reflect.Type

func (ExportTarOutput) ToExportTarOutput

func (o ExportTarOutput) ToExportTarOutput() ExportTarOutput

func (ExportTarOutput) ToExportTarOutputWithContext

func (o ExportTarOutput) ToExportTarOutputWithContext(ctx context.Context) ExportTarOutput

func (ExportTarOutput) ToOutput

type Image

type Image struct {
	pulumi.CustomResourceState

	// Custom `host:ip` mappings to use during the build.
	//
	// Equivalent to Docker's `--add-host` flag.
	AddHosts pulumix.ArrayOutput[string] `pulumi:"addHosts"`
	// `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.
	BuildArgs pulumix.MapOutput[string] `pulumi:"buildArgs"`
	// Setting this to `false` will always skip image builds during previews,
	// and setting it to `true` will always build images during previews.
	//
	// Images built during previews are never exported to registries, however
	// cache manifests are still exported.
	//
	// On-disk Dockerfiles are always validated for syntactic correctness
	// regardless of this setting.
	//
	// Defaults to `true` as a safeguard against broken images merging as part
	// of CI pipelines.
	BuildOnPreview pulumix.Output[*bool] `pulumi:"buildOnPreview"`
	// Builder configuration.
	Builder pulumix.GPtrOutput[BuilderConfig, BuilderConfigOutput] `pulumi:"builder"`
	// Cache export configuration.
	//
	// Equivalent to Docker's `--cache-from` flag.
	CacheFrom pulumix.GArrayOutput[CacheFrom, CacheFromOutput] `pulumi:"cacheFrom"`
	// Cache import configuration.
	//
	// Equivalent to Docker's `--cache-to` flag.
	CacheTo pulumix.GArrayOutput[CacheTo, CacheToOutput] `pulumi:"cacheTo"`
	// Build context settings. Defaults to the current directory.
	//
	// Equivalent to Docker's `PATH | URL | -` positional argument.
	Context pulumix.GPtrOutput[BuildContext, BuildContextOutput] `pulumi:"context"`
	// A preliminary hash of the image's build context.
	//
	// Pulumi uses this to determine if an image _may_ need to be re-built.
	ContextHash pulumix.Output[string] `pulumi:"contextHash"`
	// A SHA256 digest of the image if it was exported to a registry or
	// elsewhere.
	//
	// Empty if the image was not exported.
	//
	// Registry images can be referenced precisely as `<tag>@<digest>`. The
	// `ref` output provides one such reference as a convenience.
	Digest pulumix.Output[string] `pulumi:"digest"`
	// Dockerfile settings.
	//
	// Equivalent to Docker's `--file` flag.
	Dockerfile pulumix.GPtrOutput[Dockerfile, DockerfileOutput] `pulumi:"dockerfile"`
	// 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](https://docs.docker.com/build/cloud/setup/) (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.
	Exec pulumix.Output[*bool] `pulumi:"exec"`
	// 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.
	Exports pulumix.GArrayOutput[Export, ExportOutput] `pulumi:"exports"`
	// Attach arbitrary key/value metadata to the image.
	//
	// Equivalent to Docker's `--label` flag.
	Labels pulumix.MapOutput[string] `pulumi:"labels"`
	// When `true` the build will automatically include a `docker` export.
	//
	// Defaults to `false`.
	//
	// Equivalent to Docker's `--load` flag.
	Load pulumix.Output[*bool] `pulumi:"load"`
	// 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.
	Network pulumix.Output[*NetworkMode] `pulumi:"network"`
	// Do not import cache manifests when building the image.
	//
	// Equivalent to Docker's `--no-cache` flag.
	NoCache pulumix.Output[*bool] `pulumi:"noCache"`
	// Set target platform(s) for the build. Defaults to the host's platform.
	//
	// Equivalent to Docker's `--platform` flag.
	Platforms pulumix.ArrayOutput[Platform] `pulumi:"platforms"`
	// Always pull referenced images.
	//
	// Equivalent to Docker's `--pull` flag.
	Pull pulumix.Output[*bool] `pulumi:"pull"`
	// When `true` the build will automatically include a `registry` export.
	//
	// Defaults to `false`.
	//
	// Equivalent to Docker's `--push` flag.
	Push pulumix.Output[bool] `pulumi:"push"`
	// If the image was pushed to any registries then this will contain a
	// single fully-qualified tag including the build's digest.
	//
	// If the image had tags but was not exported, this will take on a value
	// of one of those tags.
	//
	// This will be empty if the image had no exports and no tags.
	//
	// This is only for convenience and may not be appropriate for situations
	// where multiple tags or registries are involved. In those cases this
	// output is not guaranteed to be stable.
	//
	// For more control over tags consumed by downstream resources you should
	// use the `digest` output.
	Ref pulumix.Output[string] `pulumi:"ref"`
	// Registry credentials. Required if reading or exporting to private
	// repositories.
	//
	// Credentials are kept in-memory and do not pollute pre-existing
	// credentials on the host.
	//
	// Similar to `docker login`.
	Registries pulumix.GArrayOutput[Registry, RegistryOutput] `pulumi:"registries"`
	// 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.
	Secrets pulumix.MapOutput[string] `pulumi:"secrets"`
	// SSH agent socket or keys to expose to the build.
	//
	// Equivalent to Docker's `--ssh` flag.
	Ssh pulumix.GArrayOutput[SSH, SSHOutput] `pulumi:"ssh"`
	// Name and optionally a tag (format: `name:tag`).
	//
	// If exporting to a registry, the name should include the fully qualified
	// registry address (e.g. `docker.io/pulumi/pulumi:latest`).
	//
	// Equivalent to Docker's `--tag` flag.
	Tags pulumix.ArrayOutput[string] `pulumi:"tags"`
	// Set the target build stage(s) to build.
	//
	// If not specified all targets will be built by default.
	//
	// Equivalent to Docker's `--target` flag.
	Target pulumix.Output[*string] `pulumi:"target"`
}

A Docker image built using buildx -- Docker's interface to the improved BuildKit backend.

## Stability

**This resource is pre-1.0 and in public preview.**

We will strive to keep APIs and behavior as stable as possible, but we cannot guarantee stability until version 1.0.

## Migrating Pulumi Docker v3 and v4 Image resources

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. Existing `Image` resources can be converted to the docker-build `Image` resources with minor modifications.

### Behavioral differences

There are several key behavioral differences to keep in mind when transitioning images to the new `Image` resource.

#### Previews

Version `3.x` of the Pulumi Docker provider always builds images during preview operations. 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.

Version `4.x` changed build-on-preview behavior to be opt-in. By default, `v4.x` `Image` resources do _not_ build during previews, but this behavior can be toggled with the `buildOnPreview` option. Several users reported outages due to the default behavior allowing bad images to accidentally sneak through CI.

The default behavior of this provider's `Image` resource is similar to `3.x` and will build images during previews. This behavior can be changed by specifying `buildOnPreview`.

#### Push behavior

Versions `3.x` and `4.x` of the Pulumi Docker provider attempt to push images to remote registries by default. They expose a `skipPush: true` option to disable pushing.

This provider's `Image` resource matches the Docker CLI's behavior and does not push images anywhere by default.

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`). 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.

#### Secrets

Version `3.x` of the Pulumi Docker provider supports secrets by way of the `extraOptions` field.

Version `4.x` of the Pulumi Docker provider does not support secrets.

The `Image` resource supports secrets but does not require those secrets to exist on-disk or in environment variables. Instead, they should be passed directly as values. (Please be sure to familiarize yourself with Pulumi's [native secret handling](https://www.pulumi.com/docs/concepts/secrets/).) Pulumi also provides [ESC](https://www.pulumi.com/product/esc/) to make it easier to share secrets across stacks and environments.

#### Caching

Version `3.x` of the Pulumi Docker provider exposes `cacheFrom: bool | { stages: [...] }`. It builds targets individually and pushes them to separate images for caching.

Version `4.x` exposes a similar parameter `cacheFrom: { images: [...] }` which pushes and pulls inline caches.

Both versions 3 and 4 require specific environment variables to be set and deviate from Docker's native caching behavior. This can result in inefficient builds due to unnecessary image pulls, repeated file transfers, etc.

The `Image` resource delegates all caching behavior to Docker. `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.

#### Outputs

Versions `3.x` and `4.x` of the provider exposed a `repoDigest` output which was a fully qualified tag with digest. In `4.x` this could also be a single sha256 hash if the image wasn't pushed.

Unlike earlier providers the `Image` resource can push multiple tags. As a convenience, it exposes a `ref` output consisting of a tag with digest as long as the image was pushed. If multiple tags were pushed this uses one at random.

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.

#### Tag deletion and refreshes

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.

The `buidx.Image` will query your registries during `refresh` to ensure the expected tags exist. If any are missing a subsequent `update` will push them.

When a `Image` is deleted, it will _attempt_ to also delete any pushed tags. Deletion of remote tags is not guaranteed because not all registries support the manifest `DELETE` API (`docker.io` in particular). 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.

Use the [`retainOnDelete: true`](https://www.pulumi.com/docs/concepts/options/retainondelete/) option if you do not want tags deleted.

### Example migration

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.

The `v3` resource leverages `buildx` via a `DOCKER_BUILDKIT` environment variable and CLI flags passed in with `extraOption`. After migration, the environment variable is no longer needed and CLI flags are now properties on the `Image`. In almost all cases, properties of `Image` are named after the Docker CLI flag they correspond to.

The `v4` resource is less functional than its `v3` counterpart because it lacks the flexibility of `extraOptions`. It it is shown with parameters similar to the `v3` example for completeness.

## Example Usage

## Example Usage ### Push to AWS ECR with caching ```go package main

import (

"fmt"

"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ecr"
"github.com/pulumi/pulumi-docker-build/sdk/go/dockerbuild"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		ecrRepository, err := ecr.NewRepository(ctx, "ecr-repository", nil)
		if err != nil {
			return err
		}
		authToken := ecr.GetAuthorizationTokenOutput(ctx, ecr.GetAuthorizationTokenOutputArgs{
			RegistryId: ecrRepository.RegistryId,
		}, nil)
		myImage, err := dockerbuild.NewImage(ctx, "my-image", &dockerbuild.ImageArgs{
			CacheFrom: dockerbuild.CacheFromArray{
				&dockerbuild.CacheFromArgs{
					Registry: &dockerbuild.CacheFromRegistryArgs{
						Ref: ecrRepository.RepositoryUrl.ApplyT(func(repositoryUrl string) (string, error) {
							return fmt.Sprintf("%v:cache", repositoryUrl), nil
						}).(pulumi.StringOutput),
					},
				},
			},
			CacheTo: dockerbuild.CacheToArray{
				&dockerbuild.CacheToArgs{
					Registry: &dockerbuild.CacheToRegistryArgs{
						ImageManifest: pulumi.Bool(true),
						OciMediaTypes: pulumi.Bool(true),
						Ref: ecrRepository.RepositoryUrl.ApplyT(func(repositoryUrl string) (string, error) {
							return fmt.Sprintf("%v:cache", repositoryUrl), nil
						}).(pulumi.StringOutput),
					},
				},
			},
			Context: &dockerbuild.BuildContextArgs{
				Location: pulumi.String("./app"),
			},
			Push: pulumi.Bool(true),
			Registries: dockerbuild.RegistryArray{
				&dockerbuild.RegistryArgs{
					Address: ecrRepository.RepositoryUrl,
					Password: authToken.ApplyT(func(authToken ecr.GetAuthorizationTokenResult) (*string, error) {
						return &authToken.Password, nil
					}).(pulumi.StringPtrOutput),
					Username: authToken.ApplyT(func(authToken ecr.GetAuthorizationTokenResult) (*string, error) {
						return &authToken.UserName, nil
					}).(pulumi.StringPtrOutput),
				},
			},
			Tags: pulumi.StringArray{
				ecrRepository.RepositoryUrl.ApplyT(func(repositoryUrl string) (string, error) {
					return fmt.Sprintf("%v:latest", repositoryUrl), nil
				}).(pulumi.StringOutput),
			},
		})
		if err != nil {
			return err
		}
		ctx.Export("ref", myImage.Ref)
		return nil
	})
}

``` ### Multi-platform image ```go package main

import (

"github.com/pulumi/pulumi-docker-build/sdk/go/dockerbuild"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := dockerbuild.NewImage(ctx, "image", &dockerbuild.ImageArgs{
			Context: &dockerbuild.BuildContextArgs{
				Location: pulumi.String("app"),
			},
			Platforms: docker - build.PlatformArray{
				dockerbuild.Platform_Plan9_amd64,
				dockerbuild.Platform_Plan9_386,
			},
			Push: pulumi.Bool(false),
		})
		if err != nil {
			return err
		}
		return nil
	})
}

``` ### Registry export ```go package main

import (

"github.com/pulumi/pulumi-docker-build/sdk/go/dockerbuild"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := dockerbuild.NewImage(ctx, "image", &dockerbuild.ImageArgs{
			Context: &dockerbuild.BuildContextArgs{
				Location: pulumi.String("app"),
			},
			Push: pulumi.Bool(true),
			Registries: dockerbuild.RegistryArray{
				&dockerbuild.RegistryArgs{
					Address:  pulumi.String("docker.io"),
					Password: pulumi.Any(dockerHubPassword),
					Username: pulumi.String("pulumibot"),
				},
			},
			Tags: pulumi.StringArray{
				pulumi.String("docker.io/pulumi/pulumi:3.107.0"),
			},
		})
		if err != nil {
			return err
		}
		ctx.Export("ref", myImage.Ref)
		return nil
	})
}

``` ### Caching ```go package main

import (

"github.com/pulumi/pulumi-docker-build/sdk/go/dockerbuild"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := dockerbuild.NewImage(ctx, "image", &dockerbuild.ImageArgs{
			CacheFrom: dockerbuild.CacheFromArray{
				&dockerbuild.CacheFromArgs{
					Local: &dockerbuild.CacheFromLocalArgs{
						Src: pulumi.String("tmp/cache"),
					},
				},
			},
			CacheTo: dockerbuild.CacheToArray{
				&dockerbuild.CacheToArgs{
					Local: &dockerbuild.CacheToLocalArgs{
						Dest: pulumi.String("tmp/cache"),
						Mode: dockerbuild.CacheModeMax,
					},
				},
			},
			Context: &dockerbuild.BuildContextArgs{
				Location: pulumi.String("app"),
			},
			Push: pulumi.Bool(false),
		})
		if err != nil {
			return err
		}
		return nil
	})
}

``` ### Docker Build Cloud ```go package main

import (

"github.com/pulumi/pulumi-docker-build/sdk/go/dockerbuild"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := dockerbuild.NewImage(ctx, "image", &dockerbuild.ImageArgs{
			Builder: &dockerbuild.BuilderConfigArgs{
				Name: pulumi.String("cloud-builder-name"),
			},
			Context: &dockerbuild.BuildContextArgs{
				Location: pulumi.String("app"),
			},
			Exec: pulumi.Bool(true),
			Push: pulumi.Bool(false),
		})
		if err != nil {
			return err
		}
		return nil
	})
}

``` ### Build arguments ```go package main

import (

"github.com/pulumi/pulumi-docker-build/sdk/go/dockerbuild"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := dockerbuild.NewImage(ctx, "image", &dockerbuild.ImageArgs{
			BuildArgs: pulumi.StringMap{
				"SET_ME_TO_TRUE": pulumi.String("true"),
			},
			Context: &dockerbuild.BuildContextArgs{
				Location: pulumi.String("app"),
			},
			Push: pulumi.Bool(false),
		})
		if err != nil {
			return err
		}
		return nil
	})
}

``` ### Build target ```go package main

import (

"github.com/pulumi/pulumi-docker-build/sdk/go/dockerbuild"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := dockerbuild.NewImage(ctx, "image", &dockerbuild.ImageArgs{
			Context: &dockerbuild.BuildContextArgs{
				Location: pulumi.String("app"),
			},
			Push:   pulumi.Bool(false),
			Target: pulumi.String("build-me"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}

``` ### Named contexts ```go package main

import (

"github.com/pulumi/pulumi-docker-build/sdk/go/dockerbuild"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := dockerbuild.NewImage(ctx, "image", &dockerbuild.ImageArgs{
			Context: &dockerbuild.BuildContextArgs{
				Location: pulumi.String("app"),
				Named: dockerbuild.ContextMap{
					"golang:latest": &dockerbuild.ContextArgs{
						Location: pulumi.String("docker-image://golang@sha256:b8e62cf593cdaff36efd90aa3a37de268e6781a2e68c6610940c48f7cdf36984"),
					},
				},
			},
			Push: pulumi.Bool(false),
		})
		if err != nil {
			return err
		}
		return nil
	})
}

``` ### Remote context ```go package main

import (

"github.com/pulumi/pulumi-docker-build/sdk/go/dockerbuild"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := dockerbuild.NewImage(ctx, "image", &dockerbuild.ImageArgs{
			Context: &dockerbuild.BuildContextArgs{
				Location: pulumi.String("https://raw.githubusercontent.com/pulumi/pulumi-docker/api-types/provider/testdata/Dockerfile"),
			},
			Push: pulumi.Bool(false),
		})
		if err != nil {
			return err
		}
		return nil
	})
}

``` ### Inline Dockerfile ```go package main

import (

"github.com/pulumi/pulumi-docker-build/sdk/go/dockerbuild"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := dockerbuild.NewImage(ctx, "image", &dockerbuild.ImageArgs{
			Context: &dockerbuild.BuildContextArgs{
				Location: pulumi.String("app"),
			},
			Dockerfile: &dockerbuild.DockerfileArgs{
				Inline: pulumi.String("FROM busybox\nCOPY hello.c ./\n"),
			},
			Push: pulumi.Bool(false),
		})
		if err != nil {
			return err
		}
		return nil
	})
}

``` ### Remote context ```go package main

import (

"github.com/pulumi/pulumi-docker-build/sdk/go/dockerbuild"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := dockerbuild.NewImage(ctx, "image", &dockerbuild.ImageArgs{
			Context: &dockerbuild.BuildContextArgs{
				Location: pulumi.String("https://github.com/docker-library/hello-world.git"),
			},
			Dockerfile: &dockerbuild.DockerfileArgs{
				Location: pulumi.String("app/Dockerfile"),
			},
			Push: pulumi.Bool(false),
		})
		if err != nil {
			return err
		}
		return nil
	})
}

``` ### Local export ```go package main

import (

"github.com/pulumi/pulumi-docker-build/sdk/go/dockerbuild"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := dockerbuild.NewImage(ctx, "image", &dockerbuild.ImageArgs{
			Context: &dockerbuild.BuildContextArgs{
				Location: pulumi.String("app"),
			},
			Exports: dockerbuild.ExportArray{
				&dockerbuild.ExportArgs{
					Docker: &dockerbuild.ExportDockerArgs{
						Tar: pulumi.Bool(true),
					},
				},
			},
			Push: pulumi.Bool(false),
		})
		if err != nil {
			return err
		}
		return nil
	})
}

```

func GetImage

func GetImage(ctx *pulumi.Context,
	name string, id pulumi.IDInput, state *ImageState, opts ...pulumi.ResourceOption) (*Image, error)

GetImage gets an existing Image resource's state with the given name, ID, and optional state properties that are used to uniquely qualify the lookup (nil if not required).

func NewImage

func NewImage(ctx *pulumi.Context,
	name string, args *ImageArgs, opts ...pulumi.ResourceOption) (*Image, error)

NewImage registers a new resource with the given unique name, arguments, and options.

type ImageArgs

type ImageArgs struct {
	// Custom `host:ip` mappings to use during the build.
	//
	// Equivalent to Docker's `--add-host` flag.
	AddHosts pulumix.Input[[]string]
	// `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.
	BuildArgs pulumix.Input[map[string]string]
	// Setting this to `false` will always skip image builds during previews,
	// and setting it to `true` will always build images during previews.
	//
	// Images built during previews are never exported to registries, however
	// cache manifests are still exported.
	//
	// On-disk Dockerfiles are always validated for syntactic correctness
	// regardless of this setting.
	//
	// Defaults to `true` as a safeguard against broken images merging as part
	// of CI pipelines.
	BuildOnPreview pulumix.Input[*bool]
	// Builder configuration.
	Builder pulumix.Input[*BuilderConfigArgs]
	// Cache export configuration.
	//
	// Equivalent to Docker's `--cache-from` flag.
	CacheFrom pulumix.Input[[]*CacheFromArgs]
	// Cache import configuration.
	//
	// Equivalent to Docker's `--cache-to` flag.
	CacheTo pulumix.Input[[]*CacheToArgs]
	// Build context settings. Defaults to the current directory.
	//
	// Equivalent to Docker's `PATH | URL | -` positional argument.
	Context pulumix.Input[*BuildContextArgs]
	// Dockerfile settings.
	//
	// Equivalent to Docker's `--file` flag.
	Dockerfile pulumix.Input[*DockerfileArgs]
	// 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](https://docs.docker.com/build/cloud/setup/) (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.
	Exec pulumix.Input[*bool]
	// 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.
	Exports pulumix.Input[[]*ExportArgs]
	// Attach arbitrary key/value metadata to the image.
	//
	// Equivalent to Docker's `--label` flag.
	Labels pulumix.Input[map[string]string]
	// When `true` the build will automatically include a `docker` export.
	//
	// Defaults to `false`.
	//
	// Equivalent to Docker's `--load` flag.
	Load pulumix.Input[*bool]
	// 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.
	Network pulumix.Input[*NetworkMode]
	// Do not import cache manifests when building the image.
	//
	// Equivalent to Docker's `--no-cache` flag.
	NoCache pulumix.Input[*bool]
	// Set target platform(s) for the build. Defaults to the host's platform.
	//
	// Equivalent to Docker's `--platform` flag.
	Platforms pulumix.Input[[]Platform]
	// Always pull referenced images.
	//
	// Equivalent to Docker's `--pull` flag.
	Pull pulumix.Input[*bool]
	// When `true` the build will automatically include a `registry` export.
	//
	// Defaults to `false`.
	//
	// Equivalent to Docker's `--push` flag.
	Push pulumix.Input[bool]
	// Registry credentials. Required if reading or exporting to private
	// repositories.
	//
	// Credentials are kept in-memory and do not pollute pre-existing
	// credentials on the host.
	//
	// Similar to `docker login`.
	Registries pulumix.Input[[]*RegistryArgs]
	// 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.
	Secrets pulumix.Input[map[string]string]
	// SSH agent socket or keys to expose to the build.
	//
	// Equivalent to Docker's `--ssh` flag.
	Ssh pulumix.Input[[]*SSHArgs]
	// Name and optionally a tag (format: `name:tag`).
	//
	// If exporting to a registry, the name should include the fully qualified
	// registry address (e.g. `docker.io/pulumi/pulumi:latest`).
	//
	// Equivalent to Docker's `--tag` flag.
	Tags pulumix.Input[[]string]
	// Set the target build stage(s) to build.
	//
	// If not specified all targets will be built by default.
	//
	// Equivalent to Docker's `--target` flag.
	Target pulumix.Input[*string]
}

The set of arguments for constructing a Image resource.

func (ImageArgs) ElementType

func (ImageArgs) ElementType() reflect.Type

type ImageOutput

type ImageOutput struct{ *pulumi.OutputState }

func (ImageOutput) AddHosts

func (o ImageOutput) AddHosts() pulumix.ArrayOutput[string]

Custom `host:ip` mappings to use during the build.

Equivalent to Docker's `--add-host` flag.

func (ImageOutput) BuildArgs

func (o ImageOutput) BuildArgs() pulumix.MapOutput[string]

`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.

func (ImageOutput) BuildOnPreview

func (o ImageOutput) BuildOnPreview() pulumix.Output[*bool]

Setting this to `false` will always skip image builds during previews, and setting it to `true` will always build images during previews.

Images built during previews are never exported to registries, however cache manifests are still exported.

On-disk Dockerfiles are always validated for syntactic correctness regardless of this setting.

Defaults to `true` as a safeguard against broken images merging as part of CI pipelines.

func (ImageOutput) Builder

Builder configuration.

func (ImageOutput) CacheFrom

Cache export configuration.

Equivalent to Docker's `--cache-from` flag.

func (ImageOutput) CacheTo

Cache import configuration.

Equivalent to Docker's `--cache-to` flag.

func (ImageOutput) Context

Build context settings. Defaults to the current directory.

Equivalent to Docker's `PATH | URL | -` positional argument.

func (ImageOutput) ContextHash

func (o ImageOutput) ContextHash() pulumix.Output[string]

A preliminary hash of the image's build context.

Pulumi uses this to determine if an image _may_ need to be re-built.

func (ImageOutput) Digest

func (o ImageOutput) Digest() pulumix.Output[string]

A SHA256 digest of the image if it was exported to a registry or elsewhere.

Empty if the image was not exported.

Registry images can be referenced precisely as `<tag>@<digest>`. The `ref` output provides one such reference as a convenience.

func (ImageOutput) Dockerfile

Dockerfile settings.

Equivalent to Docker's `--file` flag.

func (ImageOutput) ElementType

func (ImageOutput) ElementType() reflect.Type

func (ImageOutput) Exec

func (o ImageOutput) Exec() pulumix.Output[*bool]

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](https://docs.docker.com/build/cloud/setup/) (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.

func (ImageOutput) 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.

func (ImageOutput) Labels

func (o ImageOutput) Labels() pulumix.MapOutput[string]

Attach arbitrary key/value metadata to the image.

Equivalent to Docker's `--label` flag.

func (ImageOutput) Load

func (o ImageOutput) Load() pulumix.Output[*bool]

When `true` the build will automatically include a `docker` export.

Defaults to `false`.

Equivalent to Docker's `--load` flag.

func (ImageOutput) Network

func (o ImageOutput) Network() pulumix.Output[*NetworkMode]

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.

func (ImageOutput) NoCache

func (o ImageOutput) NoCache() pulumix.Output[*bool]

Do not import cache manifests when building the image.

Equivalent to Docker's `--no-cache` flag.

func (ImageOutput) Platforms

func (o ImageOutput) Platforms() pulumix.ArrayOutput[Platform]

Set target platform(s) for the build. Defaults to the host's platform.

Equivalent to Docker's `--platform` flag.

func (ImageOutput) Pull

func (o ImageOutput) Pull() pulumix.Output[*bool]

Always pull referenced images.

Equivalent to Docker's `--pull` flag.

func (ImageOutput) Push

func (o ImageOutput) Push() pulumix.Output[bool]

When `true` the build will automatically include a `registry` export.

Defaults to `false`.

Equivalent to Docker's `--push` flag.

func (ImageOutput) Ref

func (o ImageOutput) Ref() pulumix.Output[string]

If the image was pushed to any registries then this will contain a single fully-qualified tag including the build's digest.

If the image had tags but was not exported, this will take on a value of one of those tags.

This will be empty if the image had no exports and no tags.

This is only for convenience and may not be appropriate for situations where multiple tags or registries are involved. In those cases this output is not guaranteed to be stable.

For more control over tags consumed by downstream resources you should use the `digest` output.

func (ImageOutput) Registries

Registry credentials. Required if reading or exporting to private repositories.

Credentials are kept in-memory and do not pollute pre-existing credentials on the host.

Similar to `docker login`.

func (ImageOutput) Secrets

func (o ImageOutput) Secrets() pulumix.MapOutput[string]

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.

func (ImageOutput) Ssh

SSH agent socket or keys to expose to the build.

Equivalent to Docker's `--ssh` flag.

func (ImageOutput) Tags

Name and optionally a tag (format: `name:tag`).

If exporting to a registry, the name should include the fully qualified registry address (e.g. `docker.io/pulumi/pulumi:latest`).

Equivalent to Docker's `--tag` flag.

func (ImageOutput) Target

func (o ImageOutput) Target() pulumix.Output[*string]

Set the target build stage(s) to build.

If not specified all targets will be built by default.

Equivalent to Docker's `--target` flag.

func (ImageOutput) ToImageOutput

func (o ImageOutput) ToImageOutput() ImageOutput

func (ImageOutput) ToImageOutputWithContext

func (o ImageOutput) ToImageOutputWithContext(ctx context.Context) ImageOutput

func (ImageOutput) ToOutput

func (o ImageOutput) ToOutput(ctx context.Context) pulumix.Output[Image]

type ImageState

type ImageState struct {
}

func (ImageState) ElementType

func (ImageState) ElementType() reflect.Type

type Index

type Index struct {
	pulumi.CustomResourceState

	// If true, push the index to the target registry.
	//
	// Defaults to `true`.
	Push pulumix.Output[*bool] `pulumi:"push"`
	// The pushed tag with digest.
	//
	// Identical to the tag if the index was not pushed.
	Ref pulumix.Output[string] `pulumi:"ref"`
	// Authentication for the registry where the tagged index will be pushed.
	//
	// Credentials can also be included with the provider's configuration.
	Registry pulumix.GPtrOutput[Registry, RegistryOutput] `pulumi:"registry"`
	// Existing images to include in the index.
	Sources pulumix.ArrayOutput[string] `pulumi:"sources"`
	// The tag to apply to the index.
	Tag pulumix.Output[string] `pulumi:"tag"`
}

A wrapper around `docker buildx imagetools create` to create an index (or manifest list) referencing one or more existing images.

In most cases you do not need an `Index` to build a multi-platform image -- specifying multiple platforms on the `Image` will handle this for you automatically.

However, as of April 2024, building multi-platform images _with caching_ will only export a cache for one platform at a time (see [this discussion](https://github.com/docker/buildx/discussions/1382) for more details).

Therefore this resource can be helpful if you are building multi-platform images with caching: each platform can be built and cached separately, and an `Index` can join them all together. An example of this is shown below.

This resource creates an OCI image index or a Docker manifest list depending on the media types of the source images.

## Example Usage ### Multi-platform registry caching ```go package main

import (

"github.com/pulumi/pulumi-docker-build/sdk/go/dockerbuild"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		amd64, err := dockerbuild.NewImage(ctx, "amd64", &dockerbuild.ImageArgs{
			CacheFrom: dockerbuild.CacheFromArray{
				&dockerbuild.CacheFromArgs{
					Registry: &dockerbuild.CacheFromRegistryArgs{
						Ref: pulumi.String("docker.io/pulumi/pulumi:cache-amd64"),
					},
				},
			},
			CacheTo: dockerbuild.CacheToArray{
				&dockerbuild.CacheToArgs{
					Registry: &dockerbuild.CacheToRegistryArgs{
						Mode: dockerbuild.CacheModeMax,
						Ref:  pulumi.String("docker.io/pulumi/pulumi:cache-amd64"),
					},
				},
			},
			Context: &dockerbuild.BuildContextArgs{
				Location: pulumi.String("app"),
			},
			Platforms: docker - build.PlatformArray{
				dockerbuild.Platform_Linux_amd64,
			},
			Tags: pulumi.StringArray{
				pulumi.String("docker.io/pulumi/pulumi:3.107.0-amd64"),
			},
		})
		if err != nil {
			return err
		}
		arm64, err := dockerbuild.NewImage(ctx, "arm64", &dockerbuild.ImageArgs{
			CacheFrom: dockerbuild.CacheFromArray{
				&dockerbuild.CacheFromArgs{
					Registry: &dockerbuild.CacheFromRegistryArgs{
						Ref: pulumi.String("docker.io/pulumi/pulumi:cache-arm64"),
					},
				},
			},
			CacheTo: dockerbuild.CacheToArray{
				&dockerbuild.CacheToArgs{
					Registry: &dockerbuild.CacheToRegistryArgs{
						Mode: dockerbuild.CacheModeMax,
						Ref:  pulumi.String("docker.io/pulumi/pulumi:cache-arm64"),
					},
				},
			},
			Context: &dockerbuild.BuildContextArgs{
				Location: pulumi.String("app"),
			},
			Platforms: docker - build.PlatformArray{
				dockerbuild.Platform_Linux_arm64,
			},
			Tags: pulumi.StringArray{
				pulumi.String("docker.io/pulumi/pulumi:3.107.0-arm64"),
			},
		})
		if err != nil {
			return err
		}
		index, err := dockerbuild.NewIndex(ctx, "index", &dockerbuild.IndexArgs{
			Sources: pulumi.StringArray{
				amd64.Ref,
				arm64.Ref,
			},
			Tag: pulumi.String("docker.io/pulumi/pulumi:3.107.0"),
		})
		if err != nil {
			return err
		}
		ctx.Export("ref", index.Ref)
		return nil
	})
}

```

func GetIndex

func GetIndex(ctx *pulumi.Context,
	name string, id pulumi.IDInput, state *IndexState, opts ...pulumi.ResourceOption) (*Index, error)

GetIndex gets an existing Index resource's state with the given name, ID, and optional state properties that are used to uniquely qualify the lookup (nil if not required).

func NewIndex

func NewIndex(ctx *pulumi.Context,
	name string, args *IndexArgs, opts ...pulumi.ResourceOption) (*Index, error)

NewIndex registers a new resource with the given unique name, arguments, and options.

type IndexArgs

type IndexArgs struct {
	// If true, push the index to the target registry.
	//
	// Defaults to `true`.
	Push pulumix.Input[*bool]
	// Authentication for the registry where the tagged index will be pushed.
	//
	// Credentials can also be included with the provider's configuration.
	Registry pulumix.Input[*RegistryArgs]
	// Existing images to include in the index.
	Sources pulumix.Input[[]string]
	// The tag to apply to the index.
	Tag pulumix.Input[string]
}

The set of arguments for constructing a Index resource.

func (IndexArgs) ElementType

func (IndexArgs) ElementType() reflect.Type

type IndexOutput

type IndexOutput struct{ *pulumi.OutputState }

func (IndexOutput) ElementType

func (IndexOutput) ElementType() reflect.Type

func (IndexOutput) Push

func (o IndexOutput) Push() pulumix.Output[*bool]

If true, push the index to the target registry.

Defaults to `true`.

func (IndexOutput) Ref

func (o IndexOutput) Ref() pulumix.Output[string]

The pushed tag with digest.

Identical to the tag if the index was not pushed.

func (IndexOutput) Registry

Authentication for the registry where the tagged index will be pushed.

Credentials can also be included with the provider's configuration.

func (IndexOutput) Sources

func (o IndexOutput) Sources() pulumix.ArrayOutput[string]

Existing images to include in the index.

func (IndexOutput) Tag

func (o IndexOutput) Tag() pulumix.Output[string]

The tag to apply to the index.

func (IndexOutput) ToIndexOutput

func (o IndexOutput) ToIndexOutput() IndexOutput

func (IndexOutput) ToIndexOutputWithContext

func (o IndexOutput) ToIndexOutputWithContext(ctx context.Context) IndexOutput

func (IndexOutput) ToOutput

func (o IndexOutput) ToOutput(ctx context.Context) pulumix.Output[Index]

type IndexState

type IndexState struct {
}

func (IndexState) ElementType

func (IndexState) ElementType() reflect.Type

type NetworkMode

type NetworkMode string

type Platform

type Platform string

type Provider

type Provider struct {
	pulumi.ProviderResourceState

	// The build daemon's address.
	Host pulumix.Output[*string] `pulumi:"host"`
}

func NewProvider

func NewProvider(ctx *pulumi.Context,
	name string, args *ProviderArgs, opts ...pulumi.ResourceOption) (*Provider, error)

NewProvider registers a new resource with the given unique name, arguments, and options.

type ProviderArgs

type ProviderArgs struct {
	// The build daemon's address.
	Host       pulumix.Input[*string]
	Registries pulumix.Input[[]*RegistryArgs]
}

The set of arguments for constructing a Provider resource.

func (ProviderArgs) ElementType

func (ProviderArgs) ElementType() reflect.Type

type ProviderOutput

type ProviderOutput struct{ *pulumi.OutputState }

func (ProviderOutput) ElementType

func (ProviderOutput) ElementType() reflect.Type

func (ProviderOutput) Host

func (o ProviderOutput) Host() pulumix.Output[*string]

The build daemon's address.

func (ProviderOutput) ToOutput

func (ProviderOutput) ToProviderOutput

func (o ProviderOutput) ToProviderOutput() ProviderOutput

func (ProviderOutput) ToProviderOutputWithContext

func (o ProviderOutput) ToProviderOutputWithContext(ctx context.Context) ProviderOutput

type Registry

type Registry struct {
	// The registry's address (e.g. "docker.io").
	Address string `pulumi:"address"`
	// Password or token for the registry.
	Password *string `pulumi:"password"`
	// Username for the registry.
	Username *string `pulumi:"username"`
}

type RegistryArgs

type RegistryArgs struct {
	// The registry's address (e.g. "docker.io").
	Address pulumix.Input[string] `pulumi:"address"`
	// Password or token for the registry.
	Password pulumix.Input[*string] `pulumi:"password"`
	// Username for the registry.
	Username pulumix.Input[*string] `pulumi:"username"`
}

func (RegistryArgs) ElementType

func (RegistryArgs) ElementType() reflect.Type

func (*RegistryArgs) ToOutput

func (RegistryArgs) ToRegistryOutput

func (i RegistryArgs) ToRegistryOutput() RegistryOutput

func (RegistryArgs) ToRegistryOutputWithContext

func (i RegistryArgs) ToRegistryOutputWithContext(ctx context.Context) RegistryOutput

type RegistryOutput

type RegistryOutput struct{ *pulumi.OutputState }

func (RegistryOutput) Address

func (o RegistryOutput) Address() pulumix.Output[string]

The registry's address (e.g. "docker.io").

func (RegistryOutput) ElementType

func (RegistryOutput) ElementType() reflect.Type

func (RegistryOutput) Password

func (o RegistryOutput) Password() pulumix.Output[*string]

Password or token for the registry.

func (RegistryOutput) ToOutput

func (RegistryOutput) ToRegistryOutput

func (o RegistryOutput) ToRegistryOutput() RegistryOutput

func (RegistryOutput) ToRegistryOutputWithContext

func (o RegistryOutput) ToRegistryOutputWithContext(ctx context.Context) RegistryOutput

func (RegistryOutput) Username

func (o RegistryOutput) Username() pulumix.Output[*string]

Username for the registry.

type SSH

type SSH struct {
	// Useful for distinguishing different servers that are part of the same
	// build.
	//
	// A value of `default` is appropriate if only dealing with a single host.
	Id string `pulumi:"id"`
	// SSH agent socket or private keys to expose to the build under the given
	// identifier.
	//
	// Defaults to `[$SSH_AUTH_SOCK]`.
	//
	// Note that your keys are **not** automatically added when using an
	// agent. Run `ssh-add -l` locally to confirm which public keys are
	// visible to the agent; these will be exposed to your build.
	Paths []string `pulumi:"paths"`
}

type SSHArgs

type SSHArgs struct {
	// Useful for distinguishing different servers that are part of the same
	// build.
	//
	// A value of `default` is appropriate if only dealing with a single host.
	Id pulumix.Input[string] `pulumi:"id"`
	// SSH agent socket or private keys to expose to the build under the given
	// identifier.
	//
	// Defaults to `[$SSH_AUTH_SOCK]`.
	//
	// Note that your keys are **not** automatically added when using an
	// agent. Run `ssh-add -l` locally to confirm which public keys are
	// visible to the agent; these will be exposed to your build.
	Paths pulumix.Input[[]string] `pulumi:"paths"`
}

func (SSHArgs) ElementType

func (SSHArgs) ElementType() reflect.Type

func (*SSHArgs) ToOutput

func (i *SSHArgs) ToOutput(ctx context.Context) pulumix.Output[*SSHArgs]

func (SSHArgs) ToSSHOutput

func (i SSHArgs) ToSSHOutput() SSHOutput

func (SSHArgs) ToSSHOutputWithContext

func (i SSHArgs) ToSSHOutputWithContext(ctx context.Context) SSHOutput

type SSHOutput

type SSHOutput struct{ *pulumi.OutputState }

func (SSHOutput) ElementType

func (SSHOutput) ElementType() reflect.Type

func (SSHOutput) Id

func (o SSHOutput) Id() pulumix.Output[string]

Useful for distinguishing different servers that are part of the same build.

A value of `default` is appropriate if only dealing with a single host.

func (SSHOutput) Paths

func (o SSHOutput) Paths() pulumix.ArrayOutput[string]

SSH agent socket or private keys to expose to the build under the given identifier.

Defaults to `[$SSH_AUTH_SOCK]`.

Note that your keys are **not** automatically added when using an agent. Run `ssh-add -l` locally to confirm which public keys are visible to the agent; these will be exposed to your build.

func (SSHOutput) ToOutput

func (o SSHOutput) ToOutput(ctx context.Context) pulumix.Output[SSH]

func (SSHOutput) ToSSHOutput

func (o SSHOutput) ToSSHOutput() SSHOutput

func (SSHOutput) ToSSHOutputWithContext

func (o SSHOutput) ToSSHOutputWithContext(ctx context.Context) SSHOutput

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL