{"record":{"id":"505ab72adc8a862b","repo":"zed-industries/zed","slug":"neither-curl-nor-wget-is-available","errorCode":null,"errorMessage":"Neither curl nor wget is available","messagePattern":"Neither curl nor wget is available","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/remote/src/transport/docker.rs","lineNumber":633,"sourceCode":"\n                log::info!(\"curl is not available, trying wget\");\n                match self\n                    .run_docker_exec(\n                        \"wget\",\n                        Some(remote_dir_for_server),\n                        &Default::default(),\n                        &[url, \"-O\", &tmp_path_gz.display(self.path_style())],\n                    )\n                    .await\n                {\n                    Ok(_) => {}\n                    Err(e) => {\n                        if self\n                            .run_docker_exec(\"which\", None, &Default::default(), &[\"wget\"])\n                            .await\n                            .is_ok()\n                        {\n                            return Err(e);\n                        } else {\n                            anyhow::bail!(\"Neither curl nor wget is available\");\n                        }\n                    }\n                }\n            }\n        }\n        Ok(())\n    }\n\n    fn kill_inner(&self) -> Result<()> {\n        if let Some(pid) = self.proxy_process.lock().take() {\n            if let Ok(_) = util::command::new_command(\"kill\")\n                .arg(pid.to_string())\n                .spawn()\n            {\n                Ok(())\n            } else {","sourceCodeStart":615,"sourceCodeEnd":651,"githubUrl":"https://github.com/zed-industries/zed/blob/5a9b9558db01a6b906cec2fb70a797affdc58cdd/crates/remote/src/transport/docker.rs#L615-L651","documentation":"To provision the remote server inside a container, Zed downloads the release with `curl -fL <url> -o <tmp>` over docker exec; if that fails and `which curl` also fails, it retries with wget, and only when `which wget` fails too does it bail. The container image simply ships no HTTP download tool.","triggerScenarios":"run_docker_exec('curl', ...) errors because curl is absent, the `which curl` probe fails, the wget attempt also errors, and the `which wget` probe fails — typical of scratch, distroless, or stripped-down images.","commonSituations":"FROM scratch / distroless images containing only the app binary; hardened Chainguard-style images without a package manager; CI images trimmed for size; sidecar containers used as dev environments.","solutions":["Use an image with a downloader: alpine `apk add --no-cache curl`, debian `apt-get update && apt-get install -y curl`","Switch to a fuller tag/base image of the same application and reconnect","Pre-install the zed-remote-server binary into the image so no in-container download is needed","With a dev-channel Zed, set ZED_BUILD_REMOTE_SERVER so the server is uploaded from the local machine instead of downloaded"],"exampleFix":"# before\nFROM scratch\nCOPY app /app\n\n# after\nFROM alpine\nRUN apk add --no-cache curl\nCOPY app /app","handlingStrategy":"fallback","validationCode":"async fn container_has_download_tool(conn: &DockerExecConnection) -> bool {\n    conn.run_docker_exec(\"which\", None, &Default::default(), &[\"curl\"])\n        .await\n        .is_ok()\n        || conn.run_docker_exec(\"which\", None, &Default::default(), &[\"wget\"])\n            .await\n            .is_ok()\n}","typeGuard":null,"tryCatchPattern":"if let Err(e) = download_result {\n    if e.to_string().contains(\"Neither curl nor wget\") {\n        // fallback: upload the server binary from the local machine (ZED_BUILD_REMOTE_SERVER)\n        // or ask the user to switch to an image with curl/wget\n    }\n    return Err(e);\n}","preventionTips":["Standardize dev-container images on alpine/debian with curl installed","Pre-install zed-remote-server into the image so no download is needed","Keep a ZED_BUILD_REMOTE_SERVER build available to switch from download to upload"],"tags":["docker","container","curl","wget","missing-tool"],"backgroundTag":"missing-download-tool","analyzedSha":"5a9b9558db01a6b906cec2fb70a797affdc58cdd","analyzedAt":"2026-08-20T19:29:52.058Z","contentChangedAt":"2026-08-20T19:29:52.058Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}