Commit c4a1a83
authored
Configure devcontainer Dockerfile with dynamic build args for proxy package indexes (#1321)
## Summary
Adds a `.devcontainer/Dockerfile` and updates `devcontainer.json` to
support dynamic build arguments, allowing the dev container base image
and package index URLs (npm, pip, uv) to be overridden from the local
environment. This enables building the dev container behind a corporate
proxy or against internal package mirrors without editing tracked files.
## Changes
- **`.devcontainer/Dockerfile`** (new): Accepts `BASE_IMAGE`,
`NPM_CONFIG_REGISTRY`, `PIP_INDEX_URL`, and `UV_DEFAULT_INDEX` build
args, each falling back to public defaults when unset.
- **`.devcontainer/devcontainer.json`**: Switches from a static `image`
reference to a `build` block that forwards the corresponding
`${localEnv:*}` values into the Dockerfile build args.
## Why
Contributors on networks that require proxied or mirrored package
registries can now set the relevant environment variables locally and
have the dev container build against them, while the defaults preserve
the existing public behavior for everyone else.1 parent ab66edd commit c4a1a83
2 files changed
Lines changed: 20 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
7 | 15 | | |
8 | 16 | | |
9 | 17 | | |
| |||
0 commit comments