Skip to content
New issue

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

Pull CLI helper image from ECR Public #306

Merged
merged 1 commit into from
Jan 10, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
8 changes: 4 additions & 4 deletions pkg/cmd/docker/docker.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{
Expand Down Expand Up @@ -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)
}

}
Expand Down
2 changes: 1 addition & 1 deletion pkg/load/proxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading