# Does cloudflare/computer Support Docker? First-Class Container Integration Explained

> Yes cloudflarecomputer offers first class Docker support running the computerd daemon in containers with prebuilt images automated scripts and a container backend example.

- Repository: [Cloudflare/computer](https://github.com/cloudflare/computer)
- Tags: how-to-guide
- Published: 2026-08-09

---

**Yes, cloudflare/computer provides first-class Docker support, designed to run the `computerd` daemon inside containers with pre-built Linux-x64 images, automated build scripts, and a complete container backend example.**

The cloudflare/computer repository is an experimental project that brings secure, sandboxed computing to Cloudflare's edge. If you're wondering whether cloudflare/computer supports Docker, the answer is definitively yes—Docker is not merely supported but is a core execution environment for the `computerd` daemon, enabling full Linux userland capabilities with FUSE filesystem mounting and real binary execution.

## How cloudflare/computer Uses Docker

The architecture treats Docker as a primary deployment target rather than an optional add-on. The `computerd` binary is specifically packaged to run inside a Linux container, providing the necessary isolation and system libraries for sandboxed execution.

### The computerd Daemon Container

At the heart of the implementation is the **`computer-computerd-linux-x64`** package, which produces a pre-built Linux-x64 Docker image. This image contains the `computerd` executable along with the required **libfuse** library, making it ready to use as a container backend runtime. The Dockerfile located at `packages/computer-computerd-linux-x64/Dockerfile` defines this environment, ensuring the daemon has access to the full Linux userland needed for networking and filesystem operations.

### FUSE and Linux Userland Support

Unlike typical edge computing environments, the Docker image provides real binary execution capabilities through **FUSE mounting**. The container mounts a virtual filesystem via FUSE, allowing the `computerd` daemon to interact with a persistent file system while maintaining security boundaries. This setup enables the execution of native Linux binaries inside the container, orchestrated through WebSocket connections via the capnweb RPC channel.

## Building the Docker Image

The repository includes automated tooling to build and publish the container image. The **`packages/computerd/scripts/build-docker.mjs`** script handles the entire build process, including platform-specific compilation for `linux/amd64`.

To build the Docker image locally:

```bash

# From the repository root

npm run build:docker --workspace @cloudflare/computerd

```

This command executes the build script, which runs `docker build --platform linux/amd64` and prepares the image. For publishing to the GitHub Container Registry, the repository provides:

```bash
npm run publish:docker --workspace @cloudflare/computerd

```

This pushes the image to `ghcr.io/cloudflare/computer-computerd-linux-x64:<version>`, making it available for production deployments.

## Running the Container Backend Example

The **`examples/container`** directory demonstrates a complete integration pattern where a Cloudflare Worker and Durable Object launch and manage the Docker container. This example exposes a simple HTTP surface supporting `write`, `read`, and `exec` operations.

The architecture follows this flow:

```

client → Worker /c/<name> → DO (ContainerExample) → Container → computerd (:8080)
                     ↖───────────────────── capnweb WebSocket ──────↗

```

To run the development instance:

```bash
npm run dev --workspace @example/computer-container

```

This starts a local Wrangler dev server that automatically pulls the `ghcr.io/cloudflare/computer-computerd-linux-x64` image if not present locally.

Once running, interact with the container through HTTP endpoints:

```bash

# Write a file to the container

echo "hello world" | curl -X PUT --data-binary @- http://127.0.0.1:8787/c/demo/file/workspace/hello.txt

# Read the file back

curl http://127.0.0.1:8787/c/demo/file/workspace/hello.txt

# Execute a command inside the container

curl -X POST http://127.0.0.1:8787/c/demo/exec \
  -H 'content-type: application/json' \
  -d '{"command":"cat /workspace/hello.txt && uname -a","encoding":"utf8"}'

```

## Docker-Based Testing and Development

The repository leverages Docker for end-to-end testing through automated test harnesses. The **[`packages/computer/vitest.config.harness.ts`](https://github.com/cloudflare/computer/blob/main/packages/computer/vitest.config.harness.ts)** file configures Vitest to detect Docker availability and spin up the container image for integration tests. When Docker is present, the test suite runs against the actual containerized environment; when absent, tests skip gracefully.

The shell script at **[`packages/computer/test-harness/run-harness.sh`](https://github.com/cloudflare/computer/blob/main/packages/computer/test-harness/run-harness.sh)** orchestrates the Docker lifecycle during continuous integration, ensuring consistent test environments across development machines and CI pipelines.

For ad-hoc experimentation, the top-level **`script/shell`** helper provides quick access to an interactive container:

```bash
./script/shell

```

This launches `docker run --rm -it` with the pre-built `computerd` binary, allowing immediate interaction with the daemon for debugging or exploration.

## Summary

- **First-class Docker support**: The `computerd` daemon is designed specifically to run inside Docker containers, with official images published to GitHub Container Registry.
- **Pre-built Linux-x64 images**: The `computer-computerd-linux-x64` package provides ready-to-use images with libfuse support at `packages/computer-computerd-linux-x64/Dockerfile`.
- **Automated build tooling**: The `build-docker.mjs` script and npm workspaces enable simple image building via `npm run build:docker`.
- **Complete integration example**: The `examples/container` demo shows production-ready patterns using Workers, Durable Objects, and Docker with WebSocket RPC communication.
- **Integrated testing**: Test harnesses in [`packages/computer/vitest.config.harness.ts`](https://github.com/cloudflare/computer/blob/main/packages/computer/vitest.config.harness.ts) and [`run-harness.sh`](https://github.com/cloudflare/computer/blob/main/run-harness.sh) validate functionality against real Docker containers.

## Frequently Asked Questions

### Does cloudflare/computer require Docker to run?

No, Docker is not strictly required for all operations, but it is the primary supported environment for running the `computerd` daemon in production scenarios. The repository includes test harnesses that skip Docker-dependent tests when the daemon is not available, allowing development to proceed without containerization. However, to access the full Linux userland, FUSE filesystem mounting, and binary execution capabilities, Docker is the recommended and supported runtime.

### What Docker image does cloudflare/computer use?

The project uses the **`ghcr.io/cloudflare/computer-computerd-linux-x64`** image, which is built from the Dockerfile in `packages/computer-computerd-linux-x64/Dockerfile`. This image contains the statically linked `computerd` binary and necessary libfuse dependencies. The image is automatically built and published through the `build-docker.mjs` script located in `packages/computerd/scripts/`.

### How does the container backend communicate with Cloudflare Workers?

Communication flows through a **capnweb WebSocket** channel. The Worker receives HTTP requests and forwards them to a Durable Object (ContainerExample), which manages the Docker container lifecycle. Inside the container, the `computerd` daemon listens on port 8080 and communicates via Cap'n Proto over WebSockets, enabling bidirectional RPC between the edge Worker and the sandboxed container environment.

### Can I run cloudflare/computer locally without Docker?

While the core TypeScript packages can run in local development mode via Wrangler, the `computerd` daemon itself requires a Linux environment with FUSE support to function fully. The `script/shell` helper and container backend example both rely on Docker to provide this environment consistently across macOS, Windows, and Linux development machines. Without Docker, you lose the ability to execute native binaries and mount virtual filesystems.