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 6c4b1f9
Browse filesBrowse the repository at this point in the historyBrowse files
fix(cli)!: build a Dockerfile configuration in one build as the reference does
build and up built a Dockerfile configuration in two steps: the user's
Dockerfile with --target <stage> (written as
<Dockerfile>.devcontainer.build next to it when its final stage had no
name), then, with Features, a second build FROM that image. The file
in the workspace failed a read-only workspace and was left behind on
an interrupted build, the intermediate image changed layering and the
cache, and --push/--output were dropped from the base build.
As the reference CLI's buildAndExtendImage, the CLI now writes one
combined Dockerfile-with-features (the user's Dockerfile, its final
stage named, then the dev_containers_target_stage stage that installs
the Features and writes the devcontainer.metadata LABEL, or only the
label with no Features) into the Features folder under the cache
folder, and runs one build with --target dev_containers_target_stage.
The Dockerfile and the build arguments are byte-identical to what
v0.90.0 writes and runs for the same configurations. Features and the
lockfile are resolved before the build, as in TS.
The Go-only behavior carries over to the single build: --secrets-file
and --ca-bundle secrets, a sibling <Dockerfile>.dockerignore (#969),
the final stage's own devcontainer.metadata entries (#1225), and build
contexts. build's hidden --omit-syntax-directive now takes effect.
BREAKING CHANGE: up tags a Dockerfile configuration's image with
Features vsc-<folder>-<hash>, as the official CLI does, instead of
vsc-<folder>-<hash>-features; the build no longer writes
<Dockerfile>.devcontainer.build into the workspace. docs/migration.md
lists both.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: docs/parity/parity-matrix.yaml
+28Lines changed: 28 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -1737,6 +1737,34 @@ initial_cases:
1737
1737
current_status: match
1738
1738
notes: "Without build.context the context is the Dockerfile's folder (utils.ts getDockerContextPath: parentURI(getDockerfilePath)), not the configuration's: COPY finds the file next to sub/Dockerfile. Go used the configuration's folder and the COPY failed."
notes: "TS buildAndExtendImage (singleContainer.ts) builds a Dockerfile configuration in one docker build of Dockerfile-with-features, written into the Features folder under the cache folder: the user's Dockerfile with its final stage named, then FROM $_DEV_CONTAINERS_BASE_IMAGE AS dev_containers_target_stage with the devcontainer.metadata LABEL, built with --target dev_containers_target_stage. A read-only workspace builds, nothing is written into it, and the image history ends with that LABEL instruction. Go wrote <Dockerfile>.devcontainer.build next to the Dockerfile (failing here with permission denied), built it with --target <stage> and --label devcontainer.metadata=..., and added Features in a second build."
notes: "As build.read-only-workspace-dockerfile-success, for up: one build of Dockerfile-with-features from the cache folder, so a read-only workspace starts and holds only what it held. Go failed writing <Dockerfile>.devcontainer.build into the workspace."
f.StringVar(&opts.secretsFile, "secrets-file", "", "Path to a JSON file with build secrets ({\"KEY\":\"VALUE\"}); each is passed to BuildKit as a build secret (requires buildx).")
0 commit comments