# docker volume create: Create Named Volumes

> How docker volume create works: creating named volumes for persistent data, drivers and labels, and using volumes in CI.

Source: https://latchkey.dev/learn/command-reference/docker-volume-create-command  
Updated: 2026-06-25

Create a named volume for data that should outlive a container.

docker volume create makes a named volume managed by Docker. This page covers drivers, labels, and when a named volume beats a bind mount in CI.

## What it does

docker volume create allocates a named volume in Docker storage area. Containers mount it with -v name:/path. Volumes persist independently of containers and are the preferred way to keep stateful data.

## Common usage

```Terminal
docker volume create pgdata
docker run -d -v pgdata:/var/lib/postgresql/data postgres:16
docker volume create --label ci=true cache
```

## Common errors in CI

Creating a volume that already exists is idempotent and not an error. A common CI mistake is expecting a named volume to be empty when reused across jobs on a persistent runner - it retains data; recreate it or use docker volume rm between runs. For per-job ephemeral data, prefer --rm containers with anonymous volumes or tmpfs.

## FAQ

### docker volume create: Create Named Volumes?

docker volume create makes a named volume managed by Docker. This page covers drivers, labels, and when a named volume beats a bind mount in CI.

### What it does?

docker volume create allocates a named volume in Docker storage area. Containers mount it with -v name:/path. Volumes persist independently of containers and are the preferred way to keep stateful data.

### Common errors in CI?

Creating a volume that already exists is idempotent and not an error. A common CI mistake is expecting a named volume to be empty when reused across jobs on a persistent runner - it retains data; recreate it or use docker volume rm between runs. For per-job ephemeral data, prefer --rm containers with anonymous volumes or tmpfs.

---

Latchkey runs CI/CD that repairs its own failures. Agent entry points: https://latchkey.dev/agent.txt, https://latchkey.dev/openapi.json, https://latchkey.dev/llms.txt
