Skip to content
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: 2 additions & 0 deletions framework/.changeset/v0.15.2.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- Don't set `CL_INSTALL_PRIVATE_PLUGINS` env var to `false` when building Docker images
- Build docker images with buildx
11 changes: 9 additions & 2 deletions framework/docker.go
Original file line number Diff line number Diff line change
Expand Up @@ -418,18 +418,25 @@ func BuildImageOnce(once *sync.Once, dctx, dfile, nameAndTag string, buildArgs m

func BuildImage(dctx, dfile, nameAndTag string, buildArgs map[string]string) error {
dfilePath := filepath.Join(dctx, dfile)

if os.Getenv("CTF_CLNODE_DLV") == "true" {
commandParts := []string{"docker", "build", "--build-arg", `GO_GCFLAGS=all=-N -l`, "--build-arg", "CHAINLINK_USER=chainlink", "--build-arg", "CL_INSTALL_PRIVATE_PLUGINS=false"}
commandParts := []string{"docker", "buildx", "build", "--build-arg", `GO_GCFLAGS=all=-N -l`, "--build-arg", "CHAINLINK_USER=chainlink"}
for k, v := range buildArgs {
commandParts = append(commandParts, "--build-arg", fmt.Sprintf("%s=%s", k, v))
}
if os.Getenv("GITHUB_TOKEN") != "" {
commandParts = append(commandParts, "--secret", "id=GIT_AUTH_TOKEN,env=GITHUB_TOKEN")
}
Comment on lines +427 to +429
Copy link

Copilot AI Mar 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

docker build --secret ... requires BuildKit; on environments where BuildKit isn't the default, this will fail with "unknown flag: --secret" whenever GITHUB_TOKEN is set (e.g., GitHub Actions). Consider explicitly enabling BuildKit for this invocation (e.g., setting DOCKER_BUILDKIT=1 on the exec.Cmd env) or using a BuildKit-aware builder (docker buildx build), and/or gating --secret behind a BuildKit check.

Copilot uses AI. Check for mistakes.
commandParts = append(commandParts, "-t", nameAndTag, "-f", dfilePath, dctx)
return RunCommand(commandParts[0], commandParts[1:]...)
}
commandParts := []string{"docker", "build", "--build-arg", "CHAINLINK_USER=chainlink", "--build-arg", "CL_INSTALL_PRIVATE_PLUGINS=false"}
commandParts := []string{"docker", "buildx", "build", "--build-arg", "CHAINLINK_USER=chainlink"}
for k, v := range buildArgs {
commandParts = append(commandParts, "--build-arg", fmt.Sprintf("%s=%s", k, v))
}
if os.Getenv("GITHUB_TOKEN") != "" {
commandParts = append(commandParts, "--secret", "id=GIT_AUTH_TOKEN,env=GITHUB_TOKEN")
}
Comment on lines +437 to +439
Copy link

Copilot AI Mar 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same issue as above: adding --secret will break builds on hosts where BuildKit isn't enabled by default. Prefer explicitly enabling BuildKit for this build command or using a BuildKit builder before appending --secret.

Copilot uses AI. Check for mistakes.
commandParts = append(commandParts, "-t", nameAndTag, "-f", dfilePath, dctx)
return RunCommand(commandParts[0], commandParts[1:]...)
}
Expand Down
Loading