You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 5aa1dc3
Browse filesBrowse the repository at this point in the historyBrowse files
refactor(cli): take --ca-bundle on build and up only
run-user-commands took a bundle path, checked it held PEM, and then
used it only as a switch: the variables it set point at the copy up
bound into the container, never at the file given. up --ca-bundle
already puts those variables in the container's environment, which the
lifecycle commands inherit through the user-env probe, so the flag
added nothing. The flag has not been released, so nothing depends on it.
run-user-commands now rejects --ca-bundle as an unknown flag, and the
e2e test checks that its postAttachCommand trusts the proxy's CA with
no flag at all.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: docs/go-only-features.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -213,14 +213,14 @@ devcontainer up --workspace-folder . --ca-bundle /run/proxy/ca-bundle.crt
213
213
214
214
The file is a full PEM bundle: the system CAs plus the extra ones, since some tools
215
215
replace the system pool with the file instead of adding to it. A file with no PEM
216
-
certificate is refused. `build`, `up`and `run-user-commands` take the flag.
216
+
certificate is refused. `build`and `up` take the flag.
217
217
218
218
| Where | What happens |
219
219
| --- | --- |
220
220
| Feature install (`build`, `up`) | Every Feature's install `RUN` mounts the bundle as the BuildKit secret `devcontainer-ca-bundle` at `/run/devcontainer/ca-bundle.crt`, and runs `install.sh` with `SSL_CERT_FILE`, `NODE_EXTRA_CA_CERTS`, `REQUESTS_CA_BUNDLE`, `CURL_CA_BUNDLE` and `GIT_SSL_CAINFO` pointing at it, for that `RUN` only. |
221
221
| Your Dockerfile (`build`, `up`) | The CLI cannot change your `RUN`s, so it passes the same secret to buildx; a `RUN` opts in by mounting it (below). |
222
222
| Container (`up`) | The bundle is bind-mounted read-only at `/run/devcontainer/ca-bundle.crt` and the five variables are set in the container's environment, over the configuration's `containerEnv`, so lifecycle commands and every shell trust it. |
223
-
|`run-user-commands`|Sets the variables for the lifecycle commands. A running container takes no new mount, so the container must have been created with `up --ca-bundle`; one without the mount is an error. |
223
+
|`run-user-commands`|Takes no flag: the lifecycle commands get the variables from the environment `up --ca-bundle` gave the container. |
224
224
225
225
```dockerfile
226
226
RUN --mount=type=secret,id=devcontainer-ca-bundle,target=/run/devcontainer/ca-bundle.crt \
f.StringVar(&opts.caBundle, "ca-bundle", "", "Set the CA bundle's variables for the lifecycle commands; the container must have been created with `up --ca-bundle`.")
returnwriteErrorResult(out, fmt.Sprintf("--ca-bundle: container %s has no CA bundle at %s; create it with `up --ca-bundle`.", containerID, imagemeta.CABundlePath))
203
-
}
204
195
// The merged configuration is the container's metadata (TS
205
196
// getImageMetadataFromContainer), which records the configuration's entry
0 commit comments