From 11dbd323bb8b795605cad229f497b3574d1e17a5 Mon Sep 17 00:00:00 2001 From: Jacob Gillespie Date: Fri, 10 Jan 2025 13:59:51 +0000 Subject: [PATCH] Pull CLI helper image from ECR Public --- Makefile | 2 +- pkg/cmd/docker/docker.go | 8 ++++---- pkg/load/proxy.go | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index b8c188e8..7bafa129 100644 --- a/Makefile +++ b/Makefile @@ -4,7 +4,7 @@ bin/depot: .PHONY: image image: - docker --context=default buildx build --builder default -t ghcr.io/depot/cli:0.0.0-dev --load . + docker --context=default buildx build --builder default -t public.ecr.aws/depot/cli:0.0.0-dev --load . .PHONY: npm npm: diff --git a/pkg/cmd/docker/docker.go b/pkg/cmd/docker/docker.go index 57367db3..67fe5683 100644 --- a/pkg/cmd/docker/docker.go +++ b/pkg/cmd/docker/docker.go @@ -209,7 +209,7 @@ func runConfigureBuildx(ctx context.Context, dockerCli command.Cli, project, tok version := build.Version - image := "ghcr.io/depot/cli:" + version + image := "public.ecr.aws/depot/cli:" + version nodeName := "depot_" + projectName ng := &store.NodeGroup{ @@ -372,14 +372,14 @@ func UpdateDrivers(ctx context.Context, dockerCli command.Cli) error { var save bool for i, node := range nodeGroup.Nodes { image := node.DriverOpts["image"] - if strings.HasPrefix(image, "ghcr.io/depot/cli") { - nodeGroup.Nodes[i].DriverOpts["image"] = "ghcr.io/depot/cli:" + version + if strings.HasPrefix(image, "ghcr.io/depot/cli") || strings.HasPrefix(image, "public.ecr.aws/depot/cli") { + nodeGroup.Nodes[i].DriverOpts["image"] = "public.ecr.aws/depot/cli:" + version save = true projectName := node.DriverOpts["env.DEPOT_PROJECT_ID"] token := node.DriverOpts["env.DEPOT_TOKEN"] platform := node.DriverOpts["env.DEPOT_PLATFORM"] - _ = Bootstrap(ctx, dockerCli, "ghcr.io/depot/cli:"+version, projectName, token, platform) + _ = Bootstrap(ctx, dockerCli, "public.ecr.aws/depot/cli:"+version, projectName, token, platform) } } diff --git a/pkg/load/proxy.go b/pkg/load/proxy.go index 243c0ebb..d73e1db9 100644 --- a/pkg/load/proxy.go +++ b/pkg/load/proxy.go @@ -16,7 +16,7 @@ import ( "github.com/docker/go-connections/nat" ) -var proxyImage = "ghcr.io/depot/cli:" + build.Version // +var proxyImage = "public.ecr.aws/depot/cli:" + build.Version // type ProxyContainer struct { ID string