zed-industries/zed · error · anyhow::Error

docker_command_error(self.docker_cli(), subcommand, args, &S

Error message

docker_command_error(self.docker_cli(), subcommand, args, &String::from_utf8_lossy(&output.stderr))

What it means

Raised in run_docker_command when a docker CLI invocation (docker <subcommand> <args...>) exits with a non-zero status. The command's stderr is captured and formatted via docker_command_error, which builds a human-readable message (command line with secrets redacted plus stderr) describing why the docker operation — typically a docker exec against the remote server container — failed.

Source

Thrown at crates/remote/src/transport/docker.rs:523

    async fn run_docker_command(
        &self,
        subcommand: &str,
        args: &[impl AsRef<str>],
    ) -> Result<String> {
        let mut command = util::command::new_command(self.docker_cli());
        command.arg(subcommand);
        for arg in args {
            command.arg(arg.as_ref());
        }
        let output = command.output().await?;
        log::debug!(
            "{}: {:?}",
            redact_arguments(self.docker_cli(), subcommand, args),
            output.status
        );
        if !output.status.success() {
            anyhow::bail!(docker_command_error(
                self.docker_cli(),
                subcommand,
                args,
                &String::from_utf8_lossy(&output.stderr),
            ));
        }
        Ok(String::from_utf8_lossy(&output.stdout).to_string())
    }

    fn docker_exec_arguments(
        &self,
        inner_program: &str,
        working_directory: Option<&str>,
        env: &HashMap<String, String>,
        program_args: &[impl AsRef<str>],
    ) -> Vec<String> {
        let mut args = match working_directory {
            Some(dir) => vec!["-w".to_string(), dir.to_string()],

View on GitHub (pinned to 5a9b9558db)

Solutions

  1. Inspect the included stderr text; common causes are the container not running, the image missing, or permission problems with the docker socket
  2. Verify the docker CLI binary path and that the docker daemon is reachable from the machine running Zed
  3. Re-run the printed docker command manually to reproduce the failure and act on docker's own error message
  4. If the failure is transient (daemon starting up), retry the remote connection after the docker daemon is healthy
Defensive patterns

Strategy: try-catch

When it happens

Trigger: Thrown at crates/remote/src/transport/docker.rs:523 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of zed-industries/zed@5a9b9558db (2026-09-05). Data as JSON: /api/errors/77e2378b0cf3478b. Report an issue: GitHub.