We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
File: themes/default/content/registry/packages/docker/api-docs/image/_index.md
Currently the example for Docker image build using caching with AWS Elastic Container Registry is as follows:
package main import ( "fmt" "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ecr" "github.com/pulumi/pulumi-docker/sdk/v4/go/docker" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) func main() { pulumi.Run(func(ctx *pulumi.Context) error { ecrRepository, err := ecr.NewRepository(ctx, "ecr-repository", &ecr.RepositoryArgs{ Name: pulumi.String("docker-repository"), }) if err != nil { return err } authToken := ecr.GetAuthorizationTokenOutput(ctx, ecr.GetAuthorizationTokenOutputArgs{ RegistryId: ecrRepository.RegistryId, }, nil) myAppImage, err := docker.NewImage(ctx, "my-app-image", &docker.ImageArgs{ Build: &docker.DockerBuildArgs{ Args: pulumi.StringMap{ "BUILDKIT_INLINE_CACHE": pulumi.String("1"), }, CacheFrom: &docker.CacheFromArgs{ Images: pulumi.StringArray{ ecrRepository.RepositoryUrl.ApplyT(func(repositoryUrl string) (string, error) { return fmt.Sprintf("%v:latest", repositoryUrl), nil }).(pulumi.StringOutput), }, }, Context: pulumi.String("app/"), Dockerfile: pulumi.String("Dockerfile"), }, ImageName: ecrRepository.RepositoryUrl.ApplyT(func(repositoryUrl string) (string, error) { return fmt.Sprintf("%v:latest", repositoryUrl), nil }).(pulumi.StringOutput), Registry: &docker.RegistryArgs{ Password: pulumi.ToSecret(authToken.ApplyT(func(authToken ecr.GetAuthorizationTokenResult) (*string, error) { return &authToken.Password, nil }).(pulumi.StringPtrOutput)).(*pulumi.StringOutput), Server: ecrRepository.RepositoryUrl, }, }) if err != nil { return err } ctx.Export("imageName", myAppImage.ImageName) return nil }) }
But the Password field of the docker.RegistryArgs is incorrect. It should be this instead:
Password: authToken.ApplyT(func(authToken ecr.GetAuthorizationTokenResult) (*string, error) { return &authToken.Password, nil }).(pulumi.StringPtrOutput).ToStringPtrOutput(),
The text was updated successfully, but these errors were encountered:
Thanks for submitting this @cgradwohl! We'll get this looked at.
Sorry, something went wrong.
No branches or pull requests
File: themes/default/content/registry/packages/docker/api-docs/image/_index.md
Currently the example for Docker image build using caching with AWS Elastic Container Registry is as follows:
But the Password field of the docker.RegistryArgs is incorrect. It should be this instead:
The text was updated successfully, but these errors were encountered: