Skip to content

Commit 4dc13d8

Browse files
committed
Clarify tty requirement for watch mode in README
1 parent bece7d4 commit 4dc13d8

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

README.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,19 +14,25 @@ No more **Node.JS**. No more **manual downloads of the CLI**.
1414
tailwindcss:
1515
# You can also use pinned versions, e.g. `:4.1.7`
1616
image: ghcr.io/scriptogre/tailwindcss:latest
17+
tty: true # Required for watch mode
1718
volumes:
1819
- .:/app
1920
command: -i ./input.css -o ./output.css --watch
2021
```
2122

22-
3. Or run `docker run` command:
23+
3. Or run `docker run` command (note the `-t` flag is required for watch mode):
2324
```bash
24-
docker run \
25+
docker run -t \
2526
-v "$(pwd)":/app \
26-
ghcr.io/scriptogre/tailwindcss:latest \
27+
ghcr.io/scriptogre/tailwindcss:latest \
2728
-i ./input.css -o ./output.css --watch
2829
```
2930

31+
### **Watch Mode Requirement**
32+
- For watch mode (`--watch`), you must:
33+
- In `docker-compose.yml`: Set `tty: true`
34+
- In `docker run`: Use the `-t` flag
35+
- Without these, the container will exit after the first build
3036

3137
### **Notes:**
3238
- Make sure you mount all source files (`*.html`, `*.css`, `*.js`, …) to `/app`, so Tailwind’s watcher can see them within the container.

0 commit comments

Comments
 (0)