From 8a5e5fa3c8c6c5e51dfdb2a501df55d47266264d Mon Sep 17 00:00:00 2001 From: amitaifrey Date: Tue, 30 Apr 2024 17:39:58 +0300 Subject: [PATCH] Remove --context from default --- repo.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/repo.go b/repo.go index 58b8943..0dd3f5b 100644 --- a/repo.go +++ b/repo.go @@ -49,7 +49,7 @@ func authDockerEcr(accountId, region string) error { } func buildDockerImage(repoURL, repoName, dockerfilePath, target, cacheToTarget string, cacheFromTargets, tags []string, remoteBuild bool) error { - buildArgs := []string{"--context", "ec2-builder", "buildx", "build", "--output", "type=registry", "--platform=linux/amd64", "--progress=plain", "--push", "--build-arg", "BUILDKIT_INLINE_CACHE=1", + buildArgs := []string{"buildx", "build", "--output", "type=registry", "--platform=linux/amd64", "--progress=plain", "--push", "--build-arg", "BUILDKIT_INLINE_CACHE=1", "--cache-to", fmt.Sprintf("mode=max,image-manifest=true,oci-mediatypes=true,type=registry,ref=%s/cache/%s:cache", repoURL, cacheToTarget)} for _, cacheFromTarget := range cacheFromTargets { buildArgs = append(buildArgs, "--cache-from", fmt.Sprintf("mode=max,image-manifest=true,oci-mediatypes=true,type=registry,ref=%s/cache/%s:cache", repoURL, cacheFromTarget))