Docker containers lose all data when they stop unless you configure external storage. Archil gives
your containers persistent, elastic storage backed by S3 — no need to provision volumes or manage
EBS snapshots.
There are two ways to use Archil with Docker:
- Bind mount (recommended): mount an Archil disk on the host, then bind-mount the directory into the container
- FUSE inside the container: run a privileged container that mounts Archil directly
The bind mount approach is simpler and doesn’t require elevated container privileges.
Option 1: Bind mount from host
First, install Archil and mount a disk on the host:
curl https://archil.com/install | sh
sudo mkdir -p /mnt/archil
export ARCHIL_MOUNT_TOKEN="<token>"
sudo --preserve-env=ARCHIL_MOUNT_TOKEN archil mount <disk-name> /mnt/archil --region aws-us-east-1
Then start your container with a bind mount:
docker run -v /mnt/archil:/data myimage
Your application inside the container reads and writes to /data as a normal filesystem. Archil
handles caching on fast SSD storage and synchronizing to S3 in the background.
Docker Compose
services:
app:
image: myimage
volumes:
- /mnt/archil:/data
Option 2: FUSE inside the container
If you need the Archil mount to live entirely inside the container, you can run a privileged container
with the FUSE device:
docker run --privileged --device /dev/fuse \
-e ARCHIL_MOUNT_TOKEN="<token>" \
myimage
Inside the container, install and mount Archil as usual:
curl https://archil.com/install | sh
mkdir -p /mnt/archil
archil mount <disk-name> /mnt/archil --region aws-us-east-1
Running containers with --privileged grants full host access. Use this approach only in trusted
environments. For production, prefer the bind mount approach or the Archil CSI driver for Kubernetes.
Kubernetes
For production Kubernetes deployments, use the Archil CSI driver instead.
The CSI driver manages Archil mounts as native Kubernetes persistent volumes, so your pods get Archil
storage without privileged containers or host mounts.