Mathias Dannesbo
Mathias Dannesbo
You can use `sudo --preserve-env=ZDOTDIR -s`. See [my answer on Ask Different](https://apple.stackexchange.com/a/474065/99827) on why `sudo -E` does not work.
I can consistently reproduce this with: ``` docker build --platform linux/amd64 --no-cache . -f- [internal] load metadata for docker.io/library/ubuntu:22.04 0.4s => [internal] load .dockerignore 0.0s => => transferring context: 2.52kB...