> ## Documentation Index
> Fetch the complete documentation index at: /llms.txt
> Use this file to discover all available pages before exploring further.

# Run Docker

> Docker Engine, Compose, and Buildx come pre-installed on every machine, with the daemon already running.

Every boxd machine ships with **Docker Engine**, the **Compose plugin**, and **Buildx** pre-installed. The daemon starts at boot, and the `boxd` user you land in is in the `docker` group, so `docker` works the moment you connect, without sudo:

```bash
docker run hello-world
docker build -t myimage .
docker compose up -d
```

A boxd machine is a full microVM with its own kernel, so Docker runs the same way it does on any Linux server. Containers, networks, volumes, and builds all behave normally, on the machine's own kernel rather than inside another container.

## Compose

The image carries Compose v2 as a Docker plugin, so the command is `docker compose` with a space:

```bash
docker compose up -d
docker compose logs -f
```

The old standalone `docker-compose` binary is not on the image.

## Reach a container from the internet

The machine's HTTPS domain detects the port your app listens on among the common web ports and falls back to 8000. Publish a container port on 8000 and it's live:

```bash
docker run -d -p 8000:80 nginx
# https://myapp.boxd.sh now serves the container
```

For more ports, add [subdomain proxies](/guides/proxies.md). For databases and other non-HTTP services, add a [raw port forward](/guides/port-forwarding.md):

```bash
docker run -d -p 5432:5432 postgres
boxd machine proxy add --vm myapp --port 5432 --raw
```

## Containers survive fork and snapshot

A [fork](/guides/fork.md) or [snapshot](/guides/snapshots.md) captures the machine's memory and disk together, so running containers come along. Fork a machine with a database container up and the copy has the same container up, data included. [Suspend and resume](/guides/suspend-resume.md) work the same way.

## Disk space

Images, containers, and volumes live under `/var/lib/docker` on the machine's 100 GB disk, shared with everything else on the machine. `docker system prune` reclaims space when builds pile up.
