Rename to docker-build

This commit is contained in:
Bryce Lampe
2024-04-15 14:51:07 -07:00
parent 4cd6d49ba9
commit 12bf5dd689
139 changed files with 638 additions and 645 deletions

View File

@@ -1,32 +1,32 @@
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Dockerbuild = Pulumi.Dockerbuild;
using DockerBuild = Pulumi.DockerBuild;
return await Deployment.RunAsync(() =>
{
var config = new Config();
var dockerHubPassword = config.Require("dockerHubPassword");
var multiPlatform = new Dockerbuild.Image("multiPlatform", new()
var multiPlatform = new DockerBuild.Image("multiPlatform", new()
{
Dockerfile = new Dockerbuild.Inputs.DockerfileArgs
Dockerfile = new DockerBuild.Inputs.DockerfileArgs
{
Location = "./app/Dockerfile.multiPlatform",
},
Context = new Dockerbuild.Inputs.BuildContextArgs
Context = new DockerBuild.Inputs.BuildContextArgs
{
Location = "./app",
},
Platforms = new[]
{
Dockerbuild.Platform.Plan9_amd64,
Dockerbuild.Platform.Plan9_386,
DockerBuild.Platform.Plan9_amd64,
DockerBuild.Platform.Plan9_386,
},
});
var registryPush = new Dockerbuild.Image("registryPush", new()
var registryPush = new DockerBuild.Image("registryPush", new()
{
Context = new Dockerbuild.Inputs.BuildContextArgs
Context = new DockerBuild.Inputs.BuildContextArgs
{
Location = "./app",
},
@@ -36,9 +36,9 @@ return await Deployment.RunAsync(() =>
},
Exports = new[]
{
new Dockerbuild.Inputs.ExportArgs
new DockerBuild.Inputs.ExportArgs
{
Registry = new Dockerbuild.Inputs.ExportRegistryArgs
Registry = new DockerBuild.Inputs.ExportRegistryArgs
{
OciMediaTypes = true,
Push = false,
@@ -47,7 +47,7 @@ return await Deployment.RunAsync(() =>
},
Registries = new[]
{
new Dockerbuild.Inputs.RegistryArgs
new DockerBuild.Inputs.RegistryArgs
{
Address = "docker.io",
Username = "pulumibot",
@@ -56,28 +56,28 @@ return await Deployment.RunAsync(() =>
},
});
var cached = new Dockerbuild.Image("cached", new()
var cached = new DockerBuild.Image("cached", new()
{
Context = new Dockerbuild.Inputs.BuildContextArgs
Context = new DockerBuild.Inputs.BuildContextArgs
{
Location = "./app",
},
CacheTo = new[]
{
new Dockerbuild.Inputs.CacheToArgs
new DockerBuild.Inputs.CacheToArgs
{
Local = new Dockerbuild.Inputs.CacheToLocalArgs
Local = new DockerBuild.Inputs.CacheToLocalArgs
{
Dest = "tmp/cache",
Mode = Dockerbuild.CacheMode.Max,
Mode = DockerBuild.CacheMode.Max,
},
},
},
CacheFrom = new[]
{
new Dockerbuild.Inputs.CacheFromArgs
new DockerBuild.Inputs.CacheFromArgs
{
Local = new Dockerbuild.Inputs.CacheFromLocalArgs
Local = new DockerBuild.Inputs.CacheFromLocalArgs
{
Src = "tmp/cache",
},
@@ -85,13 +85,13 @@ return await Deployment.RunAsync(() =>
},
});
var buildArgs = new Dockerbuild.Image("buildArgs", new()
var buildArgs = new DockerBuild.Image("buildArgs", new()
{
Dockerfile = new Dockerbuild.Inputs.DockerfileArgs
Dockerfile = new DockerBuild.Inputs.DockerfileArgs
{
Location = "./app/Dockerfile.buildArgs",
},
Context = new Dockerbuild.Inputs.BuildContextArgs
Context = new DockerBuild.Inputs.BuildContextArgs
{
Location = "./app",
},
@@ -101,13 +101,13 @@ return await Deployment.RunAsync(() =>
},
});
var extraHosts = new Dockerbuild.Image("extraHosts", new()
var extraHosts = new DockerBuild.Image("extraHosts", new()
{
Dockerfile = new Dockerbuild.Inputs.DockerfileArgs
Dockerfile = new DockerBuild.Inputs.DockerfileArgs
{
Location = "./app/Dockerfile.extraHosts",
},
Context = new Dockerbuild.Inputs.BuildContextArgs
Context = new DockerBuild.Inputs.BuildContextArgs
{
Location = "./app",
},
@@ -117,32 +117,32 @@ return await Deployment.RunAsync(() =>
},
});
var sshMount = new Dockerbuild.Image("sshMount", new()
var sshMount = new DockerBuild.Image("sshMount", new()
{
Dockerfile = new Dockerbuild.Inputs.DockerfileArgs
Dockerfile = new DockerBuild.Inputs.DockerfileArgs
{
Location = "./app/Dockerfile.sshMount",
},
Context = new Dockerbuild.Inputs.BuildContextArgs
Context = new DockerBuild.Inputs.BuildContextArgs
{
Location = "./app",
},
Ssh = new[]
{
new Dockerbuild.Inputs.SSHArgs
new DockerBuild.Inputs.SSHArgs
{
Id = "default",
},
},
});
var secrets = new Dockerbuild.Image("secrets", new()
var secrets = new DockerBuild.Image("secrets", new()
{
Dockerfile = new Dockerbuild.Inputs.DockerfileArgs
Dockerfile = new DockerBuild.Inputs.DockerfileArgs
{
Location = "./app/Dockerfile.secrets",
},
Context = new Dockerbuild.Inputs.BuildContextArgs
Context = new DockerBuild.Inputs.BuildContextArgs
{
Location = "./app",
},
@@ -152,9 +152,9 @@ return await Deployment.RunAsync(() =>
},
});
var labels = new Dockerbuild.Image("labels", new()
var labels = new DockerBuild.Image("labels", new()
{
Context = new Dockerbuild.Inputs.BuildContextArgs
Context = new DockerBuild.Inputs.BuildContextArgs
{
Location = "./app",
},
@@ -164,31 +164,31 @@ return await Deployment.RunAsync(() =>
},
});
var target = new Dockerbuild.Image("target", new()
var target = new DockerBuild.Image("target", new()
{
Dockerfile = new Dockerbuild.Inputs.DockerfileArgs
Dockerfile = new DockerBuild.Inputs.DockerfileArgs
{
Location = "./app/Dockerfile.target",
},
Context = new Dockerbuild.Inputs.BuildContextArgs
Context = new DockerBuild.Inputs.BuildContextArgs
{
Location = "./app",
},
Target = "build-me",
});
var namedContexts = new Dockerbuild.Image("namedContexts", new()
var namedContexts = new DockerBuild.Image("namedContexts", new()
{
Dockerfile = new Dockerbuild.Inputs.DockerfileArgs
Dockerfile = new DockerBuild.Inputs.DockerfileArgs
{
Location = "./app/Dockerfile.namedContexts",
},
Context = new Dockerbuild.Inputs.BuildContextArgs
Context = new DockerBuild.Inputs.BuildContextArgs
{
Location = "./app",
Named =
{
{ "golang:latest", new Dockerbuild.Inputs.ContextArgs
{ "golang:latest", new DockerBuild.Inputs.ContextArgs
{
Location = "docker-image://golang@sha256:b8e62cf593cdaff36efd90aa3a37de268e6781a2e68c6610940c48f7cdf36984",
} },
@@ -196,53 +196,53 @@ return await Deployment.RunAsync(() =>
},
});
var remoteContext = new Dockerbuild.Image("remoteContext", new()
var remoteContext = new DockerBuild.Image("remoteContext", new()
{
Context = new Dockerbuild.Inputs.BuildContextArgs
Context = new DockerBuild.Inputs.BuildContextArgs
{
Location = "https://raw.githubusercontent.com/pulumi/pulumi-docker/api-types/provider/testdata/Dockerfile",
},
});
var remoteContextWithInline = new Dockerbuild.Image("remoteContextWithInline", new()
var remoteContextWithInline = new DockerBuild.Image("remoteContextWithInline", new()
{
Dockerfile = new Dockerbuild.Inputs.DockerfileArgs
Dockerfile = new DockerBuild.Inputs.DockerfileArgs
{
Inline = @"FROM busybox
COPY hello.c ./
",
},
Context = new Dockerbuild.Inputs.BuildContextArgs
Context = new DockerBuild.Inputs.BuildContextArgs
{
Location = "https://github.com/docker-library/hello-world.git",
},
});
var inline = new Dockerbuild.Image("inline", new()
var inline = new DockerBuild.Image("inline", new()
{
Dockerfile = new Dockerbuild.Inputs.DockerfileArgs
Dockerfile = new DockerBuild.Inputs.DockerfileArgs
{
Inline = @"FROM alpine
RUN echo ""This uses an inline Dockerfile! 👍""
",
},
Context = new Dockerbuild.Inputs.BuildContextArgs
Context = new DockerBuild.Inputs.BuildContextArgs
{
Location = "./app",
},
});
var dockerLoad = new Dockerbuild.Image("dockerLoad", new()
var dockerLoad = new DockerBuild.Image("dockerLoad", new()
{
Context = new Dockerbuild.Inputs.BuildContextArgs
Context = new DockerBuild.Inputs.BuildContextArgs
{
Location = "./app",
},
Exports = new[]
{
new Dockerbuild.Inputs.ExportArgs
new DockerBuild.Inputs.ExportArgs
{
Docker = new Dockerbuild.Inputs.ExportDockerArgs
Docker = new DockerBuild.Inputs.ExportDockerArgs
{
Tar = true,
},

View File

@@ -1,4 +1,4 @@
name: provider-dockerbuild
name: provider-docker-build
runtime: dotnet
config:
dockerHubPassword:
@@ -6,5 +6,5 @@ config:
secret: true
plugins:
providers:
- name: dockerbuild
- name: docker-build
path: ../../bin

View File

@@ -8,7 +8,7 @@
<ItemGroup>
<PackageReference Include="Pulumi" Version="3.*" />
<PackageReference Include="Pulumi.Dockerbuild" Version="*" />
<PackageReference Include="Pulumi.DockerBuild" Version="0.0.2-alpha.1712594380+4cd6d49b.dirty" />
</ItemGroup>
</Project>
</Project>

View File

@@ -27,7 +27,7 @@ func TestDotNetExample(t *testing.T) {
test := integration.ProgramTestOptions{
Dir: path.Join(cwd, "dotnet"),
Dependencies: []string{
"Pulumi.Dockerbuild",
"Pulumi.DockerBuild",
},
Secrets: map[string]string{
"dockerHubPassword": os.Getenv("DOCKER_HUB_PASSWORD"),

View File

@@ -1,4 +1,4 @@
name: provider-dockerbuild
name: provider-docker-build
runtime: go
config:
dockerHubPassword:
@@ -6,5 +6,5 @@ config:
secret: true
plugins:
providers:
- name: dockerbuild
- name: docker-build
path: ../../bin

View File

@@ -1,4 +1,4 @@
module provider-dockerbuild
module provider-docker-build
go 1.20

View File

@@ -1,7 +1,7 @@
package main
import (
"github.com/pulumi/pulumi-dockerbuild/sdk/go/dockerbuild"
"github.com/pulumi/pulumi-docker-build/sdk/go/dockerbuild"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
)

View File

@@ -19,7 +19,7 @@ func TestGoExample(t *testing.T) {
test := integration.ProgramTestOptions{
Dir: path.Join(cwd, "go"),
Dependencies: []string{
"github.com/pulumi/pulumi-dockerbuild/sdk/go/dockerbuild=../sdk/go/dockerbuild",
"github.com/pulumi/pulumi-docker-build/sdk/go/dockerbuild=../sdk/go/dockerbuild",
},
Secrets: map[string]string{
"dockerHubPassword": os.Getenv("DOCKER_HUB_PASSWORD"),

View File

@@ -1,4 +1,4 @@
name: provider-dockerbuild
name: provider-docker-build
runtime: java
config:
dockerHubPassword:
@@ -6,5 +6,5 @@ config:
secret: true
plugins:
providers:
- name: dockerbuild
- name: docker-build
path: ../../bin

View File

@@ -5,7 +5,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.pulumi</groupId>
<artifactId>provider-dockerbuild</artifactId>
<artifactId>provider-docker-build</artifactId>
<version>1.0-SNAPSHOT</version>
<properties>
@@ -25,7 +25,7 @@
</dependency>
<dependency>
<groupId>com.pulumi</groupId>
<artifactId>dockerbuild</artifactId>
<artifactId>docker-build</artifactId>
<version>[0.0.0,)</version>
</dependency>
</dependencies>

View File

@@ -1,4 +1,4 @@
name: provider-dockerbuild
name: provider-docker-build
runtime: nodejs
config:
dockerHubPassword:
@@ -6,5 +6,5 @@ config:
secret: true
plugins:
providers:
- name: dockerbuild
- name: docker-build
path: ../../bin

View File

@@ -1,9 +1,9 @@
import * as pulumi from "@pulumi/pulumi";
import * as dockerbuild from "@pulumi/dockerbuild";
import * as docker_build from "@pulumi/docker-build";
const config = new pulumi.Config();
const dockerHubPassword = config.require("dockerHubPassword");
const multiPlatform = new dockerbuild.Image("multiPlatform", {
const multiPlatform = new docker_build.Image("multiPlatform", {
dockerfile: {
location: "./app/Dockerfile.multiPlatform",
},
@@ -11,11 +11,11 @@ const multiPlatform = new dockerbuild.Image("multiPlatform", {
location: "./app",
},
platforms: [
dockerbuild.Platform.Plan9_amd64,
dockerbuild.Platform.Plan9_386,
docker_build.Platform.Plan9_amd64,
docker_build.Platform.Plan9_386,
],
});
const registryPush = new dockerbuild.Image("registryPush", {
const registryPush = new docker_build.Image("registryPush", {
context: {
location: "./app",
},
@@ -32,14 +32,14 @@ const registryPush = new dockerbuild.Image("registryPush", {
password: dockerHubPassword,
}],
});
const cached = new dockerbuild.Image("cached", {
const cached = new docker_build.Image("cached", {
context: {
location: "./app",
},
cacheTo: [{
local: {
dest: "tmp/cache",
mode: dockerbuild.CacheMode.Max,
mode: docker_build.CacheMode.Max,
},
}],
cacheFrom: [{
@@ -48,7 +48,7 @@ const cached = new dockerbuild.Image("cached", {
},
}],
});
const buildArgs = new dockerbuild.Image("buildArgs", {
const buildArgs = new docker_build.Image("buildArgs", {
dockerfile: {
location: "./app/Dockerfile.buildArgs",
},
@@ -59,7 +59,7 @@ const buildArgs = new dockerbuild.Image("buildArgs", {
SET_ME_TO_TRUE: "true",
},
});
const extraHosts = new dockerbuild.Image("extraHosts", {
const extraHosts = new docker_build.Image("extraHosts", {
dockerfile: {
location: "./app/Dockerfile.extraHosts",
},
@@ -68,7 +68,7 @@ const extraHosts = new dockerbuild.Image("extraHosts", {
},
addHosts: ["metadata.google.internal:169.254.169.254"],
});
const sshMount = new dockerbuild.Image("sshMount", {
const sshMount = new docker_build.Image("sshMount", {
dockerfile: {
location: "./app/Dockerfile.sshMount",
},
@@ -79,7 +79,7 @@ const sshMount = new dockerbuild.Image("sshMount", {
id: "default",
}],
});
const secrets = new dockerbuild.Image("secrets", {
const secrets = new docker_build.Image("secrets", {
dockerfile: {
location: "./app/Dockerfile.secrets",
},
@@ -90,7 +90,7 @@ const secrets = new dockerbuild.Image("secrets", {
password: "hunter2",
},
});
const labels = new dockerbuild.Image("labels", {
const labels = new docker_build.Image("labels", {
context: {
location: "./app",
},
@@ -98,7 +98,7 @@ const labels = new dockerbuild.Image("labels", {
description: "This image will get a descriptive label 👍",
},
});
const target = new dockerbuild.Image("target", {
const target = new docker_build.Image("target", {
dockerfile: {
location: "./app/Dockerfile.target",
},
@@ -107,7 +107,7 @@ const target = new dockerbuild.Image("target", {
},
target: "build-me",
});
const namedContexts = new dockerbuild.Image("namedContexts", {
const namedContexts = new docker_build.Image("namedContexts", {
dockerfile: {
location: "./app/Dockerfile.namedContexts",
},
@@ -120,10 +120,10 @@ const namedContexts = new dockerbuild.Image("namedContexts", {
},
},
});
const remoteContext = new dockerbuild.Image("remoteContext", {context: {
const remoteContext = new docker_build.Image("remoteContext", {context: {
location: "https://raw.githubusercontent.com/pulumi/pulumi-docker/api-types/provider/testdata/Dockerfile",
}});
const remoteContextWithInline = new dockerbuild.Image("remoteContextWithInline", {
const remoteContextWithInline = new docker_build.Image("remoteContextWithInline", {
dockerfile: {
inline: `FROM busybox
COPY hello.c ./
@@ -133,7 +133,7 @@ COPY hello.c ./
location: "https://github.com/docker-library/hello-world.git",
},
});
const inline = new dockerbuild.Image("inline", {
const inline = new docker_build.Image("inline", {
dockerfile: {
inline: `FROM alpine
RUN echo "This uses an inline Dockerfile! 👍"
@@ -143,7 +143,7 @@ RUN echo "This uses an inline Dockerfile! 👍"
location: "./app",
},
});
const dockerLoad = new dockerbuild.Image("dockerLoad", {
const dockerLoad = new docker_build.Image("dockerLoad", {
context: {
location: "./app",
},

View File

@@ -1,5 +1,5 @@
{
"name": "provider-dockerbuild",
"name": "provider-docker-build",
"devDependencies": {
"@types/node": "^18"
},
@@ -8,4 +8,3 @@
"@pulumi/pulumi": "^3.0.0"
}
}

View File

@@ -18,7 +18,7 @@ func TestNodeExample(t *testing.T) {
test := integration.ProgramTestOptions{
Dir: path.Join(cwd, "nodejs"),
Dependencies: []string{"@pulumi/dockerbuild"},
Dependencies: []string{"@pulumi/docker-build"},
Secrets: map[string]string{
"dockerHubPassword": os.Getenv("DOCKER_HUB_PASSWORD"),
},

View File

@@ -1,4 +1,4 @@
name: provider-dockerbuild
name: provider-docker-build
runtime: python
config:
dockerHubPassword:
@@ -6,5 +6,5 @@ config:
secret: true
plugins:
providers:
- name: dockerbuild
- name: docker-build
path: ../../bin

View File

@@ -1,142 +1,142 @@
import pulumi
import pulumi_dockerbuild as dockerbuild
import pulumi_docker_build as docker_build
config = pulumi.Config()
docker_hub_password = config.require("dockerHubPassword")
multi_platform = dockerbuild.Image("multiPlatform",
dockerfile=dockerbuild.DockerfileArgs(
multi_platform = docker_build.Image("multiPlatform",
dockerfile=docker_build.DockerfileArgs(
location="./app/Dockerfile.multiPlatform",
),
context=dockerbuild.BuildContextArgs(
context=docker_build.BuildContextArgs(
location="./app",
),
platforms=[
dockerbuild.Platform.PLAN9_AMD64,
dockerbuild.Platform.PLAN9_386,
docker_build.Platform.PLAN9_AMD64,
docker_build.Platform.PLAN9_386,
])
registry_push = dockerbuild.Image("registryPush",
context=dockerbuild.BuildContextArgs(
registry_push = docker_build.Image("registryPush",
context=docker_build.BuildContextArgs(
location="./app",
),
tags=["docker.io/pulumibot/buildkit-e2e:example"],
exports=[dockerbuild.ExportArgs(
registry=dockerbuild.ExportRegistryArgs(
exports=[docker_build.ExportArgs(
registry=docker_build.ExportRegistryArgs(
oci_media_types=True,
push=False,
),
)],
registries=[dockerbuild.RegistryArgs(
registries=[docker_build.RegistryArgs(
address="docker.io",
username="pulumibot",
password=docker_hub_password,
)])
cached = dockerbuild.Image("cached",
context=dockerbuild.BuildContextArgs(
cached = docker_build.Image("cached",
context=docker_build.BuildContextArgs(
location="./app",
),
cache_to=[dockerbuild.CacheToArgs(
local=dockerbuild.CacheToLocalArgs(
cache_to=[docker_build.CacheToArgs(
local=docker_build.CacheToLocalArgs(
dest="tmp/cache",
mode=dockerbuild.CacheMode.MAX,
mode=docker_build.CacheMode.MAX,
),
)],
cache_from=[dockerbuild.CacheFromArgs(
local=dockerbuild.CacheFromLocalArgs(
cache_from=[docker_build.CacheFromArgs(
local=docker_build.CacheFromLocalArgs(
src="tmp/cache",
),
)])
build_args = dockerbuild.Image("buildArgs",
dockerfile=dockerbuild.DockerfileArgs(
build_args = docker_build.Image("buildArgs",
dockerfile=docker_build.DockerfileArgs(
location="./app/Dockerfile.buildArgs",
),
context=dockerbuild.BuildContextArgs(
context=docker_build.BuildContextArgs(
location="./app",
),
build_args={
"SET_ME_TO_TRUE": "true",
})
extra_hosts = dockerbuild.Image("extraHosts",
dockerfile=dockerbuild.DockerfileArgs(
extra_hosts = docker_build.Image("extraHosts",
dockerfile=docker_build.DockerfileArgs(
location="./app/Dockerfile.extraHosts",
),
context=dockerbuild.BuildContextArgs(
context=docker_build.BuildContextArgs(
location="./app",
),
add_hosts=["metadata.google.internal:169.254.169.254"])
ssh_mount = dockerbuild.Image("sshMount",
dockerfile=dockerbuild.DockerfileArgs(
ssh_mount = docker_build.Image("sshMount",
dockerfile=docker_build.DockerfileArgs(
location="./app/Dockerfile.sshMount",
),
context=dockerbuild.BuildContextArgs(
context=docker_build.BuildContextArgs(
location="./app",
),
ssh=[dockerbuild.SSHArgs(
ssh=[docker_build.SSHArgs(
id="default",
)])
secrets = dockerbuild.Image("secrets",
dockerfile=dockerbuild.DockerfileArgs(
secrets = docker_build.Image("secrets",
dockerfile=docker_build.DockerfileArgs(
location="./app/Dockerfile.secrets",
),
context=dockerbuild.BuildContextArgs(
context=docker_build.BuildContextArgs(
location="./app",
),
secrets={
"password": "hunter2",
})
labels = dockerbuild.Image("labels",
context=dockerbuild.BuildContextArgs(
labels = docker_build.Image("labels",
context=docker_build.BuildContextArgs(
location="./app",
),
labels={
"description": "This image will get a descriptive label 👍",
})
target = dockerbuild.Image("target",
dockerfile=dockerbuild.DockerfileArgs(
target = docker_build.Image("target",
dockerfile=docker_build.DockerfileArgs(
location="./app/Dockerfile.target",
),
context=dockerbuild.BuildContextArgs(
context=docker_build.BuildContextArgs(
location="./app",
),
target="build-me")
named_contexts = dockerbuild.Image("namedContexts",
dockerfile=dockerbuild.DockerfileArgs(
named_contexts = docker_build.Image("namedContexts",
dockerfile=docker_build.DockerfileArgs(
location="./app/Dockerfile.namedContexts",
),
context=dockerbuild.BuildContextArgs(
context=docker_build.BuildContextArgs(
location="./app",
named={
"golang:latest": dockerbuild.ContextArgs(
"golang:latest": docker_build.ContextArgs(
location="docker-image://golang@sha256:b8e62cf593cdaff36efd90aa3a37de268e6781a2e68c6610940c48f7cdf36984",
),
},
))
remote_context = dockerbuild.Image("remoteContext", context=dockerbuild.BuildContextArgs(
remote_context = docker_build.Image("remoteContext", context=docker_build.BuildContextArgs(
location="https://raw.githubusercontent.com/pulumi/pulumi-docker/api-types/provider/testdata/Dockerfile",
))
remote_context_with_inline = dockerbuild.Image("remoteContextWithInline",
dockerfile=dockerbuild.DockerfileArgs(
remote_context_with_inline = docker_build.Image("remoteContextWithInline",
dockerfile=docker_build.DockerfileArgs(
inline="""FROM busybox
COPY hello.c ./
""",
),
context=dockerbuild.BuildContextArgs(
context=docker_build.BuildContextArgs(
location="https://github.com/docker-library/hello-world.git",
))
inline = dockerbuild.Image("inline",
dockerfile=dockerbuild.DockerfileArgs(
inline = docker_build.Image("inline",
dockerfile=docker_build.DockerfileArgs(
inline="""FROM alpine
RUN echo "This uses an inline Dockerfile! 👍"
""",
),
context=dockerbuild.BuildContextArgs(
context=docker_build.BuildContextArgs(
location="./app",
))
docker_load = dockerbuild.Image("dockerLoad",
context=dockerbuild.BuildContextArgs(
docker_load = docker_build.Image("dockerLoad",
context=docker_build.BuildContextArgs(
location="./app",
),
exports=[dockerbuild.ExportArgs(
docker=dockerbuild.ExportDockerArgs(
exports=[docker_build.ExportArgs(
docker=docker_build.ExportDockerArgs(
tar=True,
),
)])

View File

@@ -1,14 +1,14 @@
name: provider-dockerbuild
name: provider-docker-build
runtime: yaml
plugins:
providers:
- name: dockerbuild
- name: docker-build
path: ../../bin
resources:
# docker buildx build -f app/Dockerfile.multiPlatform --platform plan9/amd64,plan9/386 app
multiPlatform:
type: dockerbuild:Image
type: docker-build:Image
properties:
dockerfile:
location: "./app/Dockerfile.multiPlatform"
@@ -20,7 +20,7 @@ resources:
# docker buildx build --output=type=registry app
registryPush:
type: dockerbuild:Image
type: docker-build:Image
properties:
context:
location: "./app"
@@ -36,7 +36,7 @@ resources:
# docker buildx build --cache-to=type=local,dest=tmp/cache,mode=max --cache-from=type=local,src=tmp/cache app
cached:
type: dockerbuild:Image
type: docker-build:Image
properties:
context:
location: "./app"
@@ -50,7 +50,7 @@ resources:
# docker buildx build -f app/Dockerfile.buildArgs --build-arg SET_ME_TO_TRUE=true app
buildArgs:
type: dockerbuild:Image
type: docker-build:Image
properties:
dockerfile:
location: "./app/Dockerfile.buildArgs"
@@ -61,7 +61,7 @@ resources:
# docker buildx build -f app/Dockerfile.extraHosts --add-host metadata.google.internal:169.254.169.254 app
extraHosts:
type: dockerbuild:Image
type: docker-build:Image
properties:
dockerfile:
location: "./app/Dockerfile.extraHosts"
@@ -72,7 +72,7 @@ resources:
# docker buildx build -f app/Dockerfile.sshMount --ssh default app
sshMount:
type: dockerbuild:Image
type: docker-build:Image
properties:
dockerfile:
location: "./app/Dockerfile.sshMount"
@@ -83,7 +83,7 @@ resources:
# PASSWORD=hunter2 docker buildx build -f app/Dockerfile.secrets --secret id=password,env=PASSWORD app
secrets:
type: dockerbuild:Image
type: docker-build:Image
properties:
dockerfile:
location: "./app/Dockerfile.secrets"
@@ -94,7 +94,7 @@ resources:
# docker buildx build --label "description=This image will get a descriptive label 👍" app
labels:
type: dockerbuild:Image
type: docker-build:Image
properties:
context:
location: "./app"
@@ -103,7 +103,7 @@ resources:
# docker buildx build -f app/Dockerfile.target --target build-me app
target:
type: dockerbuild:Image
type: docker-build:Image
properties:
dockerfile:
location: "./app/Dockerfile.target"
@@ -114,7 +114,7 @@ resources:
# docker buildx build -f app/Dockerfile.namedContexts \
# --build-context golang:latest=docker-image://golang@sha256:b8e62cf593cdaff36efd90aa3a37de268e6781a2e68c6610940c48f7cdf36984 app
namedContexts:
type: dockerbuild:Image
type: docker-build:Image
properties:
dockerfile:
location: "./app/Dockerfile.namedContexts"
@@ -126,7 +126,7 @@ resources:
# docker buildx build https://raw.githubusercontent.com/pulumi/pulumi-docker/api-types/provider/testdata/Dockerfile
remoteContext:
type: dockerbuild:Image
type: docker-build:Image
properties:
context:
location: "https://raw.githubusercontent.com/pulumi/pulumi-docker/api-types/provider/testdata/Dockerfile"
@@ -136,7 +136,7 @@ resources:
# COPY hello.c ./
# EOF
remoteContextWithInline:
type: dockerbuild:Image
type: docker-build:Image
properties:
dockerfile:
inline: |
@@ -147,7 +147,7 @@ resources:
# echo "FROM alpine" | docker buildx build -f - .
inline:
type: dockerbuild:Image
type: docker-build:Image
properties:
dockerfile:
inline: |
@@ -158,7 +158,7 @@ resources:
# docker buildx build --load .
dockerLoad:
type: dockerbuild:Image
type: docker-build:Image
properties:
context:
location: "./app"
@@ -168,7 +168,7 @@ resources:
# docker buildx build - < app/Dockerfile.emptyContext
#emptyContext:
# type: dockerbuild:Image
# type: docker-build:Image
# properties:
# file: "app/Dockerfile.emptyContext"
# context: "-"