Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updating from docker to docker-build, fixes #1791 #1793

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion aws-js-langserve/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
"dependencies": {
"@pulumi/pulumi": "3.145.0",
"@pulumi/aws": "6.66.3",
"@pulumi/docker": "4.6.0"
"@pulumi/docker-build": "^0.0.8"
}
}
4 changes: 2 additions & 2 deletions aws-ts-hello-fargate/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"dependencies": {
"@pulumi/aws": "6.66.3",
"@pulumi/awsx": "2.20.0",
"@pulumi/docker": "4.6.0",
"@pulumi/pulumi": "3.145.0"
"@pulumi/pulumi": "3.145.0",
"@pulumi/docker-build": "^0.0.8"
}
}
11 changes: 4 additions & 7 deletions aws-ts-langserve/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
// limitations under the License.

import * as aws from "@pulumi/aws";
import * as docker from "@pulumi/docker";
import * as dockerbuild from "@pulumi/docker-build";
import * as pulumi from "@pulumi/pulumi";

const config = new pulumi.Config();
Expand Down Expand Up @@ -58,12 +58,9 @@ const langserveEcrLifeCyclePolicy = new aws.ecr.LifecyclePolicy("langserve-ecr-l
}],
}),
});
const langserveEcrImage = new docker.Image("langserve-ecr-image", {
build: {
platform: "linux/amd64",
context: containerContext,
dockerfile: containerFile,
},
const langserveEcrImage = new dockerbuild.Image("langserve-ecr-image", {
context: { location: "." },
platforms: ["linux/amd64"],
imageName: langserveEcrRepository.repositoryUrl,
registry: {
server: langserveEcrRepository.repositoryUrl,
Expand Down
2 changes: 1 addition & 1 deletion aws-ts-langserve/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@
"typescript": "^4.0.0",
"@pulumi/pulumi": "3.145.0",
"@pulumi/aws": "6.66.3",
"@pulumi/docker": "4.6.0"
"@pulumi/docker-build": "^0.0.8"
}
}
4 changes: 2 additions & 2 deletions aws-ts-localai-flowise/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
"@pulumi/pulumi": "3.145.0",
"@pulumi/eks": "3.7.0",
"@pulumi/aws": "6.66.3",
"@pulumi/docker": "4.6.0",
"@pulumi/kubernetes": "4.19.0",
"@pinecone-database/pulumi": "^0.4.0"
"@pinecone-database/pulumi": "^0.4.0",
"@pulumi/docker-build": "^0.0.8"
}
}
16 changes: 8 additions & 8 deletions azure-ts-appservice-docker/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Copyright 2016-2020, Pulumi Corporation. All rights reserved.

import * as docker from "@pulumi/docker";
import * as dockerbuild from "@pulumi/docker-build";
import * as pulumi from "@pulumi/pulumi";

import * as containerregistry from "@pulumi/azure-native/containerregistry";
Expand Down Expand Up @@ -62,14 +62,14 @@ const credentials = containerregistry.listRegistryCredentialsOutput({
const adminUsername = credentials.apply(credentials => credentials.username!);
const adminPassword = credentials.apply(credentials => credentials.passwords![0].value!);

const myImage = new docker.Image(customImage, {
const myImage = new dockerbuild.Image(customImage, {
imageName: pulumi.interpolate`${registry.loginServer}/${customImage}:v1.0.0`,
build: { context: `./${customImage}` },
registry: {
server: registry.loginServer,
username: adminUsername,
password: adminPassword,
},
context: { location: "." }` },
registries: [{
address: "",
username: "",
password: adminPassword
}],
});

const getStartedApp = new web.WebApp("getStartedApp", {
Expand Down
4 changes: 2 additions & 2 deletions azure-ts-appservice-docker/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
},
"dependencies": {
"@pulumi/azure-native": "2.82.0",
"@pulumi/docker": "4.6.0",
"@pulumi/pulumi": "3.145.0"
"@pulumi/pulumi": "3.145.0",
"@pulumi/docker-build": "^0.0.8"
}
}
16 changes: 8 additions & 8 deletions azure-ts-containerapps/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Copyright 2016-2021, Pulumi Corporation. All rights reserved.

import * as docker from "@pulumi/docker";
import * as dockerbuild from "@pulumi/docker-build";
import * as pulumi from "@pulumi/pulumi";

import * as app from "@pulumi/azure-native/app";
Expand Down Expand Up @@ -50,14 +50,14 @@ const adminUsername = credentials.apply((c: containerregistry.ListRegistryCreden
const adminPassword = credentials.apply((c: containerregistry.ListRegistryCredentialsResult) => c.passwords![0].value!);

const customImage = "node-app";
const myImage = new docker.Image(customImage, {
const myImage = new dockerbuild.Image(customImage, {
imageName: pulumi.interpolate`${registry.loginServer}/${customImage}:v1.0.0`,
build: { context: `./${customImage}` },
registry: {
server: registry.loginServer,
username: adminUsername,
password: adminPassword,
},
context: { location: "." }` },
registries: [{
address: "",
username: "",
password: adminPassword
}],
});

const containerApp = new app.ContainerApp("app", {
Expand Down
4 changes: 2 additions & 2 deletions azure-ts-containerapps/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
},
"dependencies": {
"@pulumi/azure-native": "2.82.0",
"@pulumi/docker": "4.6.0",
"@pulumi/pulumi": "3.145.0"
"@pulumi/pulumi": "3.145.0",
"@pulumi/docker-build": "^0.0.8"
}
}
18 changes: 8 additions & 10 deletions classic-azure-ts-aks-keda/keda.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright 2016-2019, Pulumi Corporation. All rights reserved.

import * as azure from "@pulumi/azure";
import * as docker from "@pulumi/docker";
import * as dockerbuild from "@pulumi/docker-build";
import * as k8s from "@pulumi/kubernetes";
import * as pulumi from "@pulumi/pulumi";

Expand Down Expand Up @@ -87,16 +87,14 @@ export class KedaStorageQueueHandler extends pulumi.ComponentResource {
const registry = args.service.registry;

// Deploy the docker image of the Function App
const dockerImage = new docker.Image("image", {
const dockerImage = new dockerbuild.Image("image", {
imageName: pulumi.interpolate`${registry.loginServer}/${args.queue.name}:v1.0.0`,
build: {
context: args.path,
},
registry: {
server: registry.loginServer,
username: registry.adminUsername,
password: registry.adminPassword,
},
context: { location: "." },
registries: [{
address: "",
username: "",
password: registry.adminPassword
}],
}, { parent: this });

// Put the storage account connection string into a secret
Expand Down
4 changes: 2 additions & 2 deletions classic-azure-ts-aks-keda/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
"dependencies": {
"@pulumi/azure": "6.15.0",
"@pulumi/azuread": "6.1.0",
"@pulumi/docker": "4.6.0",
"@pulumi/kubernetes": "4.19.0",
"@pulumi/pulumi": "3.145.0",
"@pulumi/random": "4.16.8",
"@pulumi/tls": "5.0.10"
"@pulumi/tls": "5.0.10",
"@pulumi/docker-build": "^0.0.8"
},
"license": "Apache-2.0"
}
18 changes: 8 additions & 10 deletions classic-azure-ts-cosmosapp-component/aci.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright 2016-2018, Pulumi Corporation. All rights reserved.

import * as azure from "@pulumi/azure";
import * as docker from "@pulumi/docker";
import * as dockerbuild from "@pulumi/docker-build";
import * as pulumi from "@pulumi/pulumi";
import { CosmosApp, GlobalContext, RegionalContext } from "./cosmosApp";

Expand All @@ -21,16 +21,14 @@ function buildContainerApp({ cosmosAccount, database, container, opts }: GlobalC
sku: "Premium",
}, opts);

const dockerImage = new docker.Image("node-app", {
const dockerImage = new dockerbuild.Image("node-app", {
imageName: pulumi.interpolate`${registry.loginServer}/mynodeapp:v1.0.0`,
build: {
context: "./container",
},
registry: {
server: registry.loginServer,
username: registry.adminUsername,
password: registry.adminPassword,
},
context: { location: "./container" },
registries: [{
address: "",
username: "",
password: registry.adminPassword
}],
}, opts);

return ({ location }: RegionalContext) => {
Expand Down
4 changes: 2 additions & 2 deletions classic-azure-ts-cosmosapp-component/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
"dependencies": {
"@azure/cosmos": "latest",
"@pulumi/azure": "6.15.0",
"@pulumi/docker": "4.6.0",
"@pulumi/pulumi": "3.145.0",
"@pulumi/random": "4.16.8"
"@pulumi/random": "4.16.8",
"@pulumi/docker-build": "^0.0.8"
}
}
10 changes: 4 additions & 6 deletions docker-ts-multi-container-app/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Copyright 2016-2021, Pulumi Corporation. All rights reserved.

import * as docker from "@pulumi/docker";
import * as dockerbuild from "@pulumi/docker-build";
import * as pulumi from "@pulumi/pulumi";

// Set defaults for redis
Expand Down Expand Up @@ -30,11 +30,9 @@ const redisContainer = new docker.Container("redisContainer", {
});

// Create image from local app
const appImage = new docker.Image("appImage", {
build: {
context: "./app",
},
imageName: "app",
const appImage = new dockerbuild.Image("appImage", {
context: { location: "./app" },
tags: ["app"],
skipPush: true,
});

Expand Down
4 changes: 2 additions & 2 deletions docker-ts-multi-container-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"@types/node": "10.17.60"
},
"dependencies": {
"@pulumi/docker": "4.6.0",
"@pulumi/pulumi": "3.145.0"
"@pulumi/pulumi": "3.145.0",
"@pulumi/docker-build": "^0.0.8"
}
}
11 changes: 4 additions & 7 deletions gcp-ts-cloudrun/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Copyright 2016-2020, Pulumi Corporation. All rights reserved.

import * as docker from "@pulumi/docker";
import * as dockerbuild from "@pulumi/docker-build";
import * as gcp from "@pulumi/gcp";
import * as pulumi from "@pulumi/pulumi";

Expand Down Expand Up @@ -46,13 +46,10 @@ export const helloUrl = helloService.statuses[0].url;
// Build a Docker image from our sample Ruby app and put it to Google Container Registry.
// Note: Run `gcloud auth configure-docker` in your command line to configure auth to GCR.
const imageName = "ruby-app";
const myImage = new docker.Image(imageName, {
const myImage = new dockerbuild.Image(imageName, {
imageName: pulumi.interpolate`gcr.io/${gcp.config.project}/${imageName}:v1.0.0`,
build: {
context: "./app",
platform: "linux/amd64",

},
context: { location: "./app" },
platforms: ["linux/amd64"],
});

// Deploy to Cloud Run. Some extra parameters like concurrency and memory are set for illustration purpose.
Expand Down
4 changes: 2 additions & 2 deletions gcp-ts-cloudrun/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
"@types/node": "12.20.55"
},
"dependencies": {
"@pulumi/docker": "4.6.0",
"@pulumi/gcp": "8.13.1",
"@pulumi/pulumi": "3.145.0"
"@pulumi/pulumi": "3.145.0",
"@pulumi/docker-build": "^0.0.8"
}
}
2 changes: 1 addition & 1 deletion gcp-ts-docker-gcr-cloudrun/cloud-run-deploy/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
import * as docker from "@pulumi/docker";
import * as dockerbuild from "@pulumi/docker-build";

const location = gcp.config.region || "us-central1";

Expand Down
4 changes: 2 additions & 2 deletions gcp-ts-docker-gcr-cloudrun/cloud-run-deploy/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
"@types/node": "12.20.55"
},
"dependencies": {
"@pulumi/docker": "4.6.0",
"@pulumi/gcp": "8.13.1",
"@pulumi/pulumi": "3.145.0"
"@pulumi/pulumi": "3.145.0",
"@pulumi/docker-build": "^0.0.8"
}
}
8 changes: 3 additions & 5 deletions gcp-ts-docker-gcr-cloudrun/docker-build-push-gcr/index.ts
Original file line number Diff line number Diff line change
@@ -1,18 +1,16 @@
// Copyright 2016-2020, Pulumi Corporation. All rights reserved.

import * as docker from "@pulumi/docker";
import * as dockerbuild from "@pulumi/docker-build";
import * as gcp from "@pulumi/gcp";
import * as pulumi from "@pulumi/pulumi";

// Build and push image to gcr repository

const imageName = "ruby-app";

const myImage = new docker.Image(imageName, {
const myImage = new dockerbuild.Image(imageName, {
imageName: pulumi.interpolate`gcr.io/${gcp.config.project}/${imageName}:latest`,
build: {
context: "./app",
},
context: { location: "./app" },
});

// Digest exported so it's easy to match updates happening in cloud run project
Expand Down
4 changes: 2 additions & 2 deletions gcp-ts-docker-gcr-cloudrun/docker-build-push-gcr/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
"@types/node": "12.20.55"
},
"dependencies": {
"@pulumi/docker": "4.6.0",
"@pulumi/gcp": "8.13.1",
"@pulumi/pulumi": "3.145.0"
"@pulumi/pulumi": "3.145.0",
"@pulumi/docker-build": "^0.0.8"
}
}
4 changes: 2 additions & 2 deletions gcp-ts-k8s-ruby-on-rails-postgresql/infra/index.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
// Copyright 2016-2018, Pulumi Corporation. All rights reserved.

import * as docker from "@pulumi/docker";
import * as dockerbuild from "@pulumi/docker-build";
import * as k8s from "@pulumi/kubernetes";
import * as pulumi from "@pulumi/pulumi";
import * as cluster from "./cluster";
import * as config from "./config";
import * as db from "./db";

// Get the GCR repository for our app container, and build and publish the app image.
const appImage = new docker.Image("rails-app", {
const appImage = new dockerbuild.Image("rails-app", {
imageName: `${config.dockerUsername}/${pulumi.getProject()}_${pulumi.getStack()}`,
build: "../app",
registry: {
Expand Down
4 changes: 2 additions & 2 deletions gcp-ts-k8s-ruby-on-rails-postgresql/infra/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
"@types/node": "8.10.66"
},
"dependencies": {
"@pulumi/docker": "4.6.0",
"@pulumi/gcp": "8.13.1",
"@pulumi/kubernetes": "4.19.0",
"@pulumi/pulumi": "3.145.0"
"@pulumi/pulumi": "3.145.0",
"@pulumi/docker-build": "^0.0.8"
}
}
Loading
Loading