{"id":"c952a3e30a31ca9e","repo":"docker/cli","slug":"copying-config-json-into-container-failed-w","errorCode":null,"errorMessage":"copying config.json into container failed: %w","messagePattern":"copying config\\.json into container failed: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cli/command/container/create.go","lineNumber":432,"sourceCode":"\t\tSize: int64(configBuf.Len()),\n\t\tMode: 0o600,\n\t})\n\n\tif _, err := io.Copy(tarWriter, &configBuf); err != nil {\n\t\t_ = tarWriter.Close()\n\t\treturn fmt.Errorf(\"writing config to tar file for config copy: %w\", err)\n\t}\n\n\tif err := tarWriter.Close(); err != nil {\n\t\treturn fmt.Errorf(\"closing tar for config copy failed: %w\", err)\n\t}\n\n\t_, err := apiClient.CopyToContainer(ctx, containerID, client.CopyToContainerOptions{\n\t\tDestinationPath: \"/\",\n\t\tContent:         &tarBuf,\n\t})\n\tif err != nil {\n\t\treturn fmt.Errorf(\"copying config.json into container failed: %w\", err)\n\t}\n\n\treturn nil\n}\n","sourceCodeStart":414,"sourceCodeEnd":437,"githubUrl":"https://github.com/docker/cli/blob/e9452d6e785f6e365712b9d71bd7517591773c86/cli/command/container/create.go#L414-L437","documentation":"Error \"copying config.json into container failed: %w\" thrown in docker/cli.","triggerScenarios":"Thrown at cli/command/container/create.go:432 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"analyzedSha":"e9452d6e785f6e365712b9d71bd7517591773c86","analyzedAt":"2026-08-01T07:09:22.474Z","schemaVersion":2}