Skip to content

Agent Sandboxing Fails in Dockerized Gateway: "docker: not found" Despite Socket Mount #46

@ChiefORZ

Description

@ChiefORZ

When running the OpenClaw gateway within a Docker container deployed via Coolify, the Sandbox feature fails to initialize. This occurs even when i try to mount the docker socket into the gateway container.

Steps to Reproduce

  1. Configure OpenClaw to run via docker-compose using the coollabsio/openclaw:2026.2.6 image.

  2. Enable agent sandboxing in the openclaw.json configuration file (e.g., agents.defaults.sandbox.mode: "non-main").

  3. Modify the docker-compose.yml to mount the host's Docker socket into the OpenClaw container, as shown below:

    services:
      openclaw:
        image: 'coollabsio/openclaw:2026.2.6'
        volumes:
          - 'openclaw-data:/data'
          - '/var/run/docker.sock:/var/run/docker.sock'
    
    
  4. Restart the services

  5. Attempt to execute a command inside the running openclaw container that would interact with Docker, or run a diagnostic check.

Expected Behavior

The OpenClaw gateway, having access to the host's Docker socket, should be able to create, manage, and use Docker containers for the agent sandbox. The command openclaw doctor should detect the presence of Docker and perform checks on the required sandbox images.

Actual Behavior

The gateway is unable to use the sandboxing feature. Direct attempts to diagnose the issue reveal two key errors:

  1. Executing docker inside the openclaw container fails with the error:
    docker: not found

  2. Running openclaw doctor reports that Docker is unavailable:
    Docker not available; skipping sandbox image checks.

Request for Guidance

We have followed the standard procedure for enabling "Docker-in-Docker" functionality by mounting the host's Docker socket. However, given that the docker client is not found within the coollabsio/openclaw image, we are unable to proceed.

Could you please clarify the intended method for enabling agent sandboxing when deploying OpenClaw via Coolify? Is there a configuration step we have missed to make the Docker client available within the container? Any guidance would be greatly appreciated. 🙏

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions