Skip to content

Commit 81f60af

Browse files
committed
Problem: Incorrect advice for Windows users
Solution: Instead of advising to use absolute paths, use the WSL2 /mnt/<disk> format. The other parts of the configuration end up being the same as on Linux.
1 parent f40cdb8 commit 81f60af

File tree

1 file changed

+17
-3
lines changed

1 file changed

+17
-3
lines changed

README.md

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -128,13 +128,27 @@ Since Compose Updater works by calling the Compose CLI from within the container
128128

129129
This is why it's important that both sides (e.g. ```/home/docker:/home/docker:ro```) must match, otherwise you may get bind mount errors when an auto update happens.
130130

131-
### Relative Paths with a Windows Host
131+
### Windows Users
132132

133-
If you have a Windows host, unfortunately, there's no way to have the filepaths match up because the formats are completely different. The workaround for this is to make sure all your auto-updating Compose files only use absolute paths (on the host side), especially in your bind mount. For example:
133+
If you have a Windows host, your Docker actually runs inside a WSL2 distro,
134+
which accesses your Windows filesystem via the `/mnt/<disk>` format. Therefore,
135+
your target service compose file's volumes will look something like this:
134136

135137
```yaml
136138
volumes:
137-
- "C:\\Users\\Foobar\\Servers\\TestServer\\data:/data"
139+
- "./data:/data"
140+
- "./config:/config:ro"
141+
labels:
142+
- "docker-compose-watcher.watch=1"
143+
- "docker-compose-watcher.dir=/mnt/c/Users/Foobar/TestServer"
144+
```
145+
146+
While your watcher compose file's volumes will look something like this:
147+
148+
```yaml
149+
volumes:
150+
- "/var/run/docker.sock:/var/run/docker.sock:ro"
151+
- "/mnt/c/Users/Foobar:/mnt/c/Users/Foobar:ro"
138152
```
139153

140154
## Governance and Contribution

0 commit comments

Comments
 (0)