square-rose-64819
04/09/2020, 2:37 AMconst provider = new docker.Provider("registry", {
registryAuth: [{
address: "<http://gcr.io|gcr.io>",
username: "oauth2accesstoken",
// gcloud auth print-access-token | pulumi config set --secret gcpAuthToken
password: config.requireSecret("gcpAuthToken")
}]
});
const registryImage = docker.getRegistryImage({
name: imageName,
}, {
provider,
async: true
});
if (!(registryImage.name && registryImage.sha256Digest)) {
throw new Error("Unable to get registry image")
}
this.dockerImage = new docker.RemoteImage(`${name}-docker-image`, {
name: registryImage.name!,
pullTriggers: [registryImage.sha256Digest!],
}, {
provider,
parent: this,
});
No matter how you like to participate in developer communities, Pulumi wants to meet you there. If you want to meet other Pulumi users to share use-cases and best practices, contribute code or documentation, see us at an event, or just tell a story about something cool you did with Pulumi, you are part of our community.
Powered by