瀏覽代碼

Use amd64 for Docker images by default

Mohammed Nafees 4 年之前
父節點
當前提交
5ca4afdc41
共有 2 個文件被更改,包括 3 次插入1 次删除
  1. 1 0
      cli/cmd/docker/agent.go
  2. 2 1
      cli/cmd/docker/builder.go

+ 1 - 0
cli/cmd/docker/agent.go

@@ -243,6 +243,7 @@ func (a *Agent) getPullOptions(image string) (types.ImagePullOptions, error) {
 
 	return types.ImagePullOptions{
 		RegistryAuth: authConfigEncoded,
+		Platform:     "linux/amd64",
 	}, nil
 }
 

+ 2 - 1
cli/cmd/docker/builder.go

@@ -71,7 +71,8 @@ func (a *Agent) BuildLocal(opts *BuildOpts) error {
 		CacheFrom: []string{
 			fmt.Sprintf("%s:%s", opts.ImageRepo, opts.CurrentTag),
 		},
-		Remove: true,
+		Remove:   true,
+		Platform: "linux/amd64",
 	})
 
 	if err != nil {