Gotchas ΒΆ
Forge mounts the user's docker.sock
as well as envrionment variables to point Docker clients to it into each container that it runs to grant subprocesses access to Docker by default. This feature can be disabled like so:
forge --no-dind ...
Subprocesses that try to use references to the filesystem when interacting with Docker will run into problems. For example, the following would behave unexpectedly:
docker run -v /src:/dst ...
This is because the subprocess would likely be using references to the container's filesystem while Docker will interpret them as references to the host's filesystem. Forge provides a mechanism that can be enabled to mitigate this shortcoming by intercepting traffic to the mounted docker.sock
and translating references to mounted directories from the host on the container's filesystem into the host's filesystem equivalent. While this mechanism is not quite stable, it can be enabled as follows:
forge --fix-dind ...