I'm not a Docker or sed
expert, but I tried to find what is the issue.
Maybe someone with more knowledge on these fields could correct me if I'm wrong.
Apparently there is a problem between sed
4.7 and the filesystem used by Docker Desktop (MacOS and Windows).
Pi-hole image uses sed
4.7 (from Debian Bullseye).
Some sed
versions (>= 4.2.1 and < 4.8) have a problem with temporary files permissions in some filesystems.
You are using a bind mount to your MacOS filesystem (I think Docker Desktop uses overlay2
storage driver in this case), causing the sed
problem.
There is no permission issue on the files, but in some cases sed
is creating temporary files with invalid permissions.
The issue was fixed in sed 4.8 Bug fixes (details), but older versions won't be able to handle temporary files.
I think the solution here is to use a named docker volume.