{"record":{"id":"1dca2d28871c8884","repo":"CanineHQ/canine","slug":"docker-build-failed-e-message","errorCode":null,"errorMessage":"Docker build failed: #{e.message}","messagePattern":"Docker build failed: #(.+?)","errorType":"exception","errorClass":"RuntimeError","httpStatus":null,"severity":"error","filePath":"app/services/builders/frontends/dockerfile_builder.rb","lineNumber":21,"sourceCode":"\n  def initialize(build)\n    @build = build\n    @project = build.project\n  end\n\n  def build_with_dockerfile(repository_path)\n    metadata_file = File.join(repository_path, \"buildx-metadata.json\")\n    docker_build_command = construct_buildx_command(repository_path, metadata_file: metadata_file)\n\n    # Create a new instance of RunAndLog with the build object as the loggable and killable\n    runner = Cli::RunAndLog.new(build, killable: build)\n\n    # Call the runner with the command (joined as a string since RunAndLog expects a string)\n    runner.call(docker_build_command)\n\n    parse_digest_from_metadata(metadata_file)\n  rescue Cli::CommandFailedError => e\n    raise \"Docker build failed: #{e.message}\"\n  end\n\n  def construct_buildx_command(repository_path, metadata_file: nil)\n    docker_build_command = [\n      \"docker\",\n      \"--context=default\",\n      \"buildx\",\n      \"build\",\n      \"--progress=plain\",\n      \"--platform\", \"linux/amd64\",\n      \"-t\", project.container_image_reference,\n      \"-f\", File.join(repository_path, project.build_configuration.dockerfile_path)\n    ]\n\n    # Add automatic build arguments\n    Builders::Base.automatic_build_args(build).each do |name, value|\n      docker_build_command.push(\"--build-arg\", \"#{name}=#{value}\")\n    end","sourceCodeStart":3,"sourceCodeEnd":39,"githubUrl":"https://github.com/CanineHQ/canine/blob/ba4ee3968d8513ee27d8583fbd3e854a8dd053f3/app/services/builders/frontends/dockerfile_builder.rb#L3-L39","documentation":"Error \"Docker build failed: #{e.message}\" thrown in CanineHQ/canine.","triggerScenarios":"Thrown at app/services/builders/frontends/dockerfile_builder.rb:21 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"ba4ee3968d8513ee27d8583fbd3e854a8dd053f3","analyzedAt":"2026-08-23T17:49:27.834Z","schemaVersion":2},"datasetVersion":"2026-08-23T21:17:23.414Z"}