I’m trying to create a pi-hole instance with persistent storage.
This is the contents of my Dockerfile:
FROM pihole/pihole:latest
ENV INTERFACE eth0
ENV DNSMASQ_LISTENING ALL
ENV DNSMASQ_USER=root
ENTRYPOINT [ \
"unshare", "--pid", "--fork", "--kill-child=SIGTERM", "--mount-proc", \
"perl", "-e", "$SIG{INT}=''; $SIG{TERM}=''; exec @ARGV;", "--", \
"/s6-init" ]
My fly.toml is
app = "flyhole-pihole"
primary_region = "atl"
This is the command I’m using to run:
fly machine run . \
--volume /pihole_flyio_volume/:/etc/ \
--port 53/tcp \
--port 53/udp \
--port 80/tcp
-e TZ=America/New_York \
-e WEBPASSWORD="randompassword" \
--region atl
-a flyhole-pihole
The error I get is:
Error: not enough unattached volumes for 'foobar_volume'
This is what I see when I do ‘fly volumes list’:
ID STATE NAME SIZE REGION ZONE ENCRYPTED ATTACHED VM CREATED AT
vol_od56vjp98lmvny30 created pihole_flyio_volume 1GB atl c3f1 true 7 minutes ago
vol_e628r6gxelpvwmnp created pihole_flyio_volume 1GB atl ca2c true 12 minutes ago
Initially I had only one volume, but it gave the same error. I thought I’d create another because 2 VMs get created.
I’ve also tried a fly.toml like:
app = "flyhole-pihole"
primary_region = "atl"
[[mounts]]
source = "pihole_flyio_volume"
destination = "/pihole_flyio_volume"
[[services]]
protocol = "tcp"
internal_port = 80
[[services.ports]]
port = 80
[[services]]
protocol = "udp"
internal_port = 53
[[services.ports]]
port = 53
But I got the same error. Any ideas to what is causing this error?