-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
19 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# Gotchas | ||
|
||
Forge mounts the user's `docker.sock` into each container that it runs to grant subprocesses access to Docker by default. This feature can be disabled like so: | ||
|
||
```sh | ||
forge --no-dind ... | ||
``` | ||
|
||
However, subprocesses that try to use references to the filesystem when interacting with Docker will run into problems. For example, the following would behave unexpectedly: | ||
|
||
```sh | ||
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: | ||
|
||
```sh | ||
forge --use-sock ... | ||
``` |