Skip to content

Commit

Permalink
Update for Docker 4.1
Browse files Browse the repository at this point in the history
Update code to work with 4.1.x of the Docker provider (instead of version 4.0.x). Documentation updated accordingly.

Signed-off-by: Scott Lowe <[email protected]>
  • Loading branch information
scottslowe committed Apr 21, 2023
1 parent d022974 commit 48e193b
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 14 deletions.
1 change: 1 addition & 0 deletions develop/pulumi/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ Before you can use this Pulumi program, you will need:
1. The `pulumi` CLI installed
2. A local Docker daemon running (using Docker Desktop for Windows/Mac is fine)
3. NodeJS installed (this was tested with Node 18)
4. Version 4.1 or greater of the Pulumi Docker provider (should be installed automatically when you run `pulumi up`)

Once the prerequisites are met, then set configuration values (see the section titled "Configuration Values") and run `pulumi up`. Within a few minutes, all the containers will be deployed locally. You can access the Zephyr online store by navigating to `http://localhost:8888`.

Expand Down
12 changes: 6 additions & 6 deletions develop/pulumi/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const uiImage = new docker.Image("ui-image", {
"JAR_PATH": "target/ui-0.0.1-SNAPSHOT.jar",
},
context: `${srcRepoPath}/src/ui`,
dockerfile: "Dockerfile",
dockerfile: `${srcRepoPath}/src/ui/Dockerfile`,
platform: "linux/arm64",
},
imageName: "zephyr-ui:latest",
Expand All @@ -31,7 +31,7 @@ if (assetsFlag == "build") {
const assetsImage = new docker.Image("assets-image", {
build: {
context: `${srcRepoPath}/src/assets`,
dockerfile: "Dockerfile",
dockerfile: `${srcRepoPath}/src/assets/Dockerfile`,
platform: "linux/arm64",
},
imageName: "zephyr-assets:latest",
Expand All @@ -58,7 +58,7 @@ if (cartsFlag == "build") {
"JAR_PATH": "target/carts-0.0.1-SNAPSHOT.jar",
},
context: `${srcRepoPath}/src/cart`,
dockerfile: "Dockerfile",
dockerfile: `${srcRepoPath}/src/cart/Dockerfile`,
platform: "linux/arm64",
},
imageName: "zephyr-carts:latest",
Expand All @@ -85,7 +85,7 @@ if (catalogFlag == "build") {
"MAIN_PATH": "main.go",
},
context: `${srcRepoPath}/src/catalog`,
dockerfile: "Dockerfile",
dockerfile: `${srcRepoPath}/src/catalog/Dockerfile`,
platform: "linux/arm64",
},
imageName: "zephyr-catalog:latest",
Expand All @@ -112,7 +112,7 @@ if (checkoutFlag == "build") {
"MAIN_PATH": "main.go",
},
context: `${srcRepoPath}/src/checkout`,
dockerfile: "Dockerfile",
dockerfile: `${srcRepoPath}/src/checkout/Dockerfile`,
platform: "linux/arm64",
},
imageName: "zephyr-checkout:latest",
Expand All @@ -139,7 +139,7 @@ if (ordersFlag == "build") {
"JAR_PATH": "target/orders-0.0.1-SNAPSHOT.jar",
},
context: `${srcRepoPath}/src/orders`,
dockerfile: "Dockerfile",
dockerfile: `${srcRepoPath}/src/orders/Dockerfile`,
platform: "linux/arm64",
},
imageName: "zephyr-orders:latest",
Expand Down
14 changes: 7 additions & 7 deletions develop/pulumi/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion develop/pulumi/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@
},
"dependencies": {
"@pulumi/pulumi": "^3.0.0",
"@pulumi/docker": "^4.0.0"
"@pulumi/docker": "^4.1.0"
}
}

0 comments on commit 48e193b

Please sign in to comment.