From a51798f1b60a9ee5df71fd773b15ff51e54716ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=A5=E6=B5=A9?= Date: Sun, 8 Mar 2026 17:51:12 +0800 Subject: [PATCH] Add integration examples Show how to wire the proxy into docker-compose and devcontainer setups without guessing the required mounts and commands. Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode) Co-authored-by: Sisyphus --- examples/devcontainer.json | 10 ++++++++++ examples/docker-compose.yml | 16 ++++++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 examples/devcontainer.json create mode 100644 examples/docker-compose.yml diff --git a/examples/devcontainer.json b/examples/devcontainer.json new file mode 100644 index 0000000..6758b3a --- /dev/null +++ b/examples/devcontainer.json @@ -0,0 +1,10 @@ +{ + "name": "app-with-host-git-cred-proxy", + "image": "mcr.microsoft.com/devcontainers/base:ubuntu", + "workspaceFolder": "/workspace", + "workspaceMount": "source=${localWorkspaceFolder},target=/workspace,type=bind,consistency=cached", + "mounts": [ + "source=${localEnv:HOST_GIT_CRED_PROXY_DIR},target=/opt/host-git-cred-proxy,type=bind,readonly" + ], + "postCreateCommand": "/opt/host-git-cred-proxy/container/configure-git.sh --global" +} diff --git a/examples/docker-compose.yml b/examples/docker-compose.yml new file mode 100644 index 0000000..21ff933 --- /dev/null +++ b/examples/docker-compose.yml @@ -0,0 +1,16 @@ +services: + dev: + image: mcr.microsoft.com/devcontainers/base:ubuntu + working_dir: /workspace + command: > + bash -lc " + /opt/host-git-cred-proxy/container/configure-git.sh --global && + sleep infinity + " + tty: true + stdin_open: true + environment: + GIT_CRED_PROXY_URL: ${GIT_CRED_PROXY_URL:-http://host.docker.internal:18765} + volumes: + - .:/workspace + - ${HOST_GIT_CRED_PROXY_DIR}:/opt/host-git-cred-proxy:ro