Skip to content

Commit

Permalink
remove unnecessary registry
Browse files Browse the repository at this point in the history
  • Loading branch information
guineveresaenger committed Feb 28, 2023
1 parent ce343ab commit 87d4741
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 10 deletions.
4 changes: 1 addition & 3 deletions examples/container-registries/gcp/csharp/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,14 @@ static Task<int> Main() => Deployment.RunAsync(async () => {
return (await GetRegistryRepository.InvokeAsync()).RepositoryUrl;
});

// Get registry info (creds and endpoint).
// Get image name
var imageName = Output.Format($"{registryUrl}/myapp");
//var registryInfo = new ImageRegistry(); // use gcloud for authentication.

// Build and publish the app image.
var image = new Image("my-image", new ImageArgs
{
Build = new Pulumi.Docker.Inputs.DockerBuildArgs { Context = "app" },
ImageName = imageName,
//Registry = registryInfo,
});

// Export the resulting base name in addition to the specific version pushed.
Expand Down
7 changes: 2 additions & 5 deletions examples/container-registries/gcp/py/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,16 @@
registry = gcp.container.Registry('my-registry')
registry_url = registry.id.apply(lambda _: gcp.container.get_registry_repository().repository_url)

# Get registry info (creds and endpoint).
# Get image name
image_name = registry_url.apply(lambda url: f'{url}/myapp')
registry_info = None # use gcloud for auth.

# Build and publish the image.
image = docker.Image('my-image',
build=docker.DockerBuildArgs(
context='app',
),
image_name=image_name,
registry=registry_info,
)

# Export the resulting base name in addition to the specific version pushed.
pulumi.export('baseImageName', image.base_image_name)
# Export the resulting image name
pulumi.export('imageName', image.image_name)
2 changes: 0 additions & 2 deletions examples/container-registries/gcp/ts/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,13 @@ const registryUrl = registry.id.apply(_ =>

// Get registry info (creds and endpoint).
const imageName = registryUrl.apply(url => `${url}/myapp`);
const registryInfo = undefined; // use gcloud for authentication.

// Build and publish the image.
const image = new docker.Image("my-image", {
build: {
context: "app"
},
imageName: imageName,
registry: registryInfo,
});

// Export the resulting image name
Expand Down

0 comments on commit 87d4741

Please sign in to comment.