Skip to content

Commit 38767ac

Browse files
committed
docs: enhance Docker usage instructions in README 📚
- Expand Docker instructions with additional options and environment variables - Add note about write access for --commit option - Include --yes option tip
1 parent 7ed5507 commit 38767ac

File tree

1 file changed

+23
-6
lines changed

1 file changed

+23
-6
lines changed

README.md

+23-6
Original file line numberDiff line numberDiff line change
@@ -66,14 +66,31 @@ You can also utilise the Docker image without installing the binary executable f
6666
Simply enter the subsequent command or reference the `compose.yaml` file.
6767

6868
```bash
69-
docker run --rm ghcr.io/mingcheng/aigitcommit:latest \
70-
-v .:\repo:ro \
71-
-e OPENAI_API_BASE='<openai api base>' \
72-
-e OPENAI_API_TOKEN='<token>' \
73-
-e OPENAI_MODEL_NAME='<model name>'
69+
docker run \
70+
--rm \
71+
-v $PWD:/repo:ro \
72+
-e OPENAI_API_BASE='<api base>' \
73+
-e OPENAI_API_TOKEN='<api token>' \
74+
-e OPENAI_MODEL_NAME='<model name>' \
75+
-e OPENAI_API_PROXY='<the proxy address if you need>' \
76+
ghcr.io/mingcheng/aigitcommit
7477
```
7578

76-
Notice: If you wish to utilise the `--commit` option, you must ensure that the `/repo` directory is writable.
79+
Notice: If you wish to utilise the `--commit` option, you must ensure that the `/repo` directory is writable:
80+
81+
```bash
82+
docker run \
83+
--rm \
84+
-it \
85+
-v $PWD:/repo:rw \
86+
-e OPENAI_API_BASE='<api base>' \
87+
-e OPENAI_API_TOKEN='<api token>' \
88+
-e OPENAI_MODEL_NAME='<model name>' \
89+
-e OPENAI_API_PROXY='<the proxy address if you need>' \
90+
ghcr.io/mingcheng/aigitcommit --commit
91+
```
92+
93+
Tips: You can add `--yes` options to skip the confirm.
7794

7895
### Git Hook
7996

0 commit comments

Comments
 (0)