Building docker images inside instance and /data/docker

Hi,

I’m running a Fly instance that is building docker images, as part of my setup described in Is fly planning instances larger than 8 cores? - #3 by leighmcculloch.

I keep running out of disk space and need to keep deleting images. I attempted to mount a persistent volume that was larger, but it appears the /data/docker directory where docker is writing images to is already a mount of some kind with a small fixed size.

Does Fly mount a persistent volume already for /data/docker? Is there anyway to override it and set a larger size?

Thanks!
Leigh

Your image might already have that directory in it. What does your fly.toml look like?

This is the app I use for my remote Docker daemon: GitHub - fly-apps/docker-daemon: A Docker daemon to run in Fly and access via a WireGuard peer.

In fly.toml, you’ll see that it mounts the volume to /data, and then the Docker config specifies /data/docker:

There’s a script in there that creates the /data/docker directory if necessary: docker-daemon/docker at main · fly-apps/docker-daemon · GitHub

Thanks, that helped. I realized I was configuring the /data/docker directory myself too, I’d just forgotten about that. And mounting at /data works a charm.

Another question: I had planned to have two mounts, but looks like only one persistent volume is supported now. Is that right?

Yes, that’s right. We currently can’t mount more than one volume per VM.

1 Like