Repository navigation
Conversation
--ca-bundle <file> on build, up and run-user-commands takes a PEM bundle (the system CAs plus a TLS-intercepting proxy's). Every Feature install RUN mounts it 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. A user Dockerfile is given the same secret id and opts in with RUN --mount. up binds the file read-only at the same path and sets the variables in the container's environment; run-user-commands sets them for the lifecycle commands and refuses a container created without the mount. The bundle is mounted, never copied: no layer, config or history holds it, and its content is outside the cache key, so a rotated CA reuses the cache and builds the same layers. Without buildx it is left out of builds with a warning; a Compose configuration's build takes no secrets, so only its container gets the bundle. up --secrets-file now reaches the Dockerfile's own RUNs too, as build does; it reached only the Features' before. Tests hold a DOCKER_CONFIG off $HOME behind a symlink, and the bridged build auth under TMPDIR, which the docs now say. Closes #50 Co-Authored-By: Claude Opus 5.5 <[email protected]>
The server container ran with --rm and its address came from the bridge network by name, with docker inspect's stderr discarded: on CI the lookup failed with a bare "exit status 1". Keep the container until cleanup, read the address from whatever network it is on, and report the inspect output, the container's state and its logs. Co-Authored-By: Claude Opus 5.5 <[email protected]>
docker run's stderr carries the image pull's progress when the base image is not cached, as on CI; combined with stdout it became part of the container id, and every later docker call on that id failed. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
--ca-bundle <file>onbuild,upandrun-user-commands, plus the tests #50 asks for around secrets on tmpfs.Closes #50
Builds
RUNmounts the bundle as the BuildKit secretdevcontainer-ca-bundleat/run/devcontainer/ca-bundle.crt.install.shruns withSSL_CERT_FILE,NODE_EXTRA_CA_CERTS,REQUESTS_CA_BUNDLE,CURL_CA_BUNDLEandGIT_SSL_CAINFOpointing at it, and the variables apply to thatRUNonly, never as anENV.--secret id=devcontainer-ca-bundle,src=<file>) and opts in withRUN --mount=type=secret,.... This is documented indocs/go-only-features.md.--secrets-fileis. A Compose configuration'sdocker compose buildtakes no secrets, so it also gets a warning.Container
upbind-mounts the file read-only at the same path and sets the five variables over the configuration'scontainerEnv. This covers both single containers and Compose services.run-user-commandssets the variables for the lifecycle commands. A container created without the mount is refused, because a running container cannot take a new mount.Never copied
RUNtext (the secret mount and the variables), so those two builds don't share cache.Also in this change
up --secrets-filenow reaches the user Dockerfile'sRUNs. It reached only the Features' before, which contradicted the issue's item 3.DOCKER_CONFIGoutside$HOMEwith a symlinkedconfig.json, and for the bridged build auth being written underTMPDIR(documented).Tests
RUNs, buildx file secrets, flag validation (a file with no PEM certificate is refused), the env merge, the Compose override and its warning,DOCKER_CONFIGoff$HOME.TestE2E_CABundle: a FeatureRUNand an opted-in DockerfileRUNfail without the flag and pass with it. In the container, curl, node andpostCreateCommandtrust the server. The mount is read-only.run-user-commandsis refused on a container without the bundle.TestE2E_UpSecretsFile: the value reaches a DockerfileRUNandpostCreateCommand, and it is absent from the layers,docker historyand the container's inspect.🤖 Generated with Claude Code