Skip to content

Commit ca743a3

Browse files
ericc-chopencode
andcommitted
docs(docker): add bind mount example to persist GitHub token in Docker container
- Show how to mount a host directory to /root/.local/share/copilot-api for token persistence - Add explanation and note for clarity 🤖 Generated with [opencode](https://opencode.ai) Co-Authored-By: opencode <noreply@opencode.ai>
1 parent 10ecf03 commit ca743a3

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

README.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,18 @@ docker build -t copilot-api .
5454
Run the container
5555

5656
```sh
57-
docker run -p 4141:4141 copilot-api
57+
# Create a directory on your host to persist the GitHub token and related data
58+
mkdir -p ./copilot-data
59+
60+
# Run the container with a bind mount to persist the token
61+
# This ensures your authentication survives container restarts
62+
63+
docker run -p 4141:4141 -v $(pwd)/copilot-data:/root/.local/share/copilot-api copilot-api
5864
```
5965

66+
> **Note:**
67+
> The GitHub token and related data will be stored in `copilot-data` on your host. This is mapped to `/root/.local/share/copilot-api` inside the container, ensuring persistence across restarts.
68+
6069
### Docker with Environment Variables
6170

6271
You can pass the GitHub token directly to the container using environment variables:

0 commit comments

Comments
 (0)