This repository has been archived by the owner on Mar 11, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
2,168 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
index.ts | ||
node_modules | ||
package.json | ||
Pulumi.yaml | ||
tsconfig.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
FROM ubuntu | ||
|
||
RUN apt-get update && apt-get install -qy python-is-python3 python3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
name: docker-buildkit-aws-typescript | ||
description: Demonstrate Docker Buildkit usage with AWS and TypeScript. | ||
runtime: | ||
name: nodejs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import * as aws from "@pulumi/aws"; | ||
import * as dockerBuildkit from "@MaterializeInc/pulumi-docker-buildkit"; | ||
|
||
const repo = new aws.ecr.Repository("repo"); | ||
|
||
const registryInfo = repo.registryId.apply(async id => { | ||
const credentials = await aws.ecr.getCredentials({ registryId: id }); | ||
const authToken = Buffer.from(credentials.authorizationToken, "base64"); | ||
const [username, password] = authToken.toString().split(":"); | ||
return { server: credentials.proxyEndpoint, username: username, password: password }; | ||
}); | ||
|
||
export const image = new dockerBuildkit.Image( | ||
"image", | ||
{ name: repo.repositoryUrl, registry: registryInfo }, | ||
).repoDigest; |
Oops, something went wrong.