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,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,
),
)])