I'm trying to build a docker image for cc-switch-cli proxy, but facing some issues, and want to get some advices from everybody.
The plan is:
When build docker image:
- Download and add cc-switch (cli) into /usr/local/bin
- Add provider
- Do not hardcode api_key into docker image
- Use foreground to launch cc-switch proxy
The issues I'm facing are:
- How to add provider during docker build. Currently adding provider is an inactive operation. I can find most close one is: "cc-switch add provider -a codex --template deepseek", but still need to provider more information during an inactive session. Cannot be done during docker image build.
- How to use API_KEY from env? without provide a deepseek api key, it will not allow to create provider. This is not secure for docker image.
- How to start proxy without codex. When I try to run launch proxy with command "cc-switch proxy serve --takeover codex", it complaining "Error: write Codex live config failed: Codex model catalog template
gpt-5.5 not found. Please start Codex once so models_cache.json is available, or ensure the codex CLI is on PATH.". Without codex cli, it will refuse to start.
Ideally, cc-switch proxy should be run in a separate docker container, which has no codex installed. I know this may requires cc-switch change to support, but maybe I missed something?
I'm trying to build a docker image for cc-switch-cli proxy, but facing some issues, and want to get some advices from everybody.
The plan is:
When build docker image:
The issues I'm facing are:
gpt-5.5not found. Please start Codex once so models_cache.json is available, or ensure thecodexCLI is on PATH.". Without codex cli, it will refuse to start.Ideally, cc-switch proxy should be run in a separate docker container, which has no codex installed. I know this may requires cc-switch change to support, but maybe I missed something?