diff --git a/DOCKER_HUB.md b/DOCKER_HUB.md index ef2a1bb..e6ec49f 100644 --- a/DOCKER_HUB.md +++ b/DOCKER_HUB.md @@ -148,7 +148,21 @@ When a config file is mounted, the `OPENCODE_PROVIDER` auto-config is skipped. ## Using docker-compose -Create a `docker-compose.yml`: +Create a `docker-compose.yml` and a `.env` file in the same directory: + +```bash +mkdir opencode-devbox && cd opencode-devbox +``` + +`.env` — your secrets and settings (never commit this): + +```bash +ANTHROPIC_API_KEY=sk-ant-... +GIT_USER_NAME=Your Name +GIT_USER_EMAIL=you@example.com +``` + +`docker-compose.yml`: ```yaml services: @@ -176,6 +190,8 @@ volumes: devbox-data: ``` +Docker Compose automatically loads `.env` from the same directory as the compose file. The `${VAR}` references are substituted with values from `.env`. + Then: ```bash