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

# Run Docker

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

Every boxd machine ships with **Docker Engine**, the **Compose plugin**, and **Buildx** preinstalled. 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 theme={"theme":"github-dark"}
docker run hello-world
docker build -t myimage .
docker compose up -d
```

A boxd machine is a full VM 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 theme={"theme":"github-dark"}
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 forwards to port 8000 by default. Publish a container port there and it's live:

```bash theme={"theme":"github-dark"}
docker run -d -p 8000:80 nginx
# https://myapp.boxd.sh now serves the container
```

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

```bash theme={"theme":"github-dark"}
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) or [snapshot](/guides/snapshots) 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) 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.
