Skip to content

Commit fb1a9a1

Browse files
committed
Updating from docker to docker-build, fixes #1791
1 parent e9cc28c commit fb1a9a1

File tree

27 files changed

+86
-108
lines changed

27 files changed

+86
-108
lines changed

aws-js-langserve/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@
44
"dependencies": {
55
"@pulumi/pulumi": "3.145.0",
66
"@pulumi/aws": "6.66.3",
7-
"@pulumi/docker": "4.6.0"
7+
"@pulumi/docker-build": "^0.0.8"
88
}
99
}

aws-ts-hello-fargate/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"dependencies": {
88
"@pulumi/aws": "6.66.3",
99
"@pulumi/awsx": "2.20.0",
10-
"@pulumi/docker": "4.6.0",
11-
"@pulumi/pulumi": "3.145.0"
10+
"@pulumi/pulumi": "3.145.0",
11+
"@pulumi/docker-build": "^0.0.8"
1212
}
1313
}

aws-ts-langserve/index.ts

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
// limitations under the License.
1414

1515
import * as aws from "@pulumi/aws";
16-
import * as docker from "@pulumi/docker";
16+
import * as dockerbuild from "@pulumi/docker-build";
1717
import * as pulumi from "@pulumi/pulumi";
1818

1919
const config = new pulumi.Config();
@@ -58,12 +58,9 @@ const langserveEcrLifeCyclePolicy = new aws.ecr.LifecyclePolicy("langserve-ecr-l
5858
}],
5959
}),
6060
});
61-
const langserveEcrImage = new docker.Image("langserve-ecr-image", {
62-
build: {
63-
platform: "linux/amd64",
64-
context: containerContext,
65-
dockerfile: containerFile,
66-
},
61+
const langserveEcrImage = new dockerbuild.Image("langserve-ecr-image", {
62+
context: { location: "." },
63+
platforms: ["linux/amd64"],
6764
imageName: langserveEcrRepository.repositoryUrl,
6865
registry: {
6966
server: langserveEcrRepository.repositoryUrl,

aws-ts-langserve/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@
77
"typescript": "^4.0.0",
88
"@pulumi/pulumi": "3.145.0",
99
"@pulumi/aws": "6.66.3",
10-
"@pulumi/docker": "4.6.0"
10+
"@pulumi/docker-build": "^0.0.8"
1111
}
1212
}

aws-ts-localai-flowise/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
"@pulumi/pulumi": "3.145.0",
99
"@pulumi/eks": "3.7.0",
1010
"@pulumi/aws": "6.66.3",
11-
"@pulumi/docker": "4.6.0",
1211
"@pulumi/kubernetes": "4.19.0",
13-
"@pinecone-database/pulumi": "^0.4.0"
12+
"@pinecone-database/pulumi": "^0.4.0",
13+
"@pulumi/docker-build": "^0.0.8"
1414
}
1515
}

azure-ts-appservice-docker/index.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// Copyright 2016-2020, Pulumi Corporation. All rights reserved.
22

3-
import * as docker from "@pulumi/docker";
3+
import * as dockerbuild from "@pulumi/docker-build";
44
import * as pulumi from "@pulumi/pulumi";
55

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

65-
const myImage = new docker.Image(customImage, {
65+
const myImage = new dockerbuild.Image(customImage, {
6666
imageName: pulumi.interpolate`${registry.loginServer}/${customImage}:v1.0.0`,
67-
build: { context: `./${customImage}` },
68-
registry: {
69-
server: registry.loginServer,
70-
username: adminUsername,
71-
password: adminPassword,
72-
},
67+
context: { location: "." }` },
68+
registries: [{
69+
address: "",
70+
username: "",
71+
password: adminPassword
72+
}],
7373
});
7474
7575
const getStartedApp = new web.WebApp("getStartedApp", {

azure-ts-appservice-docker/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
},
77
"dependencies": {
88
"@pulumi/azure-native": "2.82.0",
9-
"@pulumi/docker": "4.6.0",
10-
"@pulumi/pulumi": "3.145.0"
9+
"@pulumi/pulumi": "3.145.0",
10+
"@pulumi/docker-build": "^0.0.8"
1111
}
1212
}

azure-ts-containerapps/index.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// Copyright 2016-2021, Pulumi Corporation. All rights reserved.
22

3-
import * as docker from "@pulumi/docker";
3+
import * as dockerbuild from "@pulumi/docker-build";
44
import * as pulumi from "@pulumi/pulumi";
55

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

5252
const customImage = "node-app";
53-
const myImage = new docker.Image(customImage, {
53+
const myImage = new dockerbuild.Image(customImage, {
5454
imageName: pulumi.interpolate`${registry.loginServer}/${customImage}:v1.0.0`,
55-
build: { context: `./${customImage}` },
56-
registry: {
57-
server: registry.loginServer,
58-
username: adminUsername,
59-
password: adminPassword,
60-
},
55+
context: { location: "." }` },
56+
registries: [{
57+
address: "",
58+
username: "",
59+
password: adminPassword
60+
}],
6161
});
6262
6363
const containerApp = new app.ContainerApp("app", {

azure-ts-containerapps/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
},
77
"dependencies": {
88
"@pulumi/azure-native": "2.82.0",
9-
"@pulumi/docker": "4.6.0",
10-
"@pulumi/pulumi": "3.145.0"
9+
"@pulumi/pulumi": "3.145.0",
10+
"@pulumi/docker-build": "^0.0.8"
1111
}
1212
}

classic-azure-ts-aks-keda/keda.ts

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Copyright 2016-2019, Pulumi Corporation. All rights reserved.
22

33
import * as azure from "@pulumi/azure";
4-
import * as docker from "@pulumi/docker";
4+
import * as dockerbuild from "@pulumi/docker-build";
55
import * as k8s from "@pulumi/kubernetes";
66
import * as pulumi from "@pulumi/pulumi";
77

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

8989
// Deploy the docker image of the Function App
90-
const dockerImage = new docker.Image("image", {
90+
const dockerImage = new dockerbuild.Image("image", {
9191
imageName: pulumi.interpolate`${registry.loginServer}/${args.queue.name}:v1.0.0`,
92-
build: {
93-
context: args.path,
94-
},
95-
registry: {
96-
server: registry.loginServer,
97-
username: registry.adminUsername,
98-
password: registry.adminPassword,
99-
},
92+
context: { location: "." },
93+
registries: [{
94+
address: "",
95+
username: "",
96+
password: registry.adminPassword
97+
}],
10098
}, { parent: this });
10199

102100
// Put the storage account connection string into a secret

classic-azure-ts-aks-keda/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@
77
"dependencies": {
88
"@pulumi/azure": "6.15.0",
99
"@pulumi/azuread": "6.1.0",
10-
"@pulumi/docker": "4.6.0",
1110
"@pulumi/kubernetes": "4.19.0",
1211
"@pulumi/pulumi": "3.145.0",
1312
"@pulumi/random": "4.16.8",
14-
"@pulumi/tls": "5.0.10"
13+
"@pulumi/tls": "5.0.10",
14+
"@pulumi/docker-build": "^0.0.8"
1515
},
1616
"license": "Apache-2.0"
1717
}

classic-azure-ts-cosmosapp-component/aci.ts

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Copyright 2016-2018, Pulumi Corporation. All rights reserved.
22

33
import * as azure from "@pulumi/azure";
4-
import * as docker from "@pulumi/docker";
4+
import * as dockerbuild from "@pulumi/docker-build";
55
import * as pulumi from "@pulumi/pulumi";
66
import { CosmosApp, GlobalContext, RegionalContext } from "./cosmosApp";
77

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

24-
const dockerImage = new docker.Image("node-app", {
24+
const dockerImage = new dockerbuild.Image("node-app", {
2525
imageName: pulumi.interpolate`${registry.loginServer}/mynodeapp:v1.0.0`,
26-
build: {
27-
context: "./container",
28-
},
29-
registry: {
30-
server: registry.loginServer,
31-
username: registry.adminUsername,
32-
password: registry.adminPassword,
33-
},
26+
context: { location: "./container" },
27+
registries: [{
28+
address: "",
29+
username: "",
30+
password: registry.adminPassword
31+
}],
3432
}, opts);
3533

3634
return ({ location }: RegionalContext) => {

classic-azure-ts-cosmosapp-component/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
"dependencies": {
1111
"@azure/cosmos": "latest",
1212
"@pulumi/azure": "6.15.0",
13-
"@pulumi/docker": "4.6.0",
1413
"@pulumi/pulumi": "3.145.0",
15-
"@pulumi/random": "4.16.8"
14+
"@pulumi/random": "4.16.8",
15+
"@pulumi/docker-build": "^0.0.8"
1616
}
1717
}

docker-ts-multi-container-app/index.ts

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// Copyright 2016-2021, Pulumi Corporation. All rights reserved.
22

3-
import * as docker from "@pulumi/docker";
3+
import * as dockerbuild from "@pulumi/docker-build";
44
import * as pulumi from "@pulumi/pulumi";
55

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

3232
// Create image from local app
33-
const appImage = new docker.Image("appImage", {
34-
build: {
35-
context: "./app",
36-
},
37-
imageName: "app",
33+
const appImage = new dockerbuild.Image("appImage", {
34+
context: { location: "./app" },
35+
tags: ["app"],
3836
skipPush: true,
3937
});
4038

docker-ts-multi-container-app/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"@types/node": "10.17.60"
55
},
66
"dependencies": {
7-
"@pulumi/docker": "4.6.0",
8-
"@pulumi/pulumi": "3.145.0"
7+
"@pulumi/pulumi": "3.145.0",
8+
"@pulumi/docker-build": "^0.0.8"
99
}
1010
}

gcp-ts-cloudrun/index.ts

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// Copyright 2016-2020, Pulumi Corporation. All rights reserved.
22

3-
import * as docker from "@pulumi/docker";
3+
import * as dockerbuild from "@pulumi/docker-build";
44
import * as gcp from "@pulumi/gcp";
55
import * as pulumi from "@pulumi/pulumi";
66

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

5855
// Deploy to Cloud Run. Some extra parameters like concurrency and memory are set for illustration purpose.

gcp-ts-cloudrun/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
"@types/node": "12.20.55"
77
},
88
"dependencies": {
9-
"@pulumi/docker": "4.6.0",
109
"@pulumi/gcp": "8.13.1",
11-
"@pulumi/pulumi": "3.145.0"
10+
"@pulumi/pulumi": "3.145.0",
11+
"@pulumi/docker-build": "^0.0.8"
1212
}
1313
}

gcp-ts-docker-gcr-cloudrun/cloud-run-deploy/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import * as pulumi from "@pulumi/pulumi";
44
import * as gcp from "@pulumi/gcp";
5-
import * as docker from "@pulumi/docker";
5+
import * as dockerbuild from "@pulumi/docker-build";
66

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

gcp-ts-docker-gcr-cloudrun/cloud-run-deploy/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
"@types/node": "12.20.55"
55
},
66
"dependencies": {
7-
"@pulumi/docker": "4.6.0",
87
"@pulumi/gcp": "8.13.1",
9-
"@pulumi/pulumi": "3.145.0"
8+
"@pulumi/pulumi": "3.145.0",
9+
"@pulumi/docker-build": "^0.0.8"
1010
}
1111
}

gcp-ts-docker-gcr-cloudrun/docker-build-push-gcr/index.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,16 @@
11
// Copyright 2016-2020, Pulumi Corporation. All rights reserved.
22

3-
import * as docker from "@pulumi/docker";
3+
import * as dockerbuild from "@pulumi/docker-build";
44
import * as gcp from "@pulumi/gcp";
55
import * as pulumi from "@pulumi/pulumi";
66

77
// Build and push image to gcr repository
88

99
const imageName = "ruby-app";
1010

11-
const myImage = new docker.Image(imageName, {
11+
const myImage = new dockerbuild.Image(imageName, {
1212
imageName: pulumi.interpolate`gcr.io/${gcp.config.project}/${imageName}:latest`,
13-
build: {
14-
context: "./app",
15-
},
13+
context: { location: "./app" },
1614
});
1715

1816
// Digest exported so it's easy to match updates happening in cloud run project

gcp-ts-docker-gcr-cloudrun/docker-build-push-gcr/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
"@types/node": "12.20.55"
55
},
66
"dependencies": {
7-
"@pulumi/docker": "4.6.0",
87
"@pulumi/gcp": "8.13.1",
9-
"@pulumi/pulumi": "3.145.0"
8+
"@pulumi/pulumi": "3.145.0",
9+
"@pulumi/docker-build": "^0.0.8"
1010
}
1111
}

gcp-ts-k8s-ruby-on-rails-postgresql/infra/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
// Copyright 2016-2018, Pulumi Corporation. All rights reserved.
22

3-
import * as docker from "@pulumi/docker";
3+
import * as dockerbuild from "@pulumi/docker-build";
44
import * as k8s from "@pulumi/kubernetes";
55
import * as pulumi from "@pulumi/pulumi";
66
import * as cluster from "./cluster";
77
import * as config from "./config";
88
import * as db from "./db";
99

1010
// Get the GCR repository for our app container, and build and publish the app image.
11-
const appImage = new docker.Image("rails-app", {
11+
const appImage = new dockerbuild.Image("rails-app", {
1212
imageName: `${config.dockerUsername}/${pulumi.getProject()}_${pulumi.getStack()}`,
1313
build: "../app",
1414
registry: {

gcp-ts-k8s-ruby-on-rails-postgresql/infra/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
"@types/node": "8.10.66"
55
},
66
"dependencies": {
7-
"@pulumi/docker": "4.6.0",
87
"@pulumi/gcp": "8.13.1",
98
"@pulumi/kubernetes": "4.19.0",
10-
"@pulumi/pulumi": "3.145.0"
9+
"@pulumi/pulumi": "3.145.0",
10+
"@pulumi/docker-build": "^0.0.8"
1111
}
1212
}

0 commit comments

Comments
 (0)