Skip to content

Commit 2eae9cd

Browse files
authored
Adds win batch that implements workaround to watch source files in wi… (#111)
* Adds win batch that implements workaround to watch source files in windows in development mode. See issue #93. * If fails to create venv, then installs in system python. Tested in win computer.
1 parent d42a19c commit 2eae9cd

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

scripts/win-watcher.bat

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
@echo on
2+
:: Run this script to watch changes in files on a windows host.
3+
:: This provides a workaround to overcome a known limitation of docker for windows [1]
4+
::
5+
:: REQUIRES python 3 installed and in the system path
6+
::
7+
:: [1] https://docs.docker.com/docker-for-windows/troubleshoot/#/inotify-on-shared-drives-does-not-work
8+
:: [2] http://blog.subjectify.us/miscellaneous/2017/04/24/docker-for-windows-watch-bindings.html
9+
::
10+
11+
python --version
12+
13+
:: installs tool in a venv (expects python 3)
14+
python -m venv .VENV
15+
16+
if %ERRORLEVEL% EQU 0 (
17+
.VENV/bin/pip install --upgrade pip
18+
.VENV/bin/pip install docker-windows-volume-watcher
19+
:: runs watcher
20+
.VENV/bin/activate
21+
) else (
22+
python -m pip install --upgrade pip
23+
python -m pip install docker-windows-volume-watcher
24+
)
25+
26+
docker-volume-watcher

0 commit comments

Comments
 (0)