docker-build.Image
Explore with Pulumi AI
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.)
Pulumi also provides 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
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
v3/v4 migration
Coming soon!
Coming soon!
Coming soon!
Coming soon!
// v3 Image
const v3 = new docker.Image("v3-image", {
imageName: "myregistry.com/user/repo:latest",
localImageName: "local-tag",
skipPush: false,
build: {
dockerfile: "./Dockerfile",
context: "../app",
target: "mytarget",
args: {
MY_BUILD_ARG: "foo",
},
env: {
DOCKER_BUILDKIT: "1",
},
extraOptions: [
"--cache-from",
"type=registry,myregistry.com/user/repo:cache",
"--cache-to",
"type=registry,myregistry.com/user/repo:cache",
"--add-host",
"metadata.google.internal:169.254.169.254",
"--secret",
"id=mysecret,src=/local/secret",
"--ssh",
"default=/home/runner/.ssh/id_ed25519",
"--network",
"host",
"--platform",
"linux/amd64",
],
},
registry: {
server: "myregistry.com",
username: "username",
password: pulumi.secret("password"),
},
});
// v3 Image after migrating to docker-build.Image
const v3Migrated = new dockerbuild.Image("v3-to-buildx", {
tags: ["myregistry.com/user/repo:latest", "local-tag"],
push: true,
dockerfile: {
location: "./Dockerfile",
},
context: {
location: "../app",
},
target: "mytarget",
buildArgs: {
MY_BUILD_ARG: "foo",
},
cacheFrom: [{ registry: { ref: "myregistry.com/user/repo:cache" } }],
cacheTo: [{ registry: { ref: "myregistry.com/user/repo:cache" } }],
secrets: {
mysecret: "value",
},
addHosts: ["metadata.google.internal:169.254.169.254"],
ssh: {
default: ["/home/runner/.ssh/id_ed25519"],
},
network: "host",
platforms: ["linux/amd64"],
registries: [{
address: "myregistry.com",
username: "username",
password: pulumi.secret("password"),
}],
});
// v4 Image
const v4 = new docker.Image("v4-image", {
imageName: "myregistry.com/user/repo:latest",
skipPush: false,
build: {
dockerfile: "./Dockerfile",
context: "../app",
target: "mytarget",
args: {
MY_BUILD_ARG: "foo",
},
cacheFrom: {
images: ["myregistry.com/user/repo:cache"],
},
addHosts: ["metadata.google.internal:169.254.169.254"],
network: "host",
platform: "linux/amd64",
},
buildOnPreview: true,
registry: {
server: "myregistry.com",
username: "username",
password: pulumi.secret("password"),
},
});
// v4 Image after migrating to docker-build.Image
const v4Migrated = new dockerbuild.Image("v4-to-buildx", {
tags: ["myregistry.com/user/repo:latest"],
push: true,
dockerfile: {
location: "./Dockerfile",
},
context: {
location: "../app",
},
target: "mytarget",
buildArgs: {
MY_BUILD_ARG: "foo",
},
cacheFrom: [{ registry: { ref: "myregistry.com/user/repo:cache" } }],
cacheTo: [{ registry: { ref: "myregistry.com/user/repo:cache" } }],
addHosts: ["metadata.google.internal:169.254.169.254"],
network: "host",
platforms: ["linux/amd64"],
registries: [{
address: "myregistry.com",
username: "username",
password: pulumi.secret("password"),
}],
});
Coming soon!
Push to AWS ECR with caching
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
using DockerBuild = Pulumi.DockerBuild;
return await Deployment.RunAsync(() =>
{
var ecrRepository = new Aws.Ecr.Repository("ecr-repository");
var authToken = Aws.Ecr.GetAuthorizationToken.Invoke(new()
{
RegistryId = ecrRepository.RegistryId,
});
var myImage = new DockerBuild.Image("my-image", new()
{
CacheFrom = new[]
{
new DockerBuild.Inputs.CacheFromArgs
{
Registry = new DockerBuild.Inputs.CacheFromRegistryArgs
{
Ref = ecrRepository.RepositoryUrl.Apply(repositoryUrl => $"{repositoryUrl}:cache"),
},
},
},
CacheTo = new[]
{
new DockerBuild.Inputs.CacheToArgs
{
Registry = new DockerBuild.Inputs.CacheToRegistryArgs
{
ImageManifest = true,
OciMediaTypes = true,
Ref = ecrRepository.RepositoryUrl.Apply(repositoryUrl => $"{repositoryUrl}:cache"),
},
},
},
Context = new DockerBuild.Inputs.BuildContextArgs
{
Location = "./app",
},
Push = true,
Registries = new[]
{
new DockerBuild.Inputs.RegistryArgs
{
Address = ecrRepository.RepositoryUrl,
Password = authToken.Apply(getAuthorizationTokenResult => getAuthorizationTokenResult.Password),
Username = authToken.Apply(getAuthorizationTokenResult => getAuthorizationTokenResult.UserName),
},
},
Tags = new[]
{
ecrRepository.RepositoryUrl.Apply(repositoryUrl => $"{repositoryUrl}:latest"),
},
});
return new Dictionary<string, object?>
{
["ref"] = myImage.Ref,
};
});
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
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.ecr.Repository;
import com.pulumi.aws.ecr.EcrFunctions;
import com.pulumi.aws.ecr.inputs.GetAuthorizationTokenArgs;
import com.pulumi.dockerbuild.Image;
import com.pulumi.dockerbuild.ImageArgs;
import com.pulumi.dockerbuild.inputs.CacheFromArgs;
import com.pulumi.dockerbuild.inputs.CacheFromRegistryArgs;
import com.pulumi.dockerbuild.inputs.CacheToArgs;
import com.pulumi.dockerbuild.inputs.CacheToRegistryArgs;
import com.pulumi.dockerbuild.inputs.BuildContextArgs;
import com.pulumi.dockerbuild.inputs.RegistryArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var ecrRepository = new Repository("ecrRepository");
final var authToken = EcrFunctions.getAuthorizationToken(GetAuthorizationTokenArgs.builder()
.registryId(ecrRepository.registryId())
.build());
var myImage = new Image("myImage", ImageArgs.builder()
.cacheFrom(CacheFromArgs.builder()
.registry(CacheFromRegistryArgs.builder()
.ref(ecrRepository.repositoryUrl().applyValue(repositoryUrl -> String.format("%s:cache", repositoryUrl)))
.build())
.build())
.cacheTo(CacheToArgs.builder()
.registry(CacheToRegistryArgs.builder()
.imageManifest(true)
.ociMediaTypes(true)
.ref(ecrRepository.repositoryUrl().applyValue(repositoryUrl -> String.format("%s:cache", repositoryUrl)))
.build())
.build())
.context(BuildContextArgs.builder()
.location("./app")
.build())
.push(true)
.registries(RegistryArgs.builder()
.address(ecrRepository.repositoryUrl())
.password(authToken.applyValue(getAuthorizationTokenResult -> getAuthorizationTokenResult).applyValue(authToken -> authToken.applyValue(getAuthorizationTokenResult -> getAuthorizationTokenResult.password())))
.username(authToken.applyValue(getAuthorizationTokenResult -> getAuthorizationTokenResult).applyValue(authToken -> authToken.applyValue(getAuthorizationTokenResult -> getAuthorizationTokenResult.userName())))
.build())
.tags(ecrRepository.repositoryUrl().applyValue(repositoryUrl -> String.format("%s:latest", repositoryUrl)))
.build());
ctx.export("ref", myImage.ref());
}
}
import pulumi
import pulumi_aws as aws
import pulumi_docker_build as docker_build
ecr_repository = aws.ecr.Repository("ecr-repository")
auth_token = aws.ecr.get_authorization_token_output(registry_id=ecr_repository.registry_id)
my_image = docker_build.Image("my-image",
cache_from=[{
"registry": {
"ref": ecr_repository.repository_url.apply(lambda repository_url: f"{repository_url}:cache"),
},
}],
cache_to=[{
"registry": {
"image_manifest": True,
"oci_media_types": True,
"ref": ecr_repository.repository_url.apply(lambda repository_url: f"{repository_url}:cache"),
},
}],
context={
"location": "./app",
},
push=True,
registries=[{
"address": ecr_repository.repository_url,
"password": auth_token.password,
"username": auth_token.user_name,
}],
tags=[ecr_repository.repository_url.apply(lambda repository_url: f"{repository_url}:latest")])
pulumi.export("ref", my_image.ref)
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
import * as docker_build from "@pulumi/docker-build";
const ecrRepository = new aws.ecr.Repository("ecr-repository", {});
const authToken = aws.ecr.getAuthorizationTokenOutput({
registryId: ecrRepository.registryId,
});
const myImage = new docker_build.Image("my-image", {
cacheFrom: [{
registry: {
ref: pulumi.interpolate`${ecrRepository.repositoryUrl}:cache`,
},
}],
cacheTo: [{
registry: {
imageManifest: true,
ociMediaTypes: true,
ref: pulumi.interpolate`${ecrRepository.repositoryUrl}:cache`,
},
}],
context: {
location: "./app",
},
push: true,
registries: [{
address: ecrRepository.repositoryUrl,
password: authToken.apply(authToken => authToken.password),
username: authToken.apply(authToken => authToken.userName),
}],
tags: [pulumi.interpolate`${ecrRepository.repositoryUrl}:latest`],
});
export const ref = myImage.ref;
description: Push to AWS ECR with caching
name: ecr
outputs:
ref: ${my-image.ref}
resources:
ecr-repository:
type: aws:ecr:Repository
my-image:
properties:
cacheFrom:
- registry:
ref: ${ecr-repository.repositoryUrl}:cache
cacheTo:
- registry:
imageManifest: true
ociMediaTypes: true
ref: ${ecr-repository.repositoryUrl}:cache
context:
location: ./app
push: true
registries:
- address: ${ecr-repository.repositoryUrl}
password: ${auth-token.password}
username: ${auth-token.userName}
tags:
- ${ecr-repository.repositoryUrl}:latest
type: docker-build:Image
runtime: yaml
variables:
auth-token:
fn::aws:ecr:getAuthorizationToken:
registryId: ${ecr-repository.registryId}
Multi-platform image
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using DockerBuild = Pulumi.DockerBuild;
return await Deployment.RunAsync(() =>
{
var image = new DockerBuild.Image("image", new()
{
Context = new DockerBuild.Inputs.BuildContextArgs
{
Location = "app",
},
Platforms = new[]
{
DockerBuild.Platform.Plan9_amd64,
DockerBuild.Platform.Plan9_386,
},
Push = false,
});
});
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
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.dockerbuild.Image;
import com.pulumi.dockerbuild.ImageArgs;
import com.pulumi.dockerbuild.inputs.BuildContextArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var image = new Image("image", ImageArgs.builder()
.context(BuildContextArgs.builder()
.location("app")
.build())
.platforms(
"plan9/amd64",
"plan9/386")
.push(false)
.build());
}
}
import pulumi
import pulumi_docker_build as docker_build
image = docker_build.Image("image",
context={
"location": "app",
},
platforms=[
docker_build.Platform.PLAN9_AMD64,
docker_build.Platform.PLAN9_386,
],
push=False)
import * as pulumi from "@pulumi/pulumi";
import * as docker_build from "@pulumi/docker-build";
const image = new docker_build.Image("image", {
context: {
location: "app",
},
platforms: [
docker_build.Platform.Plan9_amd64,
docker_build.Platform.Plan9_386,
],
push: false,
});
description: Multi-platform image
name: multi-platform
resources:
image:
properties:
context:
location: app
platforms:
- plan9/amd64
- plan9/386
push: false
type: docker-build:Image
runtime: yaml
Registry export
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using DockerBuild = Pulumi.DockerBuild;
return await Deployment.RunAsync(() =>
{
var image = new DockerBuild.Image("image", new()
{
Context = new DockerBuild.Inputs.BuildContextArgs
{
Location = "app",
},
Push = true,
Registries = new[]
{
new DockerBuild.Inputs.RegistryArgs
{
Address = "docker.io",
Password = dockerHubPassword,
Username = "pulumibot",
},
},
Tags = new[]
{
"docker.io/pulumi/pulumi:3.107.0",
},
});
return new Dictionary<string, object?>
{
["ref"] = myImage.Ref,
};
});
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
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.dockerbuild.Image;
import com.pulumi.dockerbuild.ImageArgs;
import com.pulumi.dockerbuild.inputs.BuildContextArgs;
import com.pulumi.dockerbuild.inputs.RegistryArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var image = new Image("image", ImageArgs.builder()
.context(BuildContextArgs.builder()
.location("app")
.build())
.push(true)
.registries(RegistryArgs.builder()
.address("docker.io")
.password(dockerHubPassword)
.username("pulumibot")
.build())
.tags("docker.io/pulumi/pulumi:3.107.0")
.build());
ctx.export("ref", myImage.ref());
}
}
import pulumi
import pulumi_docker_build as docker_build
image = docker_build.Image("image",
context={
"location": "app",
},
push=True,
registries=[{
"address": "docker.io",
"password": docker_hub_password,
"username": "pulumibot",
}],
tags=["docker.io/pulumi/pulumi:3.107.0"])
pulumi.export("ref", my_image["ref"])
import * as pulumi from "@pulumi/pulumi";
import * as docker_build from "@pulumi/docker-build";
const image = new docker_build.Image("image", {
context: {
location: "app",
},
push: true,
registries: [{
address: "docker.io",
password: dockerHubPassword,
username: "pulumibot",
}],
tags: ["docker.io/pulumi/pulumi:3.107.0"],
});
export const ref = myImage.ref;
description: Registry export
name: registry
outputs:
ref: ${my-image.ref}
resources:
image:
properties:
context:
location: app
push: true
registries:
- address: docker.io
password: ${dockerHubPassword}
username: pulumibot
tags:
- docker.io/pulumi/pulumi:3.107.0
type: docker-build:Image
runtime: yaml
Caching
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using DockerBuild = Pulumi.DockerBuild;
return await Deployment.RunAsync(() =>
{
var image = new DockerBuild.Image("image", new()
{
CacheFrom = new[]
{
new DockerBuild.Inputs.CacheFromArgs
{
Local = new DockerBuild.Inputs.CacheFromLocalArgs
{
Src = "tmp/cache",
},
},
},
CacheTo = new[]
{
new DockerBuild.Inputs.CacheToArgs
{
Local = new DockerBuild.Inputs.CacheToLocalArgs
{
Dest = "tmp/cache",
Mode = DockerBuild.CacheMode.Max,
},
},
},
Context = new DockerBuild.Inputs.BuildContextArgs
{
Location = "app",
},
Push = false,
});
});
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
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.dockerbuild.Image;
import com.pulumi.dockerbuild.ImageArgs;
import com.pulumi.dockerbuild.inputs.CacheFromArgs;
import com.pulumi.dockerbuild.inputs.CacheFromLocalArgs;
import com.pulumi.dockerbuild.inputs.CacheToArgs;
import com.pulumi.dockerbuild.inputs.CacheToLocalArgs;
import com.pulumi.dockerbuild.inputs.BuildContextArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var image = new Image("image", ImageArgs.builder()
.cacheFrom(CacheFromArgs.builder()
.local(CacheFromLocalArgs.builder()
.src("tmp/cache")
.build())
.build())
.cacheTo(CacheToArgs.builder()
.local(CacheToLocalArgs.builder()
.dest("tmp/cache")
.mode("max")
.build())
.build())
.context(BuildContextArgs.builder()
.location("app")
.build())
.push(false)
.build());
}
}
import pulumi
import pulumi_docker_build as docker_build
image = docker_build.Image("image",
cache_from=[{
"local": {
"src": "tmp/cache",
},
}],
cache_to=[{
"local": {
"dest": "tmp/cache",
"mode": docker_build.CacheMode.MAX,
},
}],
context={
"location": "app",
},
push=False)
import * as pulumi from "@pulumi/pulumi";
import * as docker_build from "@pulumi/docker-build";
const image = new docker_build.Image("image", {
cacheFrom: [{
local: {
src: "tmp/cache",
},
}],
cacheTo: [{
local: {
dest: "tmp/cache",
mode: docker_build.CacheMode.Max,
},
}],
context: {
location: "app",
},
push: false,
});
description: Caching
name: caching
resources:
image:
properties:
cacheFrom:
- local:
src: tmp/cache
cacheTo:
- local:
dest: tmp/cache
mode: max
context:
location: app
push: false
type: docker-build:Image
runtime: yaml
Docker Build Cloud
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using DockerBuild = Pulumi.DockerBuild;
return await Deployment.RunAsync(() =>
{
var image = new DockerBuild.Image("image", new()
{
Builder = new DockerBuild.Inputs.BuilderConfigArgs
{
Name = "cloud-builder-name",
},
Context = new DockerBuild.Inputs.BuildContextArgs
{
Location = "app",
},
Exec = true,
Push = false,
});
});
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
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.dockerbuild.Image;
import com.pulumi.dockerbuild.ImageArgs;
import com.pulumi.dockerbuild.inputs.BuilderConfigArgs;
import com.pulumi.dockerbuild.inputs.BuildContextArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var image = new Image("image", ImageArgs.builder()
.builder(BuilderConfigArgs.builder()
.name("cloud-builder-name")
.build())
.context(BuildContextArgs.builder()
.location("app")
.build())
.exec(true)
.push(false)
.build());
}
}
import pulumi
import pulumi_docker_build as docker_build
image = docker_build.Image("image",
builder={
"name": "cloud-builder-name",
},
context={
"location": "app",
},
exec_=True,
push=False)
import * as pulumi from "@pulumi/pulumi";
import * as docker_build from "@pulumi/docker-build";
const image = new docker_build.Image("image", {
builder: {
name: "cloud-builder-name",
},
context: {
location: "app",
},
exec: true,
push: false,
});
description: Docker Build Cloud
name: dbc
resources:
image:
properties:
builder:
name: cloud-builder-name
context:
location: app
exec: true
push: false
type: docker-build:Image
runtime: yaml
Build arguments
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using DockerBuild = Pulumi.DockerBuild;
return await Deployment.RunAsync(() =>
{
var image = new DockerBuild.Image("image", new()
{
BuildArgs =
{
{ "SET_ME_TO_TRUE", "true" },
},
Context = new DockerBuild.Inputs.BuildContextArgs
{
Location = "app",
},
Push = false,
});
});
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
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.dockerbuild.Image;
import com.pulumi.dockerbuild.ImageArgs;
import com.pulumi.dockerbuild.inputs.BuildContextArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var image = new Image("image", ImageArgs.builder()
.buildArgs(Map.of("SET_ME_TO_TRUE", "true"))
.context(BuildContextArgs.builder()
.location("app")
.build())
.push(false)
.build());
}
}
import pulumi
import pulumi_docker_build as docker_build
image = docker_build.Image("image",
build_args={
"SET_ME_TO_TRUE": "true",
},
context={
"location": "app",
},
push=False)
import * as pulumi from "@pulumi/pulumi";
import * as docker_build from "@pulumi/docker-build";
const image = new docker_build.Image("image", {
buildArgs: {
SET_ME_TO_TRUE: "true",
},
context: {
location: "app",
},
push: false,
});
description: Build arguments
name: build-args
resources:
image:
properties:
buildArgs:
SET_ME_TO_TRUE: "true"
context:
location: app
push: false
type: docker-build:Image
runtime: yaml
Build target
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using DockerBuild = Pulumi.DockerBuild;
return await Deployment.RunAsync(() =>
{
var image = new DockerBuild.Image("image", new()
{
Context = new DockerBuild.Inputs.BuildContextArgs
{
Location = "app",
},
Push = false,
Target = "build-me",
});
});
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
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.dockerbuild.Image;
import com.pulumi.dockerbuild.ImageArgs;
import com.pulumi.dockerbuild.inputs.BuildContextArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var image = new Image("image", ImageArgs.builder()
.context(BuildContextArgs.builder()
.location("app")
.build())
.push(false)
.target("build-me")
.build());
}
}
import pulumi
import pulumi_docker_build as docker_build
image = docker_build.Image("image",
context={
"location": "app",
},
push=False,
target="build-me")
import * as pulumi from "@pulumi/pulumi";
import * as docker_build from "@pulumi/docker-build";
const image = new docker_build.Image("image", {
context: {
location: "app",
},
push: false,
target: "build-me",
});
description: Build target
name: build-target
resources:
image:
properties:
context:
location: app
push: false
target: build-me
type: docker-build:Image
runtime: yaml
Named contexts
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using DockerBuild = Pulumi.DockerBuild;
return await Deployment.RunAsync(() =>
{
var image = new DockerBuild.Image("image", new()
{
Context = new DockerBuild.Inputs.BuildContextArgs
{
Location = "app",
Named =
{
{ "golang:latest", new DockerBuild.Inputs.ContextArgs
{
Location = "docker-image://golang@sha256:b8e62cf593cdaff36efd90aa3a37de268e6781a2e68c6610940c48f7cdf36984",
} },
},
},
Push = false,
});
});
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
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.dockerbuild.Image;
import com.pulumi.dockerbuild.ImageArgs;
import com.pulumi.dockerbuild.inputs.BuildContextArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var image = new Image("image", ImageArgs.builder()
.context(BuildContextArgs.builder()
.location("app")
.named(Map.of("golang:latest", Map.of("location", "docker-image://golang@sha256:b8e62cf593cdaff36efd90aa3a37de268e6781a2e68c6610940c48f7cdf36984")))
.build())
.push(false)
.build());
}
}
import pulumi
import pulumi_docker_build as docker_build
image = docker_build.Image("image",
context={
"location": "app",
"named": {
"golang_latest": {
"location": "docker-image://golang@sha256:b8e62cf593cdaff36efd90aa3a37de268e6781a2e68c6610940c48f7cdf36984",
},
},
},
push=False)
import * as pulumi from "@pulumi/pulumi";
import * as docker_build from "@pulumi/docker-build";
const image = new docker_build.Image("image", {
context: {
location: "app",
named: {
"golang:latest": {
location: "docker-image://golang@sha256:b8e62cf593cdaff36efd90aa3a37de268e6781a2e68c6610940c48f7cdf36984",
},
},
},
push: false,
});
description: Named contexts
name: named-contexts
resources:
image:
properties:
context:
location: app
named:
golang:latest:
location: docker-image://golang@sha256:b8e62cf593cdaff36efd90aa3a37de268e6781a2e68c6610940c48f7cdf36984
push: false
type: docker-build:Image
runtime: yaml
Remote context
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using DockerBuild = Pulumi.DockerBuild;
return await Deployment.RunAsync(() =>
{
var image = new DockerBuild.Image("image", new()
{
Context = new DockerBuild.Inputs.BuildContextArgs
{
Location = "https://raw.githubusercontent.com/pulumi/pulumi-docker/api-types/provider/testdata/Dockerfile",
},
Push = false,
});
});
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
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.dockerbuild.Image;
import com.pulumi.dockerbuild.ImageArgs;
import com.pulumi.dockerbuild.inputs.BuildContextArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var image = new Image("image", ImageArgs.builder()
.context(BuildContextArgs.builder()
.location("https://raw.githubusercontent.com/pulumi/pulumi-docker/api-types/provider/testdata/Dockerfile")
.build())
.push(false)
.build());
}
}
import pulumi
import pulumi_docker_build as docker_build
image = docker_build.Image("image",
context={
"location": "https://raw.githubusercontent.com/pulumi/pulumi-docker/api-types/provider/testdata/Dockerfile",
},
push=False)
import * as pulumi from "@pulumi/pulumi";
import * as docker_build from "@pulumi/docker-build";
const image = new docker_build.Image("image", {
context: {
location: "https://raw.githubusercontent.com/pulumi/pulumi-docker/api-types/provider/testdata/Dockerfile",
},
push: false,
});
description: Remote context
name: remote-context
resources:
image:
properties:
context:
location: https://raw.githubusercontent.com/pulumi/pulumi-docker/api-types/provider/testdata/Dockerfile
push: false
type: docker-build:Image
runtime: yaml
Inline Dockerfile
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using DockerBuild = Pulumi.DockerBuild;
return await Deployment.RunAsync(() =>
{
var image = new DockerBuild.Image("image", new()
{
Context = new DockerBuild.Inputs.BuildContextArgs
{
Location = "app",
},
Dockerfile = new DockerBuild.Inputs.DockerfileArgs
{
Inline = @"FROM busybox
COPY hello.c ./
",
},
Push = false,
});
});
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
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.dockerbuild.Image;
import com.pulumi.dockerbuild.ImageArgs;
import com.pulumi.dockerbuild.inputs.BuildContextArgs;
import com.pulumi.dockerbuild.inputs.DockerfileArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var image = new Image("image", ImageArgs.builder()
.context(BuildContextArgs.builder()
.location("app")
.build())
.dockerfile(DockerfileArgs.builder()
.inline("""
FROM busybox
COPY hello.c ./
""")
.build())
.push(false)
.build());
}
}
import pulumi
import pulumi_docker_build as docker_build
image = docker_build.Image("image",
context={
"location": "app",
},
dockerfile={
"inline": """FROM busybox
COPY hello.c ./
""",
},
push=False)
import * as pulumi from "@pulumi/pulumi";
import * as docker_build from "@pulumi/docker-build";
const image = new docker_build.Image("image", {
context: {
location: "app",
},
dockerfile: {
inline: `FROM busybox
COPY hello.c ./
`,
},
push: false,
});
description: Inline Dockerfile
name: inline
resources:
image:
properties:
context:
location: app
dockerfile:
inline: |
FROM busybox
COPY hello.c ./
push: false
type: docker-build:Image
runtime: yaml
Remote context
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using DockerBuild = Pulumi.DockerBuild;
return await Deployment.RunAsync(() =>
{
var image = new DockerBuild.Image("image", new()
{
Context = new DockerBuild.Inputs.BuildContextArgs
{
Location = "https://github.com/docker-library/hello-world.git",
},
Dockerfile = new DockerBuild.Inputs.DockerfileArgs
{
Location = "app/Dockerfile",
},
Push = false,
});
});
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
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.dockerbuild.Image;
import com.pulumi.dockerbuild.ImageArgs;
import com.pulumi.dockerbuild.inputs.BuildContextArgs;
import com.pulumi.dockerbuild.inputs.DockerfileArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var image = new Image("image", ImageArgs.builder()
.context(BuildContextArgs.builder()
.location("https://github.com/docker-library/hello-world.git")
.build())
.dockerfile(DockerfileArgs.builder()
.location("app/Dockerfile")
.build())
.push(false)
.build());
}
}
import pulumi
import pulumi_docker_build as docker_build
image = docker_build.Image("image",
context={
"location": "https://github.com/docker-library/hello-world.git",
},
dockerfile={
"location": "app/Dockerfile",
},
push=False)
import * as pulumi from "@pulumi/pulumi";
import * as docker_build from "@pulumi/docker-build";
const image = new docker_build.Image("image", {
context: {
location: "https://github.com/docker-library/hello-world.git",
},
dockerfile: {
location: "app/Dockerfile",
},
push: false,
});
description: Remote context
name: remote-context
resources:
image:
properties:
context:
location: https://github.com/docker-library/hello-world.git
dockerfile:
location: app/Dockerfile
push: false
type: docker-build:Image
runtime: yaml
Local export
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using DockerBuild = Pulumi.DockerBuild;
return await Deployment.RunAsync(() =>
{
var image = new DockerBuild.Image("image", new()
{
Context = new DockerBuild.Inputs.BuildContextArgs
{
Location = "app",
},
Exports = new[]
{
new DockerBuild.Inputs.ExportArgs
{
Docker = new DockerBuild.Inputs.ExportDockerArgs
{
Tar = true,
},
},
},
Push = false,
});
});
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
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.dockerbuild.Image;
import com.pulumi.dockerbuild.ImageArgs;
import com.pulumi.dockerbuild.inputs.BuildContextArgs;
import com.pulumi.dockerbuild.inputs.ExportArgs;
import com.pulumi.dockerbuild.inputs.ExportDockerArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var image = new Image("image", ImageArgs.builder()
.context(BuildContextArgs.builder()
.location("app")
.build())
.exports(ExportArgs.builder()
.docker(ExportDockerArgs.builder()
.tar(true)
.build())
.build())
.push(false)
.build());
}
}
import pulumi
import pulumi_docker_build as docker_build
image = docker_build.Image("image",
context={
"location": "app",
},
exports=[{
"docker": {
"tar": True,
},
}],
push=False)
import * as pulumi from "@pulumi/pulumi";
import * as docker_build from "@pulumi/docker-build";
const image = new docker_build.Image("image", {
context: {
location: "app",
},
exports: [{
docker: {
tar: true,
},
}],
push: false,
});
description: Local export
name: docker-load
resources:
image:
properties:
context:
location: app
exports:
- docker:
tar: true
push: false
type: docker-build:Image
runtime: yaml
Create Image Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Image(name: string, args: ImageArgs, opts?: CustomResourceOptions);
@overload
def Image(resource_name: str,
args: ImageArgs,
opts: Optional[ResourceOptions] = None)
@overload
def Image(resource_name: str,
opts: Optional[ResourceOptions] = None,
push: Optional[bool] = None,
labels: Optional[Mapping[str, str]] = None,
cache_to: Optional[Sequence[CacheToArgs]] = None,
load: Optional[bool] = None,
no_cache: Optional[bool] = None,
network: Optional[NetworkMode] = None,
context: Optional[BuildContextArgs] = None,
dockerfile: Optional[DockerfileArgs] = None,
exec_: Optional[bool] = None,
exports: Optional[Sequence[ExportArgs]] = None,
add_hosts: Optional[Sequence[str]] = None,
builder: Optional[BuilderConfigArgs] = None,
build_on_preview: Optional[bool] = None,
cache_from: Optional[Sequence[CacheFromArgs]] = None,
platforms: Optional[Sequence[Platform]] = None,
pull: Optional[bool] = None,
build_args: Optional[Mapping[str, str]] = None,
registries: Optional[Sequence[RegistryArgs]] = None,
secrets: Optional[Mapping[str, str]] = None,
ssh: Optional[Sequence[SSHArgs]] = None,
tags: Optional[Sequence[str]] = None,
target: Optional[str] = None)
func NewImage(ctx *Context, name string, args ImageArgs, opts ...ResourceOption) (*Image, error)
public Image(string name, ImageArgs args, CustomResourceOptions? opts = null)
type: docker-build:Image
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args ImageArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args ImageArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args ImageArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ImageArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ImageArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var imageResource = new DockerBuild.Image("imageResource", new()
{
Push = false,
Labels =
{
{ "string", "string" },
},
CacheTo = new[]
{
new DockerBuild.Inputs.CacheToArgs
{
Azblob = new DockerBuild.Inputs.CacheToAzureBlobArgs
{
Name = "string",
AccountUrl = "string",
IgnoreError = false,
Mode = DockerBuild.CacheMode.Min,
SecretAccessKey = "string",
},
Disabled = false,
Gha = new DockerBuild.Inputs.CacheToGitHubActionsArgs
{
IgnoreError = false,
Mode = DockerBuild.CacheMode.Min,
Scope = "string",
Token = "string",
Url = "string",
},
Inline = null,
Local = new DockerBuild.Inputs.CacheToLocalArgs
{
Dest = "string",
Compression = DockerBuild.CompressionType.Gzip,
CompressionLevel = 0,
ForceCompression = false,
IgnoreError = false,
Mode = DockerBuild.CacheMode.Min,
},
Raw = "string",
Registry = new DockerBuild.Inputs.CacheToRegistryArgs
{
Ref = "string",
Compression = DockerBuild.CompressionType.Gzip,
CompressionLevel = 0,
ForceCompression = false,
IgnoreError = false,
ImageManifest = false,
Mode = DockerBuild.CacheMode.Min,
OciMediaTypes = false,
},
S3 = new DockerBuild.Inputs.CacheToS3Args
{
Bucket = "string",
Region = "string",
AccessKeyId = "string",
BlobsPrefix = "string",
EndpointUrl = "string",
IgnoreError = false,
ManifestsPrefix = "string",
Mode = DockerBuild.CacheMode.Min,
Name = "string",
SecretAccessKey = "string",
SessionToken = "string",
UsePathStyle = false,
},
},
},
Load = false,
NoCache = false,
Network = DockerBuild.NetworkMode.@Default,
Context = new DockerBuild.Inputs.BuildContextArgs
{
Location = "string",
Named =
{
{ "string", new DockerBuild.Inputs.ContextArgs
{
Location = "string",
} },
},
},
Dockerfile = new DockerBuild.Inputs.DockerfileArgs
{
Inline = "string",
Location = "string",
},
Exec = false,
Exports = new[]
{
new DockerBuild.Inputs.ExportArgs
{
Cacheonly = null,
Disabled = false,
Docker = new DockerBuild.Inputs.ExportDockerArgs
{
Annotations =
{
{ "string", "string" },
},
Compression = DockerBuild.CompressionType.Gzip,
CompressionLevel = 0,
Dest = "string",
ForceCompression = false,
Names = new[]
{
"string",
},
OciMediaTypes = false,
Tar = false,
},
Image = new DockerBuild.Inputs.ExportImageArgs
{
Annotations =
{
{ "string", "string" },
},
Compression = DockerBuild.CompressionType.Gzip,
CompressionLevel = 0,
DanglingNamePrefix = "string",
ForceCompression = false,
Insecure = false,
NameCanonical = false,
Names = new[]
{
"string",
},
OciMediaTypes = false,
Push = false,
PushByDigest = false,
Store = false,
Unpack = false,
},
Local = new DockerBuild.Inputs.ExportLocalArgs
{
Dest = "string",
},
Oci = new DockerBuild.Inputs.ExportOCIArgs
{
Annotations =
{
{ "string", "string" },
},
Compression = DockerBuild.CompressionType.Gzip,
CompressionLevel = 0,
Dest = "string",
ForceCompression = false,
Names = new[]
{
"string",
},
OciMediaTypes = false,
Tar = false,
},
Raw = "string",
Registry = new DockerBuild.Inputs.ExportRegistryArgs
{
Annotations =
{
{ "string", "string" },
},
Compression = DockerBuild.CompressionType.Gzip,
CompressionLevel = 0,
DanglingNamePrefix = "string",
ForceCompression = false,
Insecure = false,
NameCanonical = false,
Names = new[]
{
"string",
},
OciMediaTypes = false,
Push = false,
PushByDigest = false,
Store = false,
Unpack = false,
},
Tar = new DockerBuild.Inputs.ExportTarArgs
{
Dest = "string",
},
},
},
AddHosts = new[]
{
"string",
},
Builder = new DockerBuild.Inputs.BuilderConfigArgs
{
Name = "string",
},
BuildOnPreview = false,
CacheFrom = new[]
{
new DockerBuild.Inputs.CacheFromArgs
{
Azblob = new DockerBuild.Inputs.CacheFromAzureBlobArgs
{
Name = "string",
AccountUrl = "string",
SecretAccessKey = "string",
},
Disabled = false,
Gha = new DockerBuild.Inputs.CacheFromGitHubActionsArgs
{
Scope = "string",
Token = "string",
Url = "string",
},
Local = new DockerBuild.Inputs.CacheFromLocalArgs
{
Src = "string",
Digest = "string",
},
Raw = "string",
Registry = new DockerBuild.Inputs.CacheFromRegistryArgs
{
Ref = "string",
},
S3 = new DockerBuild.Inputs.CacheFromS3Args
{
Bucket = "string",
Region = "string",
AccessKeyId = "string",
BlobsPrefix = "string",
EndpointUrl = "string",
ManifestsPrefix = "string",
Name = "string",
SecretAccessKey = "string",
SessionToken = "string",
UsePathStyle = false,
},
},
},
Platforms = new[]
{
DockerBuild.Platform.Darwin_386,
},
Pull = false,
BuildArgs =
{
{ "string", "string" },
},
Registries = new[]
{
new DockerBuild.Inputs.RegistryArgs
{
Address = "string",
Password = "string",
Username = "string",
},
},
Secrets =
{
{ "string", "string" },
},
Ssh = new[]
{
new DockerBuild.Inputs.SSHArgs
{
Id = "string",
Paths = new[]
{
"string",
},
},
},
Tags = new[]
{
"string",
},
Target = "string",
});
example, err := dockerbuild.NewImage(ctx, "imageResource", &dockerbuild.ImageArgs{
Push: pulumi.Bool(false),
Labels: pulumi.StringMap{
"string": pulumi.String("string"),
},
CacheTo: dockerbuild.CacheToArray{
&dockerbuild.CacheToArgs{
Azblob: &dockerbuild.CacheToAzureBlobArgs{
Name: pulumi.String("string"),
AccountUrl: pulumi.String("string"),
IgnoreError: pulumi.Bool(false),
Mode: dockerbuild.CacheModeMin,
SecretAccessKey: pulumi.String("string"),
},
Disabled: pulumi.Bool(false),
Gha: &dockerbuild.CacheToGitHubActionsArgs{
IgnoreError: pulumi.Bool(false),
Mode: dockerbuild.CacheModeMin,
Scope: pulumi.String("string"),
Token: pulumi.String("string"),
Url: pulumi.String("string"),
},
Inline: &dockerbuild.CacheToInlineArgs{},
Local: &dockerbuild.CacheToLocalArgs{
Dest: pulumi.String("string"),
Compression: dockerbuild.CompressionTypeGzip,
CompressionLevel: pulumi.Int(0),
ForceCompression: pulumi.Bool(false),
IgnoreError: pulumi.Bool(false),
Mode: dockerbuild.CacheModeMin,
},
Raw: pulumi.String("string"),
Registry: &dockerbuild.CacheToRegistryArgs{
Ref: pulumi.String("string"),
Compression: dockerbuild.CompressionTypeGzip,
CompressionLevel: pulumi.Int(0),
ForceCompression: pulumi.Bool(false),
IgnoreError: pulumi.Bool(false),
ImageManifest: pulumi.Bool(false),
Mode: dockerbuild.CacheModeMin,
OciMediaTypes: pulumi.Bool(false),
},
S3: &dockerbuild.CacheToS3Args{
Bucket: pulumi.String("string"),
Region: pulumi.String("string"),
AccessKeyId: pulumi.String("string"),
BlobsPrefix: pulumi.String("string"),
EndpointUrl: pulumi.String("string"),
IgnoreError: pulumi.Bool(false),
ManifestsPrefix: pulumi.String("string"),
Mode: dockerbuild.CacheModeMin,
Name: pulumi.String("string"),
SecretAccessKey: pulumi.String("string"),
SessionToken: pulumi.String("string"),
UsePathStyle: pulumi.Bool(false),
},
},
},
Load: pulumi.Bool(false),
NoCache: pulumi.Bool(false),
Network: dockerbuild.NetworkModeDefault,
Context: &dockerbuild.BuildContextArgs{
Location: pulumi.String("string"),
Named: dockerbuild.ContextMap{
"string": &dockerbuild.ContextArgs{
Location: pulumi.String("string"),
},
},
},
Dockerfile: &dockerbuild.DockerfileArgs{
Inline: pulumi.String("string"),
Location: pulumi.String("string"),
},
Exec: pulumi.Bool(false),
Exports: dockerbuild.ExportArray{
&dockerbuild.ExportArgs{
Cacheonly: &dockerbuild.ExportCacheOnlyArgs{},
Disabled: pulumi.Bool(false),
Docker: &dockerbuild.ExportDockerArgs{
Annotations: pulumi.StringMap{
"string": pulumi.String("string"),
},
Compression: dockerbuild.CompressionTypeGzip,
CompressionLevel: pulumi.Int(0),
Dest: pulumi.String("string"),
ForceCompression: pulumi.Bool(false),
Names: pulumi.StringArray{
pulumi.String("string"),
},
OciMediaTypes: pulumi.Bool(false),
Tar: pulumi.Bool(false),
},
Image: &dockerbuild.ExportImageArgs{
Annotations: pulumi.StringMap{
"string": pulumi.String("string"),
},
Compression: dockerbuild.CompressionTypeGzip,
CompressionLevel: pulumi.Int(0),
DanglingNamePrefix: pulumi.String("string"),
ForceCompression: pulumi.Bool(false),
Insecure: pulumi.Bool(false),
NameCanonical: pulumi.Bool(false),
Names: pulumi.StringArray{
pulumi.String("string"),
},
OciMediaTypes: pulumi.Bool(false),
Push: pulumi.Bool(false),
PushByDigest: pulumi.Bool(false),
Store: pulumi.Bool(false),
Unpack: pulumi.Bool(false),
},
Local: &dockerbuild.ExportLocalArgs{
Dest: pulumi.String("string"),
},
Oci: &dockerbuild.ExportOCIArgs{
Annotations: pulumi.StringMap{
"string": pulumi.String("string"),
},
Compression: dockerbuild.CompressionTypeGzip,
CompressionLevel: pulumi.Int(0),
Dest: pulumi.String("string"),
ForceCompression: pulumi.Bool(false),
Names: pulumi.StringArray{
pulumi.String("string"),
},
OciMediaTypes: pulumi.Bool(false),
Tar: pulumi.Bool(false),
},
Raw: pulumi.String("string"),
Registry: &dockerbuild.ExportRegistryArgs{
Annotations: pulumi.StringMap{
"string": pulumi.String("string"),
},
Compression: dockerbuild.CompressionTypeGzip,
CompressionLevel: pulumi.Int(0),
DanglingNamePrefix: pulumi.String("string"),
ForceCompression: pulumi.Bool(false),
Insecure: pulumi.Bool(false),
NameCanonical: pulumi.Bool(false),
Names: pulumi.StringArray{
pulumi.String("string"),
},
OciMediaTypes: pulumi.Bool(false),
Push: pulumi.Bool(false),
PushByDigest: pulumi.Bool(false),
Store: pulumi.Bool(false),
Unpack: pulumi.Bool(false),
},
Tar: &dockerbuild.ExportTarArgs{
Dest: pulumi.String("string"),
},
},
},
AddHosts: pulumi.StringArray{
pulumi.String("string"),
},
Builder: &dockerbuild.BuilderConfigArgs{
Name: pulumi.String("string"),
},
BuildOnPreview: pulumi.Bool(false),
CacheFrom: dockerbuild.CacheFromArray{
&dockerbuild.CacheFromArgs{
Azblob: &dockerbuild.CacheFromAzureBlobArgs{
Name: pulumi.String("string"),
AccountUrl: pulumi.String("string"),
SecretAccessKey: pulumi.String("string"),
},
Disabled: pulumi.Bool(false),
Gha: &dockerbuild.CacheFromGitHubActionsArgs{
Scope: pulumi.String("string"),
Token: pulumi.String("string"),
Url: pulumi.String("string"),
},
Local: &dockerbuild.CacheFromLocalArgs{
Src: pulumi.String("string"),
Digest: pulumi.String("string"),
},
Raw: pulumi.String("string"),
Registry: &dockerbuild.CacheFromRegistryArgs{
Ref: pulumi.String("string"),
},
S3: &dockerbuild.CacheFromS3Args{
Bucket: pulumi.String("string"),
Region: pulumi.String("string"),
AccessKeyId: pulumi.String("string"),
BlobsPrefix: pulumi.String("string"),
EndpointUrl: pulumi.String("string"),
ManifestsPrefix: pulumi.String("string"),
Name: pulumi.String("string"),
SecretAccessKey: pulumi.String("string"),
SessionToken: pulumi.String("string"),
UsePathStyle: pulumi.Bool(false),
},
},
},
Platforms: docker - build.PlatformArray{
dockerbuild.Platform_Darwin_386,
},
Pull: pulumi.Bool(false),
BuildArgs: pulumi.StringMap{
"string": pulumi.String("string"),
},
Registries: dockerbuild.RegistryArray{
&dockerbuild.RegistryArgs{
Address: pulumi.String("string"),
Password: pulumi.String("string"),
Username: pulumi.String("string"),
},
},
Secrets: pulumi.StringMap{
"string": pulumi.String("string"),
},
Ssh: dockerbuild.SSHArray{
&dockerbuild.SSHArgs{
Id: pulumi.String("string"),
Paths: pulumi.StringArray{
pulumi.String("string"),
},
},
},
Tags: pulumi.StringArray{
pulumi.String("string"),
},
Target: pulumi.String("string"),
})
var imageResource = new Image("imageResource", ImageArgs.builder()
.push(false)
.labels(Map.of("string", "string"))
.cacheTo(CacheToArgs.builder()
.azblob(CacheToAzureBlobArgs.builder()
.name("string")
.accountUrl("string")
.ignoreError(false)
.mode("min")
.secretAccessKey("string")
.build())
.disabled(false)
.gha(CacheToGitHubActionsArgs.builder()
.ignoreError(false)
.mode("min")
.scope("string")
.token("string")
.url("string")
.build())
.inline()
.local(CacheToLocalArgs.builder()
.dest("string")
.compression("gzip")
.compressionLevel(0)
.forceCompression(false)
.ignoreError(false)
.mode("min")
.build())
.raw("string")
.registry(CacheToRegistryArgs.builder()
.ref("string")
.compression("gzip")
.compressionLevel(0)
.forceCompression(false)
.ignoreError(false)
.imageManifest(false)
.mode("min")
.ociMediaTypes(false)
.build())
.s3(CacheToS3Args.builder()
.bucket("string")
.region("string")
.accessKeyId("string")
.blobsPrefix("string")
.endpointUrl("string")
.ignoreError(false)
.manifestsPrefix("string")
.mode("min")
.name("string")
.secretAccessKey("string")
.sessionToken("string")
.usePathStyle(false)
.build())
.build())
.load(false)
.noCache(false)
.network("default")
.context(BuildContextArgs.builder()
.location("string")
.named(Map.of("string", Map.of("location", "string")))
.build())
.dockerfile(DockerfileArgs.builder()
.inline("string")
.location("string")
.build())
.exec(false)
.exports(ExportArgs.builder()
.cacheonly()
.disabled(false)
.docker(ExportDockerArgs.builder()
.annotations(Map.of("string", "string"))
.compression("gzip")
.compressionLevel(0)
.dest("string")
.forceCompression(false)
.names("string")
.ociMediaTypes(false)
.tar(false)
.build())
.image(ExportImageArgs.builder()
.annotations(Map.of("string", "string"))
.compression("gzip")
.compressionLevel(0)
.danglingNamePrefix("string")
.forceCompression(false)
.insecure(false)
.nameCanonical(false)
.names("string")
.ociMediaTypes(false)
.push(false)
.pushByDigest(false)
.store(false)
.unpack(false)
.build())
.local(ExportLocalArgs.builder()
.dest("string")
.build())
.oci(ExportOCIArgs.builder()
.annotations(Map.of("string", "string"))
.compression("gzip")
.compressionLevel(0)
.dest("string")
.forceCompression(false)
.names("string")
.ociMediaTypes(false)
.tar(false)
.build())
.raw("string")
.registry(ExportRegistryArgs.builder()
.annotations(Map.of("string", "string"))
.compression("gzip")
.compressionLevel(0)
.danglingNamePrefix("string")
.forceCompression(false)
.insecure(false)
.nameCanonical(false)
.names("string")
.ociMediaTypes(false)
.push(false)
.pushByDigest(false)
.store(false)
.unpack(false)
.build())
.tar(ExportTarArgs.builder()
.dest("string")
.build())
.build())
.addHosts("string")
.builder(BuilderConfigArgs.builder()
.name("string")
.build())
.buildOnPreview(false)
.cacheFrom(CacheFromArgs.builder()
.azblob(CacheFromAzureBlobArgs.builder()
.name("string")
.accountUrl("string")
.secretAccessKey("string")
.build())
.disabled(false)
.gha(CacheFromGitHubActionsArgs.builder()
.scope("string")
.token("string")
.url("string")
.build())
.local(CacheFromLocalArgs.builder()
.src("string")
.digest("string")
.build())
.raw("string")
.registry(CacheFromRegistryArgs.builder()
.ref("string")
.build())
.s3(CacheFromS3Args.builder()
.bucket("string")
.region("string")
.accessKeyId("string")
.blobsPrefix("string")
.endpointUrl("string")
.manifestsPrefix("string")
.name("string")
.secretAccessKey("string")
.sessionToken("string")
.usePathStyle(false)
.build())
.build())
.platforms("darwin/386")
.pull(false)
.buildArgs(Map.of("string", "string"))
.registries(RegistryArgs.builder()
.address("string")
.password("string")
.username("string")
.build())
.secrets(Map.of("string", "string"))
.ssh(SSHArgs.builder()
.id("string")
.paths("string")
.build())
.tags("string")
.target("string")
.build());
image_resource = docker_build.Image("imageResource",
push=False,
labels={
"string": "string",
},
cache_to=[{
"azblob": {
"name": "string",
"account_url": "string",
"ignore_error": False,
"mode": docker_build.CacheMode.MIN,
"secret_access_key": "string",
},
"disabled": False,
"gha": {
"ignore_error": False,
"mode": docker_build.CacheMode.MIN,
"scope": "string",
"token": "string",
"url": "string",
},
"inline": {},
"local": {
"dest": "string",
"compression": docker_build.CompressionType.GZIP,
"compression_level": 0,
"force_compression": False,
"ignore_error": False,
"mode": docker_build.CacheMode.MIN,
},
"raw": "string",
"registry": {
"ref": "string",
"compression": docker_build.CompressionType.GZIP,
"compression_level": 0,
"force_compression": False,
"ignore_error": False,
"image_manifest": False,
"mode": docker_build.CacheMode.MIN,
"oci_media_types": False,
},
"s3": {
"bucket": "string",
"region": "string",
"access_key_id": "string",
"blobs_prefix": "string",
"endpoint_url": "string",
"ignore_error": False,
"manifests_prefix": "string",
"mode": docker_build.CacheMode.MIN,
"name": "string",
"secret_access_key": "string",
"session_token": "string",
"use_path_style": False,
},
}],
load=False,
no_cache=False,
network=docker_build.NetworkMode.DEFAULT,
context={
"location": "string",
"named": {
"string": {
"location": "string",
},
},
},
dockerfile={
"inline": "string",
"location": "string",
},
exec_=False,
exports=[{
"cacheonly": {},
"disabled": False,
"docker": {
"annotations": {
"string": "string",
},
"compression": docker_build.CompressionType.GZIP,
"compression_level": 0,
"dest": "string",
"force_compression": False,
"names": ["string"],
"oci_media_types": False,
"tar": False,
},
"image": {
"annotations": {
"string": "string",
},
"compression": docker_build.CompressionType.GZIP,
"compression_level": 0,
"dangling_name_prefix": "string",
"force_compression": False,
"insecure": False,
"name_canonical": False,
"names": ["string"],
"oci_media_types": False,
"push": False,
"push_by_digest": False,
"store": False,
"unpack": False,
},
"local": {
"dest": "string",
},
"oci": {
"annotations": {
"string": "string",
},
"compression": docker_build.CompressionType.GZIP,
"compression_level": 0,
"dest": "string",
"force_compression": False,
"names": ["string"],
"oci_media_types": False,
"tar": False,
},
"raw": "string",
"registry": {
"annotations": {
"string": "string",
},
"compression": docker_build.CompressionType.GZIP,
"compression_level": 0,
"dangling_name_prefix": "string",
"force_compression": False,
"insecure": False,
"name_canonical": False,
"names": ["string"],
"oci_media_types": False,
"push": False,
"push_by_digest": False,
"store": False,
"unpack": False,
},
"tar": {
"dest": "string",
},
}],
add_hosts=["string"],
builder={
"name": "string",
},
build_on_preview=False,
cache_from=[{
"azblob": {
"name": "string",
"account_url": "string",
"secret_access_key": "string",
},
"disabled": False,
"gha": {
"scope": "string",
"token": "string",
"url": "string",
},
"local": {
"src": "string",
"digest": "string",
},
"raw": "string",
"registry": {
"ref": "string",
},
"s3": {
"bucket": "string",
"region": "string",
"access_key_id": "string",
"blobs_prefix": "string",
"endpoint_url": "string",
"manifests_prefix": "string",
"name": "string",
"secret_access_key": "string",
"session_token": "string",
"use_path_style": False,
},
}],
platforms=[docker_build.Platform.DARWIN_386],
pull=False,
build_args={
"string": "string",
},
registries=[{
"address": "string",
"password": "string",
"username": "string",
}],
secrets={
"string": "string",
},
ssh=[{
"id": "string",
"paths": ["string"],
}],
tags=["string"],
target="string")
const imageResource = new docker_build.Image("imageResource", {
push: false,
labels: {
string: "string",
},
cacheTo: [{
azblob: {
name: "string",
accountUrl: "string",
ignoreError: false,
mode: docker_build.CacheMode.Min,
secretAccessKey: "string",
},
disabled: false,
gha: {
ignoreError: false,
mode: docker_build.CacheMode.Min,
scope: "string",
token: "string",
url: "string",
},
inline: {},
local: {
dest: "string",
compression: docker_build.CompressionType.Gzip,
compressionLevel: 0,
forceCompression: false,
ignoreError: false,
mode: docker_build.CacheMode.Min,
},
raw: "string",
registry: {
ref: "string",
compression: docker_build.CompressionType.Gzip,
compressionLevel: 0,
forceCompression: false,
ignoreError: false,
imageManifest: false,
mode: docker_build.CacheMode.Min,
ociMediaTypes: false,
},
s3: {
bucket: "string",
region: "string",
accessKeyId: "string",
blobsPrefix: "string",
endpointUrl: "string",
ignoreError: false,
manifestsPrefix: "string",
mode: docker_build.CacheMode.Min,
name: "string",
secretAccessKey: "string",
sessionToken: "string",
usePathStyle: false,
},
}],
load: false,
noCache: false,
network: docker_build.NetworkMode.Default,
context: {
location: "string",
named: {
string: {
location: "string",
},
},
},
dockerfile: {
inline: "string",
location: "string",
},
exec: false,
exports: [{
cacheonly: {},
disabled: false,
docker: {
annotations: {
string: "string",
},
compression: docker_build.CompressionType.Gzip,
compressionLevel: 0,
dest: "string",
forceCompression: false,
names: ["string"],
ociMediaTypes: false,
tar: false,
},
image: {
annotations: {
string: "string",
},
compression: docker_build.CompressionType.Gzip,
compressionLevel: 0,
danglingNamePrefix: "string",
forceCompression: false,
insecure: false,
nameCanonical: false,
names: ["string"],
ociMediaTypes: false,
push: false,
pushByDigest: false,
store: false,
unpack: false,
},
local: {
dest: "string",
},
oci: {
annotations: {
string: "string",
},
compression: docker_build.CompressionType.Gzip,
compressionLevel: 0,
dest: "string",
forceCompression: false,
names: ["string"],
ociMediaTypes: false,
tar: false,
},
raw: "string",
registry: {
annotations: {
string: "string",
},
compression: docker_build.CompressionType.Gzip,
compressionLevel: 0,
danglingNamePrefix: "string",
forceCompression: false,
insecure: false,
nameCanonical: false,
names: ["string"],
ociMediaTypes: false,
push: false,
pushByDigest: false,
store: false,
unpack: false,
},
tar: {
dest: "string",
},
}],
addHosts: ["string"],
builder: {
name: "string",
},
buildOnPreview: false,
cacheFrom: [{
azblob: {
name: "string",
accountUrl: "string",
secretAccessKey: "string",
},
disabled: false,
gha: {
scope: "string",
token: "string",
url: "string",
},
local: {
src: "string",
digest: "string",
},
raw: "string",
registry: {
ref: "string",
},
s3: {
bucket: "string",
region: "string",
accessKeyId: "string",
blobsPrefix: "string",
endpointUrl: "string",
manifestsPrefix: "string",
name: "string",
secretAccessKey: "string",
sessionToken: "string",
usePathStyle: false,
},
}],
platforms: [docker_build.Platform.Darwin_386],
pull: false,
buildArgs: {
string: "string",
},
registries: [{
address: "string",
password: "string",
username: "string",
}],
secrets: {
string: "string",
},
ssh: [{
id: "string",
paths: ["string"],
}],
tags: ["string"],
target: "string",
});
type: docker-build:Image
properties:
addHosts:
- string
buildArgs:
string: string
buildOnPreview: false
builder:
name: string
cacheFrom:
- azblob:
accountUrl: string
name: string
secretAccessKey: string
disabled: false
gha:
scope: string
token: string
url: string
local:
digest: string
src: string
raw: string
registry:
ref: string
s3:
accessKeyId: string
blobsPrefix: string
bucket: string
endpointUrl: string
manifestsPrefix: string
name: string
region: string
secretAccessKey: string
sessionToken: string
usePathStyle: false
cacheTo:
- azblob:
accountUrl: string
ignoreError: false
mode: min
name: string
secretAccessKey: string
disabled: false
gha:
ignoreError: false
mode: min
scope: string
token: string
url: string
inline: {}
local:
compression: gzip
compressionLevel: 0
dest: string
forceCompression: false
ignoreError: false
mode: min
raw: string
registry:
compression: gzip
compressionLevel: 0
forceCompression: false
ignoreError: false
imageManifest: false
mode: min
ociMediaTypes: false
ref: string
s3:
accessKeyId: string
blobsPrefix: string
bucket: string
endpointUrl: string
ignoreError: false
manifestsPrefix: string
mode: min
name: string
region: string
secretAccessKey: string
sessionToken: string
usePathStyle: false
context:
location: string
named:
string:
location: string
dockerfile:
inline: string
location: string
exec: false
exports:
- cacheonly: {}
disabled: false
docker:
annotations:
string: string
compression: gzip
compressionLevel: 0
dest: string
forceCompression: false
names:
- string
ociMediaTypes: false
tar: false
image:
annotations:
string: string
compression: gzip
compressionLevel: 0
danglingNamePrefix: string
forceCompression: false
insecure: false
nameCanonical: false
names:
- string
ociMediaTypes: false
push: false
pushByDigest: false
store: false
unpack: false
local:
dest: string
oci:
annotations:
string: string
compression: gzip
compressionLevel: 0
dest: string
forceCompression: false
names:
- string
ociMediaTypes: false
tar: false
raw: string
registry:
annotations:
string: string
compression: gzip
compressionLevel: 0
danglingNamePrefix: string
forceCompression: false
insecure: false
nameCanonical: false
names:
- string
ociMediaTypes: false
push: false
pushByDigest: false
store: false
unpack: false
tar:
dest: string
labels:
string: string
load: false
network: default
noCache: false
platforms:
- darwin/386
pull: false
push: false
registries:
- address: string
password: string
username: string
secrets:
string: string
ssh:
- id: string
paths:
- string
tags:
- string
target: string
Image Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The Image resource accepts the following input properties:
- Push bool
When
true
the build will automatically include aregistry
export.Defaults to
false
.Equivalent to Docker's
--push
flag.- Add
Hosts List<string> Custom
host:ip
mappings to use during the build.Equivalent to Docker's
--add-host
flag.- Build
Args Dictionary<string, 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.- Build
On boolPreview Setting this to
false
will always skip image builds during previews, and setting it totrue
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.- Builder
Pulumi.
Docker Build. Inputs. Builder Config - Builder configuration.
- Cache
From List<Pulumi.Docker Build. Inputs. Cache From> Cache export configuration.
Equivalent to Docker's
--cache-from
flag.- Cache
To List<Pulumi.Docker Build. Inputs. Cache To> Cache import configuration.
Equivalent to Docker's
--cache-to
flag.- Context
Pulumi.
Docker Build. Inputs. Build Context Build context settings. Defaults to the current directory.
Equivalent to Docker's
PATH | URL | -
positional argument.- Dockerfile
Pulumi.
Docker Build. Inputs. Dockerfile Dockerfile settings.
Equivalent to Docker's
--file
flag.- Exec 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 customdocker-buildx
binary with support for Docker Build Cloud (DBC).When this is set to
true
the provider will instead execute thedocker-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 thedocker-buildx
binary.- Exports
List<Pulumi.
Docker Build. Inputs. Export> 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.- Labels Dictionary<string, string>
Attach arbitrary key/value metadata to the image.
Equivalent to Docker's
--label
flag.- Load bool
When
true
the build will automatically include adocker
export.Defaults to
false
.Equivalent to Docker's
--load
flag.- Network
Pulumi.
Docker Build. Network Mode Set the network mode for
RUN
instructions. Defaults todefault
.For custom networks, configure your builder with
--driver-opt network=...
.Equivalent to Docker's
--network
flag.- No
Cache bool Do not import cache manifests when building the image.
Equivalent to Docker's
--no-cache
flag.- Platforms
List<Pulumi.
Docker Build. Platform> Set target platform(s) for the build. Defaults to the host's platform.
Equivalent to Docker's
--platform
flag.- Pull bool
Always pull referenced images.
Equivalent to Docker's
--pull
flag.- Registries
List<Pulumi.
Docker Build. Inputs. Registry> 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
.- Secrets Dictionary<string, 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.- Ssh
List<Pulumi.
Docker Build. Inputs. SSH> SSH agent socket or keys to expose to the build.
Equivalent to Docker's
--ssh
flag.- List<string>
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.- Target 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.
- Push bool
When
true
the build will automatically include aregistry
export.Defaults to
false
.Equivalent to Docker's
--push
flag.- Add
Hosts []string Custom
host:ip
mappings to use during the build.Equivalent to Docker's
--add-host
flag.- Build
Args map[string]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.- Build
On boolPreview Setting this to
false
will always skip image builds during previews, and setting it totrue
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.- Builder
Builder
Config Args - Builder configuration.
- Cache
From []CacheFrom Args Cache export configuration.
Equivalent to Docker's
--cache-from
flag.- Cache
To []CacheTo Args Cache import configuration.
Equivalent to Docker's
--cache-to
flag.- Context
Build
Context Args Build context settings. Defaults to the current directory.
Equivalent to Docker's
PATH | URL | -
positional argument.- Dockerfile
Dockerfile
Args Dockerfile settings.
Equivalent to Docker's
--file
flag.- Exec 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 customdocker-buildx
binary with support for Docker Build Cloud (DBC).When this is set to
true
the provider will instead execute thedocker-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 thedocker-buildx
binary.- Exports
[]Export
Args 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.- Labels map[string]string
Attach arbitrary key/value metadata to the image.
Equivalent to Docker's
--label
flag.- Load bool
When
true
the build will automatically include adocker
export.Defaults to
false
.Equivalent to Docker's
--load
flag.- Network
Network
Mode Set the network mode for
RUN
instructions. Defaults todefault
.For custom networks, configure your builder with
--driver-opt network=...
.Equivalent to Docker's
--network
flag.- No
Cache bool Do not import cache manifests when building the image.
Equivalent to Docker's
--no-cache
flag.- Platforms []Platform
Set target platform(s) for the build. Defaults to the host's platform.
Equivalent to Docker's
--platform
flag.- Pull bool
Always pull referenced images.
Equivalent to Docker's
--pull
flag.- Registries
[]Registry
Args 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
.- Secrets map[string]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.- Ssh []SSHArgs
SSH agent socket or keys to expose to the build.
Equivalent to Docker's
--ssh
flag.- []string
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.- Target 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.
- push Boolean
When
true
the build will automatically include aregistry
export.Defaults to
false
.Equivalent to Docker's
--push
flag.- add
Hosts List<String> Custom
host:ip
mappings to use during the build.Equivalent to Docker's
--add-host
flag.- build
Args Map<String,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.- build
On BooleanPreview Setting this to
false
will always skip image builds during previews, and setting it totrue
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.- builder_
Builder
Config - Builder configuration.
- cache
From List<CacheFrom> Cache export configuration.
Equivalent to Docker's
--cache-from
flag.- cache
To List<CacheTo> Cache import configuration.
Equivalent to Docker's
--cache-to
flag.- context
Build
Context Build context settings. Defaults to the current directory.
Equivalent to Docker's
PATH | URL | -
positional argument.- dockerfile Dockerfile
Dockerfile settings.
Equivalent to Docker's
--file
flag.- exec Boolean
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 customdocker-buildx
binary with support for Docker Build Cloud (DBC).When this is set to
true
the provider will instead execute thedocker-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 thedocker-buildx
binary.- exports List<Export>
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.- labels Map<String,String>
Attach arbitrary key/value metadata to the image.
Equivalent to Docker's
--label
flag.- load Boolean
When
true
the build will automatically include adocker
export.Defaults to
false
.Equivalent to Docker's
--load
flag.- network
Network
Mode Set the network mode for
RUN
instructions. Defaults todefault
.For custom networks, configure your builder with
--driver-opt network=...
.Equivalent to Docker's
--network
flag.- no
Cache Boolean Do not import cache manifests when building the image.
Equivalent to Docker's
--no-cache
flag.- platforms List<Platform>
Set target platform(s) for the build. Defaults to the host's platform.
Equivalent to Docker's
--platform
flag.- pull Boolean
Always pull referenced images.
Equivalent to Docker's
--pull
flag.- registries List<Registry>
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
.- secrets Map<String,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.- ssh List<SSH>
SSH agent socket or keys to expose to the build.
Equivalent to Docker's
--ssh
flag.- List<String>
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.- target 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.
- push boolean
When
true
the build will automatically include aregistry
export.Defaults to
false
.Equivalent to Docker's
--push
flag.- add
Hosts string[] Custom
host:ip
mappings to use during the build.Equivalent to Docker's
--add-host
flag.- build
Args {[key: string]: 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.- build
On booleanPreview Setting this to
false
will always skip image builds during previews, and setting it totrue
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.- builder
Builder
Config - Builder configuration.
- cache
From CacheFrom[] Cache export configuration.
Equivalent to Docker's
--cache-from
flag.- cache
To CacheTo[] Cache import configuration.
Equivalent to Docker's
--cache-to
flag.- context
Build
Context Build context settings. Defaults to the current directory.
Equivalent to Docker's
PATH | URL | -
positional argument.- dockerfile Dockerfile
Dockerfile settings.
Equivalent to Docker's
--file
flag.- exec boolean
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 customdocker-buildx
binary with support for Docker Build Cloud (DBC).When this is set to
true
the provider will instead execute thedocker-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 thedocker-buildx
binary.- exports Export[]
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.- labels {[key: string]: string}
Attach arbitrary key/value metadata to the image.
Equivalent to Docker's
--label
flag.- load boolean
When
true
the build will automatically include adocker
export.Defaults to
false
.Equivalent to Docker's
--load
flag.- network
Network
Mode Set the network mode for
RUN
instructions. Defaults todefault
.For custom networks, configure your builder with
--driver-opt network=...
.Equivalent to Docker's
--network
flag.- no
Cache boolean Do not import cache manifests when building the image.
Equivalent to Docker's
--no-cache
flag.- platforms Platform[]
Set target platform(s) for the build. Defaults to the host's platform.
Equivalent to Docker's
--platform
flag.- pull boolean
Always pull referenced images.
Equivalent to Docker's
--pull
flag.- registries Registry[]
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
.- secrets {[key: string]: 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.- ssh SSH[]
SSH agent socket or keys to expose to the build.
Equivalent to Docker's
--ssh
flag.- string[]
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.- target 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.
- push bool
When
true
the build will automatically include aregistry
export.Defaults to
false
.Equivalent to Docker's
--push
flag.- add_
hosts Sequence[str] Custom
host:ip
mappings to use during the build.Equivalent to Docker's
--add-host
flag.- build_
args Mapping[str, str] 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.- build_
on_ boolpreview Setting this to
false
will always skip image builds during previews, and setting it totrue
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.- builder
Builder
Config Args - Builder configuration.
- cache_
from Sequence[CacheFrom Args] Cache export configuration.
Equivalent to Docker's
--cache-from
flag.- cache_
to Sequence[CacheTo Args] Cache import configuration.
Equivalent to Docker's
--cache-to
flag.- context
Build
Context Args Build context settings. Defaults to the current directory.
Equivalent to Docker's
PATH | URL | -
positional argument.- dockerfile
Dockerfile
Args Dockerfile settings.
Equivalent to Docker's
--file
flag.- exec_ 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 customdocker-buildx
binary with support for Docker Build Cloud (DBC).When this is set to
true
the provider will instead execute thedocker-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 thedocker-buildx
binary.- exports
Sequence[Export
Args] 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.- labels Mapping[str, str]
Attach arbitrary key/value metadata to the image.
Equivalent to Docker's
--label
flag.- load bool
When
true
the build will automatically include adocker
export.Defaults to
false
.Equivalent to Docker's
--load
flag.- network
Network
Mode Set the network mode for
RUN
instructions. Defaults todefault
.For custom networks, configure your builder with
--driver-opt network=...
.Equivalent to Docker's
--network
flag.- no_
cache bool Do not import cache manifests when building the image.
Equivalent to Docker's
--no-cache
flag.- platforms Sequence[Platform]
Set target platform(s) for the build. Defaults to the host's platform.
Equivalent to Docker's
--platform
flag.- pull bool
Always pull referenced images.
Equivalent to Docker's
--pull
flag.- registries
Sequence[Registry
Args] 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
.- secrets Mapping[str, str]
A mapping of secret names to their corresponding values.
Unlike the Docker CLI, these can be passed by value and do not need to exist on-disk or in environment variables.
Build arguments and environment variables are persistent in the final image, so you should use this for sensitive values.
Similar to Docker's
--secret
flag.- ssh Sequence[SSHArgs]
SSH agent socket or keys to expose to the build.
Equivalent to Docker's
--ssh
flag.- Sequence[str]
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.- target str
Set the target build stage(s) to build.
If not specified all targets will be built by default.
Equivalent to Docker's
--target
flag.
- push Boolean
When
true
the build will automatically include aregistry
export.Defaults to
false
.Equivalent to Docker's
--push
flag.- add
Hosts List<String> Custom
host:ip
mappings to use during the build.Equivalent to Docker's
--add-host
flag.- build
Args Map<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.- build
On BooleanPreview Setting this to
false
will always skip image builds during previews, and setting it totrue
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.- builder Property Map
- Builder configuration.
- cache
From List<Property Map> Cache export configuration.
Equivalent to Docker's
--cache-from
flag.- cache
To List<Property Map> Cache import configuration.
Equivalent to Docker's
--cache-to
flag.- context Property Map
Build context settings. Defaults to the current directory.
Equivalent to Docker's
PATH | URL | -
positional argument.- dockerfile Property Map
Dockerfile settings.
Equivalent to Docker's
--file
flag.- exec Boolean
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 customdocker-buildx
binary with support for Docker Build Cloud (DBC).When this is set to
true
the provider will instead execute thedocker-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 thedocker-buildx
binary.- exports List<Property Map>
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.- labels Map<String>
Attach arbitrary key/value metadata to the image.
Equivalent to Docker's
--label
flag.- load Boolean
When
true
the build will automatically include adocker
export.Defaults to
false
.Equivalent to Docker's
--load
flag.- network "default" | "host" | "none"
Set the network mode for
RUN
instructions. Defaults todefault
.For custom networks, configure your builder with
--driver-opt network=...
.Equivalent to Docker's
--network
flag.- no
Cache Boolean Do not import cache manifests when building the image.
Equivalent to Docker's
--no-cache
flag.- platforms List<"darwin/386" | "darwin/amd64" | "darwin/arm" | "darwin/arm64" | "dragonfly/amd64" | "freebsd/386" | "freebsd/amd64" | "freebsd/arm" | "linux/386" | "linux/amd64" | "linux/arm" | "linux/arm64" | "linux/mips64" | "linux/mips64le" | "linux/ppc64le" | "linux/riscv64" | "linux/s390x" | "netbsd/386" | "netbsd/amd64" | "netbsd/arm" | "openbsd/386" | "openbsd/amd64" | "openbsd/arm" | "plan9/386" | "plan9/amd64" | "solaris/amd64" | "windows/386" | "windows/amd64">
Set target platform(s) for the build. Defaults to the host's platform.
Equivalent to Docker's
--platform
flag.- pull Boolean
Always pull referenced images.
Equivalent to Docker's
--pull
flag.- registries List<Property Map>
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
.- secrets Map<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.- ssh List<Property Map>
SSH agent socket or keys to expose to the build.
Equivalent to Docker's
--ssh
flag.- List<String>
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.- target 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.
Outputs
All input properties are implicitly available as output properties. Additionally, the Image resource produces the following output properties:
- Context
Hash string A preliminary hash of the image's build context.
Pulumi uses this to determine if an image may need to be re-built.
- Digest 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>
. Theref
output provides one such reference as a convenience.- Id string
- The provider-assigned unique ID for this managed resource.
- Ref 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.
- Context
Hash string A preliminary hash of the image's build context.
Pulumi uses this to determine if an image may need to be re-built.
- Digest 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>
. Theref
output provides one such reference as a convenience.- Id string
- The provider-assigned unique ID for this managed resource.
- Ref 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.
- context
Hash String A preliminary hash of the image's build context.
Pulumi uses this to determine if an image may need to be re-built.
- digest 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>
. Theref
output provides one such reference as a convenience.- id String
- The provider-assigned unique ID for this managed resource.
- ref 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.
- context
Hash string A preliminary hash of the image's build context.
Pulumi uses this to determine if an image may need to be re-built.
- digest 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>
. Theref
output provides one such reference as a convenience.- id string
- The provider-assigned unique ID for this managed resource.
- ref 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.
- context_
hash str A preliminary hash of the image's build context.
Pulumi uses this to determine if an image may need to be re-built.
- digest str
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>
. Theref
output provides one such reference as a convenience.- id str
- The provider-assigned unique ID for this managed resource.
- ref str
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.
- context
Hash String A preliminary hash of the image's build context.
Pulumi uses this to determine if an image may need to be re-built.
- digest 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>
. Theref
output provides one such reference as a convenience.- id String
- The provider-assigned unique ID for this managed resource.
- ref 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.
Supporting Types
BuildContext, BuildContextArgs
- Location string
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.).
- A relative or absolute path to a local directory (
- Named
Dictionary<string, Pulumi.
Docker Build. Inputs. Context> 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.
- Location string
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.).
- A relative or absolute path to a local directory (
- Named map[string]Context
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.
- location String
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.).
- A relative or absolute path to a local directory (
- named Map<String,Context>
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.
- location string
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.).
- A relative or absolute path to a local directory (
- named {[key: string]: Context}
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.
- location str
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.).
- A relative or absolute path to a local directory (
- named Mapping[str, Context]
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.
- location String
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.).
- A relative or absolute path to a local directory (
- named Map<Property Map>
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.
BuilderConfig, BuilderConfigArgs
- Name string
Name of an existing buildx builder to use.
Only
docker-container
,kubernetes
, orremote
drivers are supported. The legacydocker
driver is not supported.Equivalent to Docker's
--builder
flag.
- Name string
Name of an existing buildx builder to use.
Only
docker-container
,kubernetes
, orremote
drivers are supported. The legacydocker
driver is not supported.Equivalent to Docker's
--builder
flag.
- name String
Name of an existing buildx builder to use.
Only
docker-container
,kubernetes
, orremote
drivers are supported. The legacydocker
driver is not supported.Equivalent to Docker's
--builder
flag.
- name string
Name of an existing buildx builder to use.
Only
docker-container
,kubernetes
, orremote
drivers are supported. The legacydocker
driver is not supported.Equivalent to Docker's
--builder
flag.
- name str
Name of an existing buildx builder to use.
Only
docker-container
,kubernetes
, orremote
drivers are supported. The legacydocker
driver is not supported.Equivalent to Docker's
--builder
flag.
- name String
Name of an existing buildx builder to use.
Only
docker-container
,kubernetes
, orremote
drivers are supported. The legacydocker
driver is not supported.Equivalent to Docker's
--builder
flag.
CacheFrom, CacheFromArgs
- Azblob
Pulumi.
Docker Build. Inputs. Cache From Azure Blob - Upload build caches to Azure's blob storage service.
- Disabled bool
- When
true
this entry will be excluded. Defaults tofalse
. - Gha
Pulumi.
Docker Build. Inputs. Cache From Git Hub Actions 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.- Local
Pulumi.
Docker Build. Inputs. Cache From Local - A simple backend which caches images on your local filesystem.
- Raw string
- A raw string as you would provide it to the Docker CLI (e.g.,
type=inline
). - Registry
Pulumi.
Docker Build. Inputs. Cache From Registry - Upload build caches to remote registries.
- S3
Pulumi.
Docker Build. Inputs. Cache From S3 - Upload build caches to AWS S3 or an S3-compatible services such as MinIO.
- Azblob
Cache
From Azure Blob - Upload build caches to Azure's blob storage service.
- Disabled bool
- When
true
this entry will be excluded. Defaults tofalse
. - Gha
Cache
From Git Hub Actions 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.- Local
Cache
From Local - A simple backend which caches images on your local filesystem.
- Raw string
- A raw string as you would provide it to the Docker CLI (e.g.,
type=inline
). - Registry
Cache
From Registry - Upload build caches to remote registries.
- S3
Cache
From S3 - Upload build caches to AWS S3 or an S3-compatible services such as MinIO.
- azblob
Cache
From Azure Blob - Upload build caches to Azure's blob storage service.
- disabled Boolean
- When
true
this entry will be excluded. Defaults tofalse
. - gha
Cache
From Git Hub Actions 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.- local
Cache
From Local - A simple backend which caches images on your local filesystem.
- raw String
- A raw string as you would provide it to the Docker CLI (e.g.,
type=inline
). - registry
Cache
From Registry - Upload build caches to remote registries.
- s3
Cache
From S3 - Upload build caches to AWS S3 or an S3-compatible services such as MinIO.
- azblob
Cache
From Azure Blob - Upload build caches to Azure's blob storage service.
- disabled boolean
- When
true
this entry will be excluded. Defaults tofalse
. - gha
Cache
From Git Hub Actions 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.- local
Cache
From Local - A simple backend which caches images on your local filesystem.
- raw string
- A raw string as you would provide it to the Docker CLI (e.g.,
type=inline
). - registry
Cache
From Registry - Upload build caches to remote registries.
- s3
Cache
From S3 - Upload build caches to AWS S3 or an S3-compatible services such as MinIO.
- azblob
Cache
From Azure Blob - Upload build caches to Azure's blob storage service.
- disabled bool
- When
true
this entry will be excluded. Defaults tofalse
. - gha
Cache
From Git Hub Actions 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.- local
Cache
From Local - A simple backend which caches images on your local filesystem.
- raw str
- A raw string as you would provide it to the Docker CLI (e.g.,
type=inline
). - registry
Cache
From Registry - Upload build caches to remote registries.
- s3
Cache
From S3 - Upload build caches to AWS S3 or an S3-compatible services such as MinIO.
- azblob Property Map
- Upload build caches to Azure's blob storage service.
- disabled Boolean
- When
true
this entry will be excluded. Defaults tofalse
. - gha Property Map
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.- local Property Map
- A simple backend which caches images on your local filesystem.
- raw String
- A raw string as you would provide it to the Docker CLI (e.g.,
type=inline
). - registry Property Map
- Upload build caches to remote registries.
- s3 Property Map
- Upload build caches to AWS S3 or an S3-compatible services such as MinIO.
CacheFromAzureBlob, CacheFromAzureBlobArgs
- Name string
- The name of the cache image.
- Account
Url string - Base URL of the storage account.
- Secret
Access stringKey - Blob storage account key.
- Name string
- The name of the cache image.
- Account
Url string - Base URL of the storage account.
- Secret
Access stringKey - Blob storage account key.
- name String
- The name of the cache image.
- account
Url String - Base URL of the storage account.
- secret
Access StringKey - Blob storage account key.
- name string
- The name of the cache image.
- account
Url string - Base URL of the storage account.
- secret
Access stringKey - Blob storage account key.
- name str
- The name of the cache image.
- account_
url str - Base URL of the storage account.
- secret_
access_ strkey - Blob storage account key.
- name String
- The name of the cache image.
- account
Url String - Base URL of the storage account.
- secret
Access StringKey - Blob storage account key.
CacheFromGitHubActions, CacheFromGitHubActionsArgs
- Scope string
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.
- Token string
The GitHub Actions token to use. This is not a personal access tokens and is typically generated automatically as part of each job.
Defaults to
$ACTIONS_RUNTIME_TOKEN
, although a separate action likecrazy-max/ghaction-github-runtime
is recommended to expose this environment variable to your jobs.- Url string
The cache server URL to use for artifacts.
Defaults to
$ACTIONS_CACHE_URL
, although a separate action likecrazy-max/ghaction-github-runtime
is recommended to expose this environment variable to your jobs.
- Scope string
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.
- Token string
The GitHub Actions token to use. This is not a personal access tokens and is typically generated automatically as part of each job.
Defaults to
$ACTIONS_RUNTIME_TOKEN
, although a separate action likecrazy-max/ghaction-github-runtime
is recommended to expose this environment variable to your jobs.- Url string
The cache server URL to use for artifacts.
Defaults to
$ACTIONS_CACHE_URL
, although a separate action likecrazy-max/ghaction-github-runtime
is recommended to expose this environment variable to your jobs.
- scope String
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.
- token String
The GitHub Actions token to use. This is not a personal access tokens and is typically generated automatically as part of each job.
Defaults to
$ACTIONS_RUNTIME_TOKEN
, although a separate action likecrazy-max/ghaction-github-runtime
is recommended to expose this environment variable to your jobs.- url String
The cache server URL to use for artifacts.
Defaults to
$ACTIONS_CACHE_URL
, although a separate action likecrazy-max/ghaction-github-runtime
is recommended to expose this environment variable to your jobs.
- scope string
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.
- token string
The GitHub Actions token to use. This is not a personal access tokens and is typically generated automatically as part of each job.
Defaults to
$ACTIONS_RUNTIME_TOKEN
, although a separate action likecrazy-max/ghaction-github-runtime
is recommended to expose this environment variable to your jobs.- url string
The cache server URL to use for artifacts.
Defaults to
$ACTIONS_CACHE_URL
, although a separate action likecrazy-max/ghaction-github-runtime
is recommended to expose this environment variable to your jobs.
- scope str
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.
- token str
The GitHub Actions token to use. This is not a personal access tokens and is typically generated automatically as part of each job.
Defaults to
$ACTIONS_RUNTIME_TOKEN
, although a separate action likecrazy-max/ghaction-github-runtime
is recommended to expose this environment variable to your jobs.- url str
The cache server URL to use for artifacts.
Defaults to
$ACTIONS_CACHE_URL
, although a separate action likecrazy-max/ghaction-github-runtime
is recommended to expose this environment variable to your jobs.
- scope String
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.
- token String
The GitHub Actions token to use. This is not a personal access tokens and is typically generated automatically as part of each job.
Defaults to
$ACTIONS_RUNTIME_TOKEN
, although a separate action likecrazy-max/ghaction-github-runtime
is recommended to expose this environment variable to your jobs.- url String
The cache server URL to use for artifacts.
Defaults to
$ACTIONS_CACHE_URL
, although a separate action likecrazy-max/ghaction-github-runtime
is recommended to expose this environment variable to your jobs.
CacheFromLocal, CacheFromLocalArgs
CacheFromRegistry, CacheFromRegistryArgs
- Ref string
- Fully qualified name of the cache image to import.
- Ref string
- Fully qualified name of the cache image to import.
- ref String
- Fully qualified name of the cache image to import.
- ref string
- Fully qualified name of the cache image to import.
- ref str
- Fully qualified name of the cache image to import.
- ref String
- Fully qualified name of the cache image to import.
CacheFromS3, CacheFromS3Args
- Bucket string
- Name of the S3 bucket.
- Region string
- The geographic location of the bucket. Defaults to
$AWS_REGION
. - Access
Key stringId - Defaults to
$AWS_ACCESS_KEY_ID
. - Blobs
Prefix string - Prefix to prepend to blob filenames.
- Endpoint
Url string - Endpoint of the S3 bucket.
- Manifests
Prefix string - Prefix to prepend on manifest filenames.
- Name string
- Name of the cache image.
- Secret
Access stringKey - Defaults to
$AWS_SECRET_ACCESS_KEY
. - Session
Token string - Defaults to
$AWS_SESSION_TOKEN
. - Use
Path boolStyle - Uses
bucket
in the URL instead of hostname whentrue
.
- Bucket string
- Name of the S3 bucket.
- Region string
- The geographic location of the bucket. Defaults to
$AWS_REGION
. - Access
Key stringId - Defaults to
$AWS_ACCESS_KEY_ID
. - Blobs
Prefix string - Prefix to prepend to blob filenames.
- Endpoint
Url string - Endpoint of the S3 bucket.
- Manifests
Prefix string - Prefix to prepend on manifest filenames.
- Name string
- Name of the cache image.
- Secret
Access stringKey - Defaults to
$AWS_SECRET_ACCESS_KEY
. - Session
Token string - Defaults to
$AWS_SESSION_TOKEN
. - Use
Path boolStyle - Uses
bucket
in the URL instead of hostname whentrue
.
- bucket String
- Name of the S3 bucket.
- region String
- The geographic location of the bucket. Defaults to
$AWS_REGION
. - access
Key StringId - Defaults to
$AWS_ACCESS_KEY_ID
. - blobs
Prefix String - Prefix to prepend to blob filenames.
- endpoint
Url String - Endpoint of the S3 bucket.
- manifests
Prefix String - Prefix to prepend on manifest filenames.
- name String
- Name of the cache image.
- secret
Access StringKey - Defaults to
$AWS_SECRET_ACCESS_KEY
. - session
Token String - Defaults to
$AWS_SESSION_TOKEN
. - use
Path BooleanStyle - Uses
bucket
in the URL instead of hostname whentrue
.
- bucket string
- Name of the S3 bucket.
- region string
- The geographic location of the bucket. Defaults to
$AWS_REGION
. - access
Key stringId - Defaults to
$AWS_ACCESS_KEY_ID
. - blobs
Prefix string - Prefix to prepend to blob filenames.
- endpoint
Url string - Endpoint of the S3 bucket.
- manifests
Prefix string - Prefix to prepend on manifest filenames.
- name string
- Name of the cache image.
- secret
Access stringKey - Defaults to
$AWS_SECRET_ACCESS_KEY
. - session
Token string - Defaults to
$AWS_SESSION_TOKEN
. - use
Path booleanStyle - Uses
bucket
in the URL instead of hostname whentrue
.
- bucket str
- Name of the S3 bucket.
- region str
- The geographic location of the bucket. Defaults to
$AWS_REGION
. - access_
key_ strid - Defaults to
$AWS_ACCESS_KEY_ID
. - blobs_
prefix str - Prefix to prepend to blob filenames.
- endpoint_
url str - Endpoint of the S3 bucket.
- manifests_
prefix str - Prefix to prepend on manifest filenames.
- name str
- Name of the cache image.
- secret_
access_ strkey - Defaults to
$AWS_SECRET_ACCESS_KEY
. - session_
token str - Defaults to
$AWS_SESSION_TOKEN
. - use_
path_ boolstyle - Uses
bucket
in the URL instead of hostname whentrue
.
- bucket String
- Name of the S3 bucket.
- region String
- The geographic location of the bucket. Defaults to
$AWS_REGION
. - access
Key StringId - Defaults to
$AWS_ACCESS_KEY_ID
. - blobs
Prefix String - Prefix to prepend to blob filenames.
- endpoint
Url String - Endpoint of the S3 bucket.
- manifests
Prefix String - Prefix to prepend on manifest filenames.
- name String
- Name of the cache image.
- secret
Access StringKey - Defaults to
$AWS_SECRET_ACCESS_KEY
. - session
Token String - Defaults to
$AWS_SESSION_TOKEN
. - use
Path BooleanStyle - Uses
bucket
in the URL instead of hostname whentrue
.
CacheMode, CacheModeArgs
- Min
- minOnly layers that are exported into the resulting image are cached.
- Max
- maxAll layers are cached, even those of intermediate steps.
- Cache
Mode Min - minOnly layers that are exported into the resulting image are cached.
- Cache
Mode Max - maxAll layers are cached, even those of intermediate steps.
- Min
- minOnly layers that are exported into the resulting image are cached.
- Max
- maxAll layers are cached, even those of intermediate steps.
- Min
- minOnly layers that are exported into the resulting image are cached.
- Max
- maxAll layers are cached, even those of intermediate steps.
- MIN
- minOnly layers that are exported into the resulting image are cached.
- MAX
- maxAll layers are cached, even those of intermediate steps.
- "min"
- minOnly layers that are exported into the resulting image are cached.
- "max"
- maxAll layers are cached, even those of intermediate steps.
CacheTo, CacheToArgs
- Azblob
Pulumi.
Docker Build. Inputs. Cache To Azure Blob - Push cache to Azure's blob storage service.
- Disabled bool
- When
true
this entry will be excluded. Defaults tofalse
. - Gha
Pulumi.
Docker Build. Inputs. Cache To Git Hub Actions 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.- Inline
Pulumi.
Docker Build. Inputs. Cache To 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. - Local
Pulumi.
Docker Build. Inputs. Cache To Local - A simple backend which caches imagines on your local filesystem.
- Raw string
- A raw string as you would provide it to the Docker CLI (e.g.,
type=inline
) - Registry
Pulumi.
Docker Build. Inputs. Cache To Registry - Push caches to remote registries. Incompatible with the
docker
build driver. - S3
Pulumi.
Docker Build. Inputs. Cache To S3 - Push cache to AWS S3 or S3-compatible services such as MinIO.
- Azblob
Cache
To Azure Blob - Push cache to Azure's blob storage service.
- Disabled bool
- When
true
this entry will be excluded. Defaults tofalse
. - Gha
Cache
To Git Hub Actions 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.- Inline
Cache
To 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. - Local
Cache
To Local - A simple backend which caches imagines on your local filesystem.
- Raw string
- A raw string as you would provide it to the Docker CLI (e.g.,
type=inline
) - Registry
Cache
To Registry - Push caches to remote registries. Incompatible with the
docker
build driver. - S3
Cache
To S3 - Push cache to AWS S3 or S3-compatible services such as MinIO.
- azblob
Cache
To Azure Blob - Push cache to Azure's blob storage service.
- disabled Boolean
- When
true
this entry will be excluded. Defaults tofalse
. - gha
Cache
To Git Hub Actions 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.- inline
Cache
To 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. - local
Cache
To Local - A simple backend which caches imagines on your local filesystem.
- raw String
- A raw string as you would provide it to the Docker CLI (e.g.,
type=inline
) - registry
Cache
To Registry - Push caches to remote registries. Incompatible with the
docker
build driver. - s3
Cache
To S3 - Push cache to AWS S3 or S3-compatible services such as MinIO.
- azblob
Cache
To Azure Blob - Push cache to Azure's blob storage service.
- disabled boolean
- When
true
this entry will be excluded. Defaults tofalse
. - gha
Cache
To Git Hub Actions 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.- inline
Cache
To 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. - local
Cache
To Local - A simple backend which caches imagines on your local filesystem.
- raw string
- A raw string as you would provide it to the Docker CLI (e.g.,
type=inline
) - registry
Cache
To Registry - Push caches to remote registries. Incompatible with the
docker
build driver. - s3
Cache
To S3 - Push cache to AWS S3 or S3-compatible services such as MinIO.
- azblob
Cache
To Azure Blob - Push cache to Azure's blob storage service.
- disabled bool
- When
true
this entry will be excluded. Defaults tofalse
. - gha
Cache
To Git Hub Actions 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.- inline
Cache
To 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. - local
Cache
To Local - A simple backend which caches imagines on your local filesystem.
- raw str
- A raw string as you would provide it to the Docker CLI (e.g.,
type=inline
) - registry
Cache
To Registry - Push caches to remote registries. Incompatible with the
docker
build driver. - s3
Cache
To S3 - Push cache to AWS S3 or S3-compatible services such as MinIO.
- azblob Property Map
- Push cache to Azure's blob storage service.
- disabled Boolean
- When
true
this entry will be excluded. Defaults tofalse
. - gha Property Map
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.- inline Property Map
- 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. - local Property Map
- A simple backend which caches imagines on your local filesystem.
- raw String
- A raw string as you would provide it to the Docker CLI (e.g.,
type=inline
) - registry Property Map
- Push caches to remote registries. Incompatible with the
docker
build driver. - s3 Property Map
- Push cache to AWS S3 or S3-compatible services such as MinIO.
CacheToAzureBlob, CacheToAzureBlobArgs
- Name string
- The name of the cache image.
- Account
Url string - Base URL of the storage account.
- Ignore
Error bool - Ignore errors caused by failed cache exports.
- Mode
Pulumi.
Docker Build. Cache Mode - The cache mode to use. Defaults to
min
. - Secret
Access stringKey - Blob storage account key.
- Name string
- The name of the cache image.
- Account
Url string - Base URL of the storage account.
- Ignore
Error bool - Ignore errors caused by failed cache exports.
- Mode
Cache
Mode - The cache mode to use. Defaults to
min
. - Secret
Access stringKey - Blob storage account key.
- name String
- The name of the cache image.
- account
Url String - Base URL of the storage account.
- ignore
Error Boolean - Ignore errors caused by failed cache exports.
- mode
Cache
Mode - The cache mode to use. Defaults to
min
. - secret
Access StringKey - Blob storage account key.
- name string
- The name of the cache image.
- account
Url string - Base URL of the storage account.
- ignore
Error boolean - Ignore errors caused by failed cache exports.
- mode
Cache
Mode - The cache mode to use. Defaults to
min
. - secret
Access stringKey - Blob storage account key.
- name str
- The name of the cache image.
- account_
url str - Base URL of the storage account.
- ignore_
error bool - Ignore errors caused by failed cache exports.
- mode
Cache
Mode - The cache mode to use. Defaults to
min
. - secret_
access_ strkey - Blob storage account key.
- name String
- The name of the cache image.
- account
Url String - Base URL of the storage account.
- ignore
Error Boolean - Ignore errors caused by failed cache exports.
- mode "min" | "max"
- The cache mode to use. Defaults to
min
. - secret
Access StringKey - Blob storage account key.
CacheToGitHubActions, CacheToGitHubActionsArgs
- Ignore
Error bool - Ignore errors caused by failed cache exports.
- Mode
Pulumi.
Docker Build. Cache Mode - The cache mode to use. Defaults to
min
. - Scope string
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.
- Token string
The GitHub Actions token to use. This is not a personal access tokens and is typically generated automatically as part of each job.
Defaults to
$ACTIONS_RUNTIME_TOKEN
, although a separate action likecrazy-max/ghaction-github-runtime
is recommended to expose this environment variable to your jobs.- Url string
The cache server URL to use for artifacts.
Defaults to
$ACTIONS_CACHE_URL
, although a separate action likecrazy-max/ghaction-github-runtime
is recommended to expose this environment variable to your jobs.
- Ignore
Error bool - Ignore errors caused by failed cache exports.
- Mode
Cache
Mode - The cache mode to use. Defaults to
min
. - Scope string
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.
- Token string
The GitHub Actions token to use. This is not a personal access tokens and is typically generated automatically as part of each job.
Defaults to
$ACTIONS_RUNTIME_TOKEN
, although a separate action likecrazy-max/ghaction-github-runtime
is recommended to expose this environment variable to your jobs.- Url string
The cache server URL to use for artifacts.
Defaults to
$ACTIONS_CACHE_URL
, although a separate action likecrazy-max/ghaction-github-runtime
is recommended to expose this environment variable to your jobs.
- ignore
Error Boolean - Ignore errors caused by failed cache exports.
- mode
Cache
Mode - The cache mode to use. Defaults to
min
. - scope String
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.
- token String
The GitHub Actions token to use. This is not a personal access tokens and is typically generated automatically as part of each job.
Defaults to
$ACTIONS_RUNTIME_TOKEN
, although a separate action likecrazy-max/ghaction-github-runtime
is recommended to expose this environment variable to your jobs.- url String
The cache server URL to use for artifacts.
Defaults to
$ACTIONS_CACHE_URL
, although a separate action likecrazy-max/ghaction-github-runtime
is recommended to expose this environment variable to your jobs.
- ignore
Error boolean - Ignore errors caused by failed cache exports.
- mode
Cache
Mode - The cache mode to use. Defaults to
min
. - scope string
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.
- token string
The GitHub Actions token to use. This is not a personal access tokens and is typically generated automatically as part of each job.
Defaults to
$ACTIONS_RUNTIME_TOKEN
, although a separate action likecrazy-max/ghaction-github-runtime
is recommended to expose this environment variable to your jobs.- url string
The cache server URL to use for artifacts.
Defaults to
$ACTIONS_CACHE_URL
, although a separate action likecrazy-max/ghaction-github-runtime
is recommended to expose this environment variable to your jobs.
- ignore_
error bool - Ignore errors caused by failed cache exports.
- mode
Cache
Mode - The cache mode to use. Defaults to
min
. - scope str
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.
- token str
The GitHub Actions token to use. This is not a personal access tokens and is typically generated automatically as part of each job.
Defaults to
$ACTIONS_RUNTIME_TOKEN
, although a separate action likecrazy-max/ghaction-github-runtime
is recommended to expose this environment variable to your jobs.- url str
The cache server URL to use for artifacts.
Defaults to
$ACTIONS_CACHE_URL
, although a separate action likecrazy-max/ghaction-github-runtime
is recommended to expose this environment variable to your jobs.
- ignore
Error Boolean - Ignore errors caused by failed cache exports.
- mode "min" | "max"
- The cache mode to use. Defaults to
min
. - scope String
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.
- token String
The GitHub Actions token to use. This is not a personal access tokens and is typically generated automatically as part of each job.
Defaults to
$ACTIONS_RUNTIME_TOKEN
, although a separate action likecrazy-max/ghaction-github-runtime
is recommended to expose this environment variable to your jobs.- url String
The cache server URL to use for artifacts.
Defaults to
$ACTIONS_CACHE_URL
, although a separate action likecrazy-max/ghaction-github-runtime
is recommended to expose this environment variable to your jobs.
CacheToLocal, CacheToLocalArgs
- Dest string
- Path of the local directory to export the cache.
- Compression
Pulumi.
Docker Build. Compression Type - The compression type to use.
- Compression
Level int - Compression level from 0 to 22.
- Force
Compression bool - Forcefully apply compression.
- Ignore
Error bool - Ignore errors caused by failed cache exports.
- Mode
Pulumi.
Docker Build. Cache Mode - The cache mode to use. Defaults to
min
.
- Dest string
- Path of the local directory to export the cache.
- Compression
Compression
Type - The compression type to use.
- Compression
Level int - Compression level from 0 to 22.
- Force
Compression bool - Forcefully apply compression.
- Ignore
Error bool - Ignore errors caused by failed cache exports.
- Mode
Cache
Mode - The cache mode to use. Defaults to
min
.
- dest String
- Path of the local directory to export the cache.
- compression
Compression
Type - The compression type to use.
- compression
Level Integer - Compression level from 0 to 22.
- force
Compression Boolean - Forcefully apply compression.
- ignore
Error Boolean - Ignore errors caused by failed cache exports.
- mode
Cache
Mode - The cache mode to use. Defaults to
min
.
- dest string
- Path of the local directory to export the cache.
- compression
Compression
Type - The compression type to use.
- compression
Level number - Compression level from 0 to 22.
- force
Compression boolean - Forcefully apply compression.
- ignore
Error boolean - Ignore errors caused by failed cache exports.
- mode
Cache
Mode - The cache mode to use. Defaults to
min
.
- dest str
- Path of the local directory to export the cache.
- compression
Compression
Type - The compression type to use.
- compression_
level int - Compression level from 0 to 22.
- force_
compression bool - Forcefully apply compression.
- ignore_
error bool - Ignore errors caused by failed cache exports.
- mode
Cache
Mode - The cache mode to use. Defaults to
min
.
- dest String
- Path of the local directory to export the cache.
- compression "gzip" | "estargz" | "zstd"
- The compression type to use.
- compression
Level Number - Compression level from 0 to 22.
- force
Compression Boolean - Forcefully apply compression.
- ignore
Error Boolean - Ignore errors caused by failed cache exports.
- mode "min" | "max"
- The cache mode to use. Defaults to
min
.
CacheToRegistry, CacheToRegistryArgs
- Ref string
- Fully qualified name of the cache image to import.
- Compression
Pulumi.
Docker Build. Compression Type - The compression type to use.
- Compression
Level int - Compression level from 0 to 22.
- Force
Compression bool - Forcefully apply compression.
- Ignore
Error bool - Ignore errors caused by failed cache exports.
- Image
Manifest bool Export cache manifest as an OCI-compatible image manifest instead of a manifest list. Requires
ociMediaTypes
to also betrue
.Some registries like AWS ECR will not work with caching if this is
false
.Defaults to
false
to match Docker's default behavior.- Mode
Pulumi.
Docker Build. Cache Mode - The cache mode to use. Defaults to
min
. - Oci
Media boolTypes - Whether to use OCI media types in exported manifests. Defaults to
true
.
- Ref string
- Fully qualified name of the cache image to import.
- Compression
Compression
Type - The compression type to use.
- Compression
Level int - Compression level from 0 to 22.
- Force
Compression bool - Forcefully apply compression.
- Ignore
Error bool - Ignore errors caused by failed cache exports.
- Image
Manifest bool Export cache manifest as an OCI-compatible image manifest instead of a manifest list. Requires
ociMediaTypes
to also betrue
.Some registries like AWS ECR will not work with caching if this is
false
.Defaults to
false
to match Docker's default behavior.- Mode
Cache
Mode - The cache mode to use. Defaults to
min
. - Oci
Media boolTypes - Whether to use OCI media types in exported manifests. Defaults to
true
.
- ref String
- Fully qualified name of the cache image to import.
- compression
Compression
Type - The compression type to use.
- compression
Level Integer - Compression level from 0 to 22.
- force
Compression Boolean - Forcefully apply compression.
- ignore
Error Boolean - Ignore errors caused by failed cache exports.
- image
Manifest Boolean Export cache manifest as an OCI-compatible image manifest instead of a manifest list. Requires
ociMediaTypes
to also betrue
.Some registries like AWS ECR will not work with caching if this is
false
.Defaults to
false
to match Docker's default behavior.- mode
Cache
Mode - The cache mode to use. Defaults to
min
. - oci
Media BooleanTypes - Whether to use OCI media types in exported manifests. Defaults to
true
.
- ref string
- Fully qualified name of the cache image to import.
- compression
Compression
Type - The compression type to use.
- compression
Level number - Compression level from 0 to 22.
- force
Compression boolean - Forcefully apply compression.
- ignore
Error boolean - Ignore errors caused by failed cache exports.
- image
Manifest boolean Export cache manifest as an OCI-compatible image manifest instead of a manifest list. Requires
ociMediaTypes
to also betrue
.Some registries like AWS ECR will not work with caching if this is
false
.Defaults to
false
to match Docker's default behavior.- mode
Cache
Mode - The cache mode to use. Defaults to
min
. - oci
Media booleanTypes - Whether to use OCI media types in exported manifests. Defaults to
true
.
- ref str
- Fully qualified name of the cache image to import.
- compression
Compression
Type - The compression type to use.
- compression_
level int - Compression level from 0 to 22.
- force_
compression bool - Forcefully apply compression.
- ignore_
error bool - Ignore errors caused by failed cache exports.
- image_
manifest bool Export cache manifest as an OCI-compatible image manifest instead of a manifest list. Requires
ociMediaTypes
to also betrue
.Some registries like AWS ECR will not work with caching if this is
false
.Defaults to
false
to match Docker's default behavior.- mode
Cache
Mode - The cache mode to use. Defaults to
min
. - oci_
media_ booltypes - Whether to use OCI media types in exported manifests. Defaults to
true
.
- ref String
- Fully qualified name of the cache image to import.
- compression "gzip" | "estargz" | "zstd"
- The compression type to use.
- compression
Level Number - Compression level from 0 to 22.
- force
Compression Boolean - Forcefully apply compression.
- ignore
Error Boolean - Ignore errors caused by failed cache exports.
- image
Manifest Boolean Export cache manifest as an OCI-compatible image manifest instead of a manifest list. Requires
ociMediaTypes
to also betrue
.Some registries like AWS ECR will not work with caching if this is
false
.Defaults to
false
to match Docker's default behavior.- mode "min" | "max"
- The cache mode to use. Defaults to
min
. - oci
Media BooleanTypes - Whether to use OCI media types in exported manifests. Defaults to
true
.
CacheToS3, CacheToS3Args
- Bucket string
- Name of the S3 bucket.
- Region string
- The geographic location of the bucket. Defaults to
$AWS_REGION
. - Access
Key stringId - Defaults to
$AWS_ACCESS_KEY_ID
. - Blobs
Prefix string - Prefix to prepend to blob filenames.
- Endpoint
Url string - Endpoint of the S3 bucket.
- Ignore
Error bool - Ignore errors caused by failed cache exports.
- Manifests
Prefix string - Prefix to prepend on manifest filenames.
- Mode
Pulumi.
Docker Build. Cache Mode - The cache mode to use. Defaults to
min
. - Name string
- Name of the cache image.
- Secret
Access stringKey - Defaults to
$AWS_SECRET_ACCESS_KEY
. - Session
Token string - Defaults to
$AWS_SESSION_TOKEN
. - Use
Path boolStyle - Uses
bucket
in the URL instead of hostname whentrue
.
- Bucket string
- Name of the S3 bucket.
- Region string
- The geographic location of the bucket. Defaults to
$AWS_REGION
. - Access
Key stringId - Defaults to
$AWS_ACCESS_KEY_ID
. - Blobs
Prefix string - Prefix to prepend to blob filenames.
- Endpoint
Url string - Endpoint of the S3 bucket.
- Ignore
Error bool - Ignore errors caused by failed cache exports.
- Manifests
Prefix string - Prefix to prepend on manifest filenames.
- Mode
Cache
Mode - The cache mode to use. Defaults to
min
. - Name string
- Name of the cache image.
- Secret
Access stringKey - Defaults to
$AWS_SECRET_ACCESS_KEY
. - Session
Token string - Defaults to
$AWS_SESSION_TOKEN
. - Use
Path boolStyle - Uses
bucket
in the URL instead of hostname whentrue
.
- bucket String
- Name of the S3 bucket.
- region String
- The geographic location of the bucket. Defaults to
$AWS_REGION
. - access
Key StringId - Defaults to
$AWS_ACCESS_KEY_ID
. - blobs
Prefix String - Prefix to prepend to blob filenames.
- endpoint
Url String - Endpoint of the S3 bucket.
- ignore
Error Boolean - Ignore errors caused by failed cache exports.
- manifests
Prefix String - Prefix to prepend on manifest filenames.
- mode
Cache
Mode - The cache mode to use. Defaults to
min
. - name String
- Name of the cache image.
- secret
Access StringKey - Defaults to
$AWS_SECRET_ACCESS_KEY
. - session
Token String - Defaults to
$AWS_SESSION_TOKEN
. - use
Path BooleanStyle - Uses
bucket
in the URL instead of hostname whentrue
.
- bucket string
- Name of the S3 bucket.
- region string
- The geographic location of the bucket. Defaults to
$AWS_REGION
. - access
Key stringId - Defaults to
$AWS_ACCESS_KEY_ID
. - blobs
Prefix string - Prefix to prepend to blob filenames.
- endpoint
Url string - Endpoint of the S3 bucket.
- ignore
Error boolean - Ignore errors caused by failed cache exports.
- manifests
Prefix string - Prefix to prepend on manifest filenames.
- mode
Cache
Mode - The cache mode to use. Defaults to
min
. - name string
- Name of the cache image.
- secret
Access stringKey - Defaults to
$AWS_SECRET_ACCESS_KEY
. - session
Token string - Defaults to
$AWS_SESSION_TOKEN
. - use
Path booleanStyle - Uses
bucket
in the URL instead of hostname whentrue
.
- bucket str
- Name of the S3 bucket.
- region str
- The geographic location of the bucket. Defaults to
$AWS_REGION
. - access_
key_ strid - Defaults to
$AWS_ACCESS_KEY_ID
. - blobs_
prefix str - Prefix to prepend to blob filenames.
- endpoint_
url str - Endpoint of the S3 bucket.
- ignore_
error bool - Ignore errors caused by failed cache exports.
- manifests_
prefix str - Prefix to prepend on manifest filenames.
- mode
Cache
Mode - The cache mode to use. Defaults to
min
. - name str
- Name of the cache image.
- secret_
access_ strkey - Defaults to
$AWS_SECRET_ACCESS_KEY
. - session_
token str - Defaults to
$AWS_SESSION_TOKEN
. - use_
path_ boolstyle - Uses
bucket
in the URL instead of hostname whentrue
.
- bucket String
- Name of the S3 bucket.
- region String
- The geographic location of the bucket. Defaults to
$AWS_REGION
. - access
Key StringId - Defaults to
$AWS_ACCESS_KEY_ID
. - blobs
Prefix String - Prefix to prepend to blob filenames.
- endpoint
Url String - Endpoint of the S3 bucket.
- ignore
Error Boolean - Ignore errors caused by failed cache exports.
- manifests
Prefix String - Prefix to prepend on manifest filenames.
- mode "min" | "max"
- The cache mode to use. Defaults to
min
. - name String
- Name of the cache image.
- secret
Access StringKey - Defaults to
$AWS_SECRET_ACCESS_KEY
. - session
Token String - Defaults to
$AWS_SESSION_TOKEN
. - use
Path BooleanStyle - Uses
bucket
in the URL instead of hostname whentrue
.
CompressionType, CompressionTypeArgs
- Gzip
- gzipUse
gzip
for compression. - Estargz
- estargzUse
estargz
for compression. - Zstd
- zstdUse
zstd
for compression.
- Compression
Type Gzip - gzipUse
gzip
for compression. - Compression
Type Estargz - estargzUse
estargz
for compression. - Compression
Type Zstd - zstdUse
zstd
for compression.
- Gzip
- gzipUse
gzip
for compression. - Estargz
- estargzUse
estargz
for compression. - Zstd
- zstdUse
zstd
for compression.
- Gzip
- gzipUse
gzip
for compression. - Estargz
- estargzUse
estargz
for compression. - Zstd
- zstdUse
zstd
for compression.
- GZIP
- gzipUse
gzip
for compression. - ESTARGZ
- estargzUse
estargz
for compression. - ZSTD
- zstdUse
zstd
for compression.
- "gzip"
- gzipUse
gzip
for compression. - "estargz"
- estargzUse
estargz
for compression. - "zstd"
- zstdUse
zstd
for compression.
Context, ContextArgs
- Location string
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.).
- A relative or absolute path to a local directory (
- Location string
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.).
- A relative or absolute path to a local directory (
- location String
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.).
- A relative or absolute path to a local directory (
- location string
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.).
- A relative or absolute path to a local directory (
- location str
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.).
- A relative or absolute path to a local directory (
- location String
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.).
- A relative or absolute path to a local directory (
Dockerfile, DockerfileArgs
- Inline string
Raw Dockerfile contents.
Conflicts with
location
.Equivalent to invoking Docker with
-f -
.- Location 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
.
- Inline string
Raw Dockerfile contents.
Conflicts with
location
.Equivalent to invoking Docker with
-f -
.- Location 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
.
- inline String
Raw Dockerfile contents.
Conflicts with
location
.Equivalent to invoking Docker with
-f -
.- location 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
.
- inline string
Raw Dockerfile contents.
Conflicts with
location
.Equivalent to invoking Docker with
-f -
.- location 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
.
- inline String
Raw Dockerfile contents.
Conflicts with
location
.Equivalent to invoking Docker with
-f -
.- location 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
.
Export, ExportArgs
- Cacheonly
Pulumi.
Docker Build. Inputs. Export Cache Only - A no-op export. Helpful for silencing the 'no exports' warning if you just want to populate caches.
- Disabled bool
- When
true
this entry will be excluded. Defaults tofalse
. - Docker
Pulumi.
Docker Build. Inputs. Export Docker - Export as a Docker image layout.
- Image
Pulumi.
Docker Build. Inputs. Export Image - Outputs the build result into a container image format.
- Local
Pulumi.
Docker Build. Inputs. Export Local - Export to a local directory as files and directories.
- Oci
Pulumi.
Docker Build. Inputs. Export OCI - Identical to the Docker exporter but uses OCI media types by default.
- Raw string
- A raw string as you would provide it to the Docker CLI (e.g.,
type=docker
) - Registry
Pulumi.
Docker Build. Inputs. Export Registry - Identical to the Image exporter, but pushes by default.
- Tar
Pulumi.
Docker Build. Inputs. Export Tar - Export to a local directory as a tarball.
- Cacheonly
Export
Cache Only - A no-op export. Helpful for silencing the 'no exports' warning if you just want to populate caches.
- Disabled bool
- When
true
this entry will be excluded. Defaults tofalse
. - Docker
Export
Docker - Export as a Docker image layout.
- Image
Export
Image - Outputs the build result into a container image format.
- Local
Export
Local - Export to a local directory as files and directories.
- Oci
Export
OCI - Identical to the Docker exporter but uses OCI media types by default.
- Raw string
- A raw string as you would provide it to the Docker CLI (e.g.,
type=docker
) - Registry
Export
Registry - Identical to the Image exporter, but pushes by default.
- Tar
Export
Tar - Export to a local directory as a tarball.
- cacheonly
Export
Cache Only - A no-op export. Helpful for silencing the 'no exports' warning if you just want to populate caches.
- disabled Boolean
- When
true
this entry will be excluded. Defaults tofalse
. - docker
Export
Docker - Export as a Docker image layout.
- image
Export
Image - Outputs the build result into a container image format.
- local
Export
Local - Export to a local directory as files and directories.
- oci
Export
OCI - Identical to the Docker exporter but uses OCI media types by default.
- raw String
- A raw string as you would provide it to the Docker CLI (e.g.,
type=docker
) - registry
Export
Registry - Identical to the Image exporter, but pushes by default.
- tar
Export
Tar - Export to a local directory as a tarball.
- cacheonly
Export
Cache Only - A no-op export. Helpful for silencing the 'no exports' warning if you just want to populate caches.
- disabled boolean
- When
true
this entry will be excluded. Defaults tofalse
. - docker
Export
Docker - Export as a Docker image layout.
- image
Export
Image - Outputs the build result into a container image format.
- local
Export
Local - Export to a local directory as files and directories.
- oci
Export
OCI - Identical to the Docker exporter but uses OCI media types by default.
- raw string
- A raw string as you would provide it to the Docker CLI (e.g.,
type=docker
) - registry
Export
Registry - Identical to the Image exporter, but pushes by default.
- tar
Export
Tar - Export to a local directory as a tarball.
- cacheonly
Export
Cache Only - A no-op export. Helpful for silencing the 'no exports' warning if you just want to populate caches.
- disabled bool
- When
true
this entry will be excluded. Defaults tofalse
. - docker
Export
Docker - Export as a Docker image layout.
- image
Export
Image - Outputs the build result into a container image format.
- local
Export
Local - Export to a local directory as files and directories.
- oci
Export
OCI - Identical to the Docker exporter but uses OCI media types by default.
- raw str
- A raw string as you would provide it to the Docker CLI (e.g.,
type=docker
) - registry
Export
Registry - Identical to the Image exporter, but pushes by default.
- tar
Export
Tar - Export to a local directory as a tarball.
- cacheonly Property Map
- A no-op export. Helpful for silencing the 'no exports' warning if you just want to populate caches.
- disabled Boolean
- When
true
this entry will be excluded. Defaults tofalse
. - docker Property Map
- Export as a Docker image layout.
- image Property Map
- Outputs the build result into a container image format.
- local Property Map
- Export to a local directory as files and directories.
- oci Property Map
- Identical to the Docker exporter but uses OCI media types by default.
- raw String
- A raw string as you would provide it to the Docker CLI (e.g.,
type=docker
) - registry Property Map
- Identical to the Image exporter, but pushes by default.
- tar Property Map
- Export to a local directory as a tarball.
ExportDocker, ExportDockerArgs
- Annotations Dictionary<string, string>
- Attach an arbitrary key/value annotation to the image.
- Compression
Pulumi.
Docker Build. Compression Type - The compression type to use.
- Compression
Level int - Compression level from 0 to 22.
- Dest string
- The local export path.
- Force
Compression bool - Forcefully apply compression.
- Names List<string>
- Specify images names to export. This is overridden if tags are already specified.
- Oci
Media boolTypes - Use OCI media types in exporter manifests.
- Tar bool
- Bundle the output into a tarball layout.
- Annotations map[string]string
- Attach an arbitrary key/value annotation to the image.
- Compression
Compression
Type - The compression type to use.
- Compression
Level int - Compression level from 0 to 22.
- Dest string
- The local export path.
- Force
Compression bool - Forcefully apply compression.
- Names []string
- Specify images names to export. This is overridden if tags are already specified.
- Oci
Media boolTypes - Use OCI media types in exporter manifests.
- Tar bool
- Bundle the output into a tarball layout.
- annotations Map<String,String>
- Attach an arbitrary key/value annotation to the image.
- compression
Compression
Type - The compression type to use.
- compression
Level Integer - Compression level from 0 to 22.
- dest String
- The local export path.
- force
Compression Boolean - Forcefully apply compression.
- names List<String>
- Specify images names to export. This is overridden if tags are already specified.
- oci
Media BooleanTypes - Use OCI media types in exporter manifests.
- tar Boolean
- Bundle the output into a tarball layout.
- annotations {[key: string]: string}
- Attach an arbitrary key/value annotation to the image.
- compression
Compression
Type - The compression type to use.
- compression
Level number - Compression level from 0 to 22.
- dest string
- The local export path.
- force
Compression boolean - Forcefully apply compression.
- names string[]
- Specify images names to export. This is overridden if tags are already specified.
- oci
Media booleanTypes - Use OCI media types in exporter manifests.
- tar boolean
- Bundle the output into a tarball layout.
- annotations Mapping[str, str]
- Attach an arbitrary key/value annotation to the image.
- compression
Compression
Type - The compression type to use.
- compression_
level int - Compression level from 0 to 22.
- dest str
- The local export path.
- force_
compression bool - Forcefully apply compression.
- names Sequence[str]
- Specify images names to export. This is overridden if tags are already specified.
- oci_
media_ booltypes - Use OCI media types in exporter manifests.
- tar bool
- Bundle the output into a tarball layout.
- annotations Map<String>
- Attach an arbitrary key/value annotation to the image.
- compression "gzip" | "estargz" | "zstd"
- The compression type to use.
- compression
Level Number - Compression level from 0 to 22.
- dest String
- The local export path.
- force
Compression Boolean - Forcefully apply compression.
- names List<String>
- Specify images names to export. This is overridden if tags are already specified.
- oci
Media BooleanTypes - Use OCI media types in exporter manifests.
- tar Boolean
- Bundle the output into a tarball layout.
ExportImage, ExportImageArgs
- Annotations Dictionary<string, string>
- Attach an arbitrary key/value annotation to the image.
- Compression
Pulumi.
Docker Build. Compression Type - The compression type to use.
- Compression
Level int - Compression level from 0 to 22.
- Dangling
Name stringPrefix - Name image with
prefix@<digest>
, used for anonymous images. - Force
Compression bool - Forcefully apply compression.
- Insecure bool
- Allow pushing to an insecure registry.
- Name
Canonical bool - Add additional canonical name (
name@<digest>
). - Names List<string>
- Specify images names to export. This is overridden if tags are already specified.
- Oci
Media boolTypes - Use OCI media types in exporter manifests.
- Push bool
- Push after creating the image. Defaults to
false
. - Push
By boolDigest - Push image without name.
- Store 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).
- Unpack bool
- Unpack image after creation (for use with containerd). Defaults to
false
.
- Annotations map[string]string
- Attach an arbitrary key/value annotation to the image.
- Compression
Compression
Type - The compression type to use.
- Compression
Level int - Compression level from 0 to 22.
- Dangling
Name stringPrefix - Name image with
prefix@<digest>
, used for anonymous images. - Force
Compression bool - Forcefully apply compression.
- Insecure bool
- Allow pushing to an insecure registry.
- Name
Canonical bool - Add additional canonical name (
name@<digest>
). - Names []string
- Specify images names to export. This is overridden if tags are already specified.
- Oci
Media boolTypes - Use OCI media types in exporter manifests.
- Push bool
- Push after creating the image. Defaults to
false
. - Push
By boolDigest - Push image without name.
- Store 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).
- Unpack bool
- Unpack image after creation (for use with containerd). Defaults to
false
.
- annotations Map<String,String>
- Attach an arbitrary key/value annotation to the image.
- compression
Compression
Type - The compression type to use.
- compression
Level Integer - Compression level from 0 to 22.
- dangling
Name StringPrefix - Name image with
prefix@<digest>
, used for anonymous images. - force
Compression Boolean - Forcefully apply compression.
- insecure Boolean
- Allow pushing to an insecure registry.
- name
Canonical Boolean - Add additional canonical name (
name@<digest>
). - names List<String>
- Specify images names to export. This is overridden if tags are already specified.
- oci
Media BooleanTypes - Use OCI media types in exporter manifests.
- push Boolean
- Push after creating the image. Defaults to
false
. - push
By BooleanDigest - Push image without name.
- store Boolean
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).
- unpack Boolean
- Unpack image after creation (for use with containerd). Defaults to
false
.
- annotations {[key: string]: string}
- Attach an arbitrary key/value annotation to the image.
- compression
Compression
Type - The compression type to use.
- compression
Level number - Compression level from 0 to 22.
- dangling
Name stringPrefix - Name image with
prefix@<digest>
, used for anonymous images. - force
Compression boolean - Forcefully apply compression.
- insecure boolean
- Allow pushing to an insecure registry.
- name
Canonical boolean - Add additional canonical name (
name@<digest>
). - names string[]
- Specify images names to export. This is overridden if tags are already specified.
- oci
Media booleanTypes - Use OCI media types in exporter manifests.
- push boolean
- Push after creating the image. Defaults to
false
. - push
By booleanDigest - Push image without name.
- store boolean
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).
- unpack boolean
- Unpack image after creation (for use with containerd). Defaults to
false
.
- annotations Mapping[str, str]
- Attach an arbitrary key/value annotation to the image.
- compression
Compression
Type - The compression type to use.
- compression_
level int - Compression level from 0 to 22.
- dangling_
name_ strprefix - Name image with
prefix@<digest>
, used for anonymous images. - force_
compression bool - Forcefully apply compression.
- insecure bool
- Allow pushing to an insecure registry.
- name_
canonical bool - Add additional canonical name (
name@<digest>
). - names Sequence[str]
- Specify images names to export. This is overridden if tags are already specified.
- oci_
media_ booltypes - Use OCI media types in exporter manifests.
- push bool
- Push after creating the image. Defaults to
false
. - push_
by_ booldigest - Push image without name.
- store 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).
- unpack bool
- Unpack image after creation (for use with containerd). Defaults to
false
.
- annotations Map<String>
- Attach an arbitrary key/value annotation to the image.
- compression "gzip" | "estargz" | "zstd"
- The compression type to use.
- compression
Level Number - Compression level from 0 to 22.
- dangling
Name StringPrefix - Name image with
prefix@<digest>
, used for anonymous images. - force
Compression Boolean - Forcefully apply compression.
- insecure Boolean
- Allow pushing to an insecure registry.
- name
Canonical Boolean - Add additional canonical name (
name@<digest>
). - names List<String>
- Specify images names to export. This is overridden if tags are already specified.
- oci
Media BooleanTypes - Use OCI media types in exporter manifests.
- push Boolean
- Push after creating the image. Defaults to
false
. - push
By BooleanDigest - Push image without name.
- store Boolean
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).
- unpack Boolean
- Unpack image after creation (for use with containerd). Defaults to
false
.
ExportLocal, ExportLocalArgs
- Dest string
- Output path.
- Dest string
- Output path.
- dest String
- Output path.
- dest string
- Output path.
- dest str
- Output path.
- dest String
- Output path.
ExportOCI, ExportOCIArgs
- Annotations Dictionary<string, string>
- Attach an arbitrary key/value annotation to the image.
- Compression
Pulumi.
Docker Build. Compression Type - The compression type to use.
- Compression
Level int - Compression level from 0 to 22.
- Dest string
- The local export path.
- Force
Compression bool - Forcefully apply compression.
- Names List<string>
- Specify images names to export. This is overridden if tags are already specified.
- Oci
Media boolTypes - Use OCI media types in exporter manifests.
- Tar bool
- Bundle the output into a tarball layout.
- Annotations map[string]string
- Attach an arbitrary key/value annotation to the image.
- Compression
Compression
Type - The compression type to use.
- Compression
Level int - Compression level from 0 to 22.
- Dest string
- The local export path.
- Force
Compression bool - Forcefully apply compression.
- Names []string
- Specify images names to export. This is overridden if tags are already specified.
- Oci
Media boolTypes - Use OCI media types in exporter manifests.
- Tar bool
- Bundle the output into a tarball layout.
- annotations Map<String,String>
- Attach an arbitrary key/value annotation to the image.
- compression
Compression
Type - The compression type to use.
- compression
Level Integer - Compression level from 0 to 22.
- dest String
- The local export path.
- force
Compression Boolean - Forcefully apply compression.
- names List<String>
- Specify images names to export. This is overridden if tags are already specified.
- oci
Media BooleanTypes - Use OCI media types in exporter manifests.
- tar Boolean
- Bundle the output into a tarball layout.
- annotations {[key: string]: string}
- Attach an arbitrary key/value annotation to the image.
- compression
Compression
Type - The compression type to use.
- compression
Level number - Compression level from 0 to 22.
- dest string
- The local export path.
- force
Compression boolean - Forcefully apply compression.
- names string[]
- Specify images names to export. This is overridden if tags are already specified.
- oci
Media booleanTypes - Use OCI media types in exporter manifests.
- tar boolean
- Bundle the output into a tarball layout.
- annotations Mapping[str, str]
- Attach an arbitrary key/value annotation to the image.
- compression
Compression
Type - The compression type to use.
- compression_
level int - Compression level from 0 to 22.
- dest str
- The local export path.
- force_
compression bool - Forcefully apply compression.
- names Sequence[str]
- Specify images names to export. This is overridden if tags are already specified.
- oci_
media_ booltypes - Use OCI media types in exporter manifests.
- tar bool
- Bundle the output into a tarball layout.
- annotations Map<String>
- Attach an arbitrary key/value annotation to the image.
- compression "gzip" | "estargz" | "zstd"
- The compression type to use.
- compression
Level Number - Compression level from 0 to 22.
- dest String
- The local export path.
- force
Compression Boolean - Forcefully apply compression.
- names List<String>
- Specify images names to export. This is overridden if tags are already specified.
- oci
Media BooleanTypes - Use OCI media types in exporter manifests.
- tar Boolean
- Bundle the output into a tarball layout.
ExportRegistry, ExportRegistryArgs
- Annotations Dictionary<string, string>
- Attach an arbitrary key/value annotation to the image.
- Compression
Pulumi.
Docker Build. Compression Type - The compression type to use.
- Compression
Level int - Compression level from 0 to 22.
- Dangling
Name stringPrefix - Name image with
prefix@<digest>
, used for anonymous images. - Force
Compression bool - Forcefully apply compression.
- Insecure bool
- Allow pushing to an insecure registry.
- Name
Canonical bool - Add additional canonical name (
name@<digest>
). - Names List<string>
- Specify images names to export. This is overridden if tags are already specified.
- Oci
Media boolTypes - Use OCI media types in exporter manifests.
- Push bool
- Push after creating the image. Defaults to
true
. - Push
By boolDigest - Push image without name.
- Store 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).
- Unpack bool
- Unpack image after creation (for use with containerd). Defaults to
false
.
- Annotations map[string]string
- Attach an arbitrary key/value annotation to the image.
- Compression
Compression
Type - The compression type to use.
- Compression
Level int - Compression level from 0 to 22.
- Dangling
Name stringPrefix - Name image with
prefix@<digest>
, used for anonymous images. - Force
Compression bool - Forcefully apply compression.
- Insecure bool
- Allow pushing to an insecure registry.
- Name
Canonical bool - Add additional canonical name (
name@<digest>
). - Names []string
- Specify images names to export. This is overridden if tags are already specified.
- Oci
Media boolTypes - Use OCI media types in exporter manifests.
- Push bool
- Push after creating the image. Defaults to
true
. - Push
By boolDigest - Push image without name.
- Store 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).
- Unpack bool
- Unpack image after creation (for use with containerd). Defaults to
false
.
- annotations Map<String,String>
- Attach an arbitrary key/value annotation to the image.
- compression
Compression
Type - The compression type to use.
- compression
Level Integer - Compression level from 0 to 22.
- dangling
Name StringPrefix - Name image with
prefix@<digest>
, used for anonymous images. - force
Compression Boolean - Forcefully apply compression.
- insecure Boolean
- Allow pushing to an insecure registry.
- name
Canonical Boolean - Add additional canonical name (
name@<digest>
). - names List<String>
- Specify images names to export. This is overridden if tags are already specified.
- oci
Media BooleanTypes - Use OCI media types in exporter manifests.
- push Boolean
- Push after creating the image. Defaults to
true
. - push
By BooleanDigest - Push image without name.
- store Boolean
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).
- unpack Boolean
- Unpack image after creation (for use with containerd). Defaults to
false
.
- annotations {[key: string]: string}
- Attach an arbitrary key/value annotation to the image.
- compression
Compression
Type - The compression type to use.
- compression
Level number - Compression level from 0 to 22.
- dangling
Name stringPrefix - Name image with
prefix@<digest>
, used for anonymous images. - force
Compression boolean - Forcefully apply compression.
- insecure boolean
- Allow pushing to an insecure registry.
- name
Canonical boolean - Add additional canonical name (
name@<digest>
). - names string[]
- Specify images names to export. This is overridden if tags are already specified.
- oci
Media booleanTypes - Use OCI media types in exporter manifests.
- push boolean
- Push after creating the image. Defaults to
true
. - push
By booleanDigest - Push image without name.
- store boolean
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).
- unpack boolean
- Unpack image after creation (for use with containerd). Defaults to
false
.
- annotations Mapping[str, str]
- Attach an arbitrary key/value annotation to the image.
- compression
Compression
Type - The compression type to use.
- compression_
level int - Compression level from 0 to 22.
- dangling_
name_ strprefix - Name image with
prefix@<digest>
, used for anonymous images. - force_
compression bool - Forcefully apply compression.
- insecure bool
- Allow pushing to an insecure registry.
- name_
canonical bool - Add additional canonical name (
name@<digest>
). - names Sequence[str]
- Specify images names to export. This is overridden if tags are already specified.
- oci_
media_ booltypes - Use OCI media types in exporter manifests.
- push bool
- Push after creating the image. Defaults to
true
. - push_
by_ booldigest - Push image without name.
- store 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).
- unpack bool
- Unpack image after creation (for use with containerd). Defaults to
false
.
- annotations Map<String>
- Attach an arbitrary key/value annotation to the image.
- compression "gzip" | "estargz" | "zstd"
- The compression type to use.
- compression
Level Number - Compression level from 0 to 22.
- dangling
Name StringPrefix - Name image with
prefix@<digest>
, used for anonymous images. - force
Compression Boolean - Forcefully apply compression.
- insecure Boolean
- Allow pushing to an insecure registry.
- name
Canonical Boolean - Add additional canonical name (
name@<digest>
). - names List<String>
- Specify images names to export. This is overridden if tags are already specified.
- oci
Media BooleanTypes - Use OCI media types in exporter manifests.
- push Boolean
- Push after creating the image. Defaults to
true
. - push
By BooleanDigest - Push image without name.
- store Boolean
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).
- unpack Boolean
- Unpack image after creation (for use with containerd). Defaults to
false
.
ExportTar, ExportTarArgs
- Dest string
- Output path.
- Dest string
- Output path.
- dest String
- Output path.
- dest string
- Output path.
- dest str
- Output path.
- dest String
- Output path.
NetworkMode, NetworkModeArgs
- @Default
- defaultThe default sandbox network mode.
- Host
- hostHost network mode.
- None
- noneDisable network access.
- Network
Mode Default - defaultThe default sandbox network mode.
- Network
Mode Host - hostHost network mode.
- Network
Mode None - noneDisable network access.
- Default_
- defaultThe default sandbox network mode.
- Host
- hostHost network mode.
- None
- noneDisable network access.
- Default
- defaultThe default sandbox network mode.
- Host
- hostHost network mode.
- None
- noneDisable network access.
- DEFAULT
- defaultThe default sandbox network mode.
- HOST
- hostHost network mode.
- NONE
- noneDisable network access.
- "default"
- defaultThe default sandbox network mode.
- "host"
- hostHost network mode.
- "none"
- noneDisable network access.
Platform, PlatformArgs
- Darwin_386
- darwin/386
- Darwin_
amd64 - darwin/amd64
- Darwin_
arm - darwin/arm
- Darwin_
arm64 - darwin/arm64
- Dragonfly_
amd64 - dragonfly/amd64
- Freebsd_386
- freebsd/386
- Freebsd_
amd64 - freebsd/amd64
- Freebsd_
arm - freebsd/arm
- Linux_386
- linux/386
- Linux_
amd64 - linux/amd64
- Linux_
arm - linux/arm
- Linux_
arm64 - linux/arm64
- Linux_
mips64 - linux/mips64
- Linux_
mips64le - linux/mips64le
- Linux_
ppc64le - linux/ppc64le
- Linux_
riscv64 - linux/riscv64
- Linux_
s390x - linux/s390x
- Netbsd_386
- netbsd/386
- Netbsd_
amd64 - netbsd/amd64
- Netbsd_
arm - netbsd/arm
- Openbsd_386
- openbsd/386
- Openbsd_
amd64 - openbsd/amd64
- Openbsd_
arm - openbsd/arm
- Plan9_386
- plan9/386
- Plan9_
amd64 - plan9/amd64
- Solaris_
amd64 - solaris/amd64
- Windows_386
- windows/386
- Windows_
amd64 - windows/amd64
- Platform_Darwin_386
- darwin/386
- Platform_Darwin_
amd64 - darwin/amd64
- Platform_Darwin_
arm - darwin/arm
- Platform_Darwin_
arm64 - darwin/arm64
- Platform_Dragonfly_
amd64 - dragonfly/amd64
- Platform_Freebsd_386
- freebsd/386
- Platform_Freebsd_
amd64 - freebsd/amd64
- Platform_Freebsd_
arm - freebsd/arm
- Platform_Linux_386
- linux/386
- Platform_Linux_
amd64 - linux/amd64
- Platform_Linux_
arm - linux/arm
- Platform_Linux_
arm64 - linux/arm64
- Platform_Linux_
mips64 - linux/mips64
- Platform_Linux_
mips64le - linux/mips64le
- Platform_Linux_
ppc64le - linux/ppc64le
- Platform_Linux_
riscv64 - linux/riscv64
- Platform_Linux_
s390x - linux/s390x
- Platform_Netbsd_386
- netbsd/386
- Platform_Netbsd_
amd64 - netbsd/amd64
- Platform_Netbsd_
arm - netbsd/arm
- Platform_Openbsd_386
- openbsd/386
- Platform_Openbsd_
amd64 - openbsd/amd64
- Platform_Openbsd_
arm - openbsd/arm
- Platform_Plan9_386
- plan9/386
- Platform_Plan9_
amd64 - plan9/amd64
- Platform_Solaris_
amd64 - solaris/amd64
- Platform_Windows_386
- windows/386
- Platform_Windows_
amd64 - windows/amd64
- Darwin_386
- darwin/386
- Darwin_
amd64 - darwin/amd64
- Darwin_
arm - darwin/arm
- Darwin_
arm64 - darwin/arm64
- Dragonfly_
amd64 - dragonfly/amd64
- Freebsd_386
- freebsd/386
- Freebsd_
amd64 - freebsd/amd64
- Freebsd_
arm - freebsd/arm
- Linux_386
- linux/386
- Linux_
amd64 - linux/amd64
- Linux_
arm - linux/arm
- Linux_
arm64 - linux/arm64
- Linux_
mips64 - linux/mips64
- Linux_
mips64le - linux/mips64le
- Linux_
ppc64le - linux/ppc64le
- Linux_
riscv64 - linux/riscv64
- Linux_
s390x - linux/s390x
- Netbsd_386
- netbsd/386
- Netbsd_
amd64 - netbsd/amd64
- Netbsd_
arm - netbsd/arm
- Openbsd_386
- openbsd/386
- Openbsd_
amd64 - openbsd/amd64
- Openbsd_
arm - openbsd/arm
- Plan9_386
- plan9/386
- Plan9_
amd64 - plan9/amd64
- Solaris_
amd64 - solaris/amd64
- Windows_386
- windows/386
- Windows_
amd64 - windows/amd64
- Darwin_386
- darwin/386
- Darwin_
amd64 - darwin/amd64
- Darwin_
arm - darwin/arm
- Darwin_
arm64 - darwin/arm64
- Dragonfly_
amd64 - dragonfly/amd64
- Freebsd_386
- freebsd/386
- Freebsd_
amd64 - freebsd/amd64
- Freebsd_
arm - freebsd/arm
- Linux_386
- linux/386
- Linux_
amd64 - linux/amd64
- Linux_
arm - linux/arm
- Linux_
arm64 - linux/arm64
- Linux_
mips64 - linux/mips64
- Linux_
mips64le - linux/mips64le
- Linux_
ppc64le - linux/ppc64le
- Linux_
riscv64 - linux/riscv64
- Linux_
s390x - linux/s390x
- Netbsd_386
- netbsd/386
- Netbsd_
amd64 - netbsd/amd64
- Netbsd_
arm - netbsd/arm
- Openbsd_386
- openbsd/386
- Openbsd_
amd64 - openbsd/amd64
- Openbsd_
arm - openbsd/arm
- Plan9_386
- plan9/386
- Plan9_
amd64 - plan9/amd64
- Solaris_
amd64 - solaris/amd64
- Windows_386
- windows/386
- Windows_
amd64 - windows/amd64
- DARWIN_386
- darwin/386
- DARWIN_AMD64
- darwin/amd64
- DARWIN_ARM
- darwin/arm
- DARWIN_ARM64
- darwin/arm64
- DRAGONFLY_AMD64
- dragonfly/amd64
- FREEBSD_386
- freebsd/386
- FREEBSD_AMD64
- freebsd/amd64
- FREEBSD_ARM
- freebsd/arm
- LINUX_386
- linux/386
- LINUX_AMD64
- linux/amd64
- LINUX_ARM
- linux/arm
- LINUX_ARM64
- linux/arm64
- LINUX_MIPS64
- linux/mips64
- LINUX_MIPS64LE
- linux/mips64le
- LINUX_PPC64LE
- linux/ppc64le
- LINUX_RISCV64
- linux/riscv64
- LINUX_S390X
- linux/s390x
- NETBSD_386
- netbsd/386
- NETBSD_AMD64
- netbsd/amd64
- NETBSD_ARM
- netbsd/arm
- OPENBSD_386
- openbsd/386
- OPENBSD_AMD64
- openbsd/amd64
- OPENBSD_ARM
- openbsd/arm
- PLAN9_386
- plan9/386
- PLAN9_AMD64
- plan9/amd64
- SOLARIS_AMD64
- solaris/amd64
- WINDOWS_386
- windows/386
- WINDOWS_AMD64
- windows/amd64
- "darwin/386"
- darwin/386
- "darwin/amd64"
- darwin/amd64
- "darwin/arm"
- darwin/arm
- "darwin/arm64"
- darwin/arm64
- "dragonfly/amd64"
- dragonfly/amd64
- "freebsd/386"
- freebsd/386
- "freebsd/amd64"
- freebsd/amd64
- "freebsd/arm"
- freebsd/arm
- "linux/386"
- linux/386
- "linux/amd64"
- linux/amd64
- "linux/arm"
- linux/arm
- "linux/arm64"
- linux/arm64
- "linux/mips64"
- linux/mips64
- "linux/mips64le"
- linux/mips64le
- "linux/ppc64le"
- linux/ppc64le
- "linux/riscv64"
- linux/riscv64
- "linux/s390x"
- linux/s390x
- "netbsd/386"
- netbsd/386
- "netbsd/amd64"
- netbsd/amd64
- "netbsd/arm"
- netbsd/arm
- "openbsd/386"
- openbsd/386
- "openbsd/amd64"
- openbsd/amd64
- "openbsd/arm"
- openbsd/arm
- "plan9/386"
- plan9/386
- "plan9/amd64"
- plan9/amd64
- "solaris/amd64"
- solaris/amd64
- "windows/386"
- windows/386
- "windows/amd64"
- windows/amd64
Registry, RegistryArgs
SSH, SSHArgs
- Id 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.- Paths List<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.
- Id 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.- Paths []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.
- id 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.- paths List<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.
- id 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.- paths 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.
- id str
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.- paths Sequence[str]
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.
- id 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.- paths List<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.
Package Details
- Repository
- docker-build pulumi/pulumi-docker-build
- License
- Apache-2.0