Skip to content

Commit

Permalink
fix arm build issues with docker and go
Browse files Browse the repository at this point in the history
  • Loading branch information
runz0rd committed May 11, 2022
1 parent 4f01f59 commit 5f44c50
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion delve.go
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ func (g Grapple) deployBin(ctx context.Context, pod, container, goModPath, sourc
relInputs = append(relInputs, strings.TrimPrefix(sourcePath, goModPath+string(filepath.Separator)))
}

_, errBuild := g.goCmd.Build(goModPath, binSource, relInputs, "-gcflags", "-N -l").Env("GOOS=linux").Run(ctx)
_, errBuild := g.goCmd.Build(goModPath, binSource, relInputs, "-gcflags", "-N -l").Env("GOOS=linux", "GOARCH=amd64").Run(ctx)
if errBuild != nil {
return errBuild
}
Expand Down
3 changes: 2 additions & 1 deletion patch.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,8 @@ func (g Grapple) Patch(repo, image, tag, container string, mounts []Mount) error
pathedImageName := g.patchedImageName(repo)
g.l.Infof("building patch image with %v:%v", pathedImageName, tag)
_, err = g.dockerCmd.Build(theHookPath, "--build-arg",
fmt.Sprintf("IMAGE=%v:%v", image, tag), "-t", pathedImageName).Run(ctx)
fmt.Sprintf("IMAGE=%v:%v", image, tag), "-t", pathedImageName,
"--platform", "linux/amd64").Run(ctx)
if err != nil {
return err
}
Expand Down

0 comments on commit 5f44c50

Please sign in to comment.