-
Notifications
You must be signed in to change notification settings - Fork 944
fix(agent): start devcontainers through agentcontainers package #18471
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 1 commit
Commits
Show all changes
25 commits
Select commit
Hold shift + click to select a range
978c871
fix(agent): start devcontainers through agentcontainers package
DanielleMaywood fe99bd6
chore: appease formatter
DanielleMaywood aeae6e2
chore: fix test, appease linter
DanielleMaywood 916f7e8
chore: feedback
DanielleMaywood 53e256b
Merge branch 'main' into dm-devcontainer-log-spam
DanielleMaywood 91bb43a
chore: re-add script timings
DanielleMaywood 81fe11d
fix: change how containerAPI is stored
DanielleMaywood 5c70a8c
Merge branch 'main' into dm-devcontainer-log-spam
DanielleMaywood 8437ca4
chore: appease linter
DanielleMaywood 2c6a2b1
chore: ensure the last log line is printed
DanielleMaywood a512ad4
chore: fix typo
DanielleMaywood c50dc6e
chore: OOPS
DanielleMaywood 4d40ef2
chore: 1 -> 2
DanielleMaywood ce32e2e
chore: add a status to the timings
DanielleMaywood 32ac48a
chore: initialize containerapi even earlier
DanielleMaywood 738b755
chore: only enable when devcontainers are enabled
DanielleMaywood 3714fec
chore: simplify things a little
DanielleMaywood 996d440
chore: recreate -> create with argument
DanielleMaywood ae5dd1e
chore: ensure we close and init
DanielleMaywood 9d76cf6
chore: appease linter
DanielleMaywood 7285c39
chore: mock ReadConfig any time
DanielleMaywood 3fce51c
chore: feedback
DanielleMaywood 54aa84a
chore: feedback
DanielleMaywood 3d08d0e
chore: only set status if not set, and run create in test
DanielleMaywood fa479fc
chore: feedback on poor error message
DanielleMaywood File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
chore: fix test, appease linter
- Loading branch information
commit aeae6e285d4d533735505419750595819e8f2c5d
There are no files selected for viewing
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
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
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
76 changes: 76 additions & 0 deletions
76
agent/agentcontainers/testdata/devcontainercli/parse/up.expected
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
@devcontainers/cli 0.75.0. Node.js v23.9.0. darwin 24.4.0 arm64. | ||
Resolving Feature dependencies for 'ghcr.io/devcontainers/features/docker-in-docker:2'... | ||
Soft-dependency 'ghcr.io/devcontainers/features/common-utils' is not required. Removing from installation order... | ||
Files to omit: '' | ||
Run: docker buildx build --load --build-context dev_containers_feature_content_source=/var/folders/1y/cm8mblxd7_x9cljwl_jvfprh0000gn/T/devcontainercli/container-features/0.75.0-1744102171193 --build-arg _DEV_CONTAINERS_BASE_IMAGE=mcr.microsoft.com/devcontainers/javascript-node:1-18-bullseye --build-arg _DEV_CONTAINERS_IMAGE_USER=root --build-arg _DEV_CONTAINERS_FEATURE_CONTENT_SOURCE=dev_container_feature_content_temp --target dev_containers_target_stage -f /var/folders/1y/cm8mblxd7_x9cljwl_jvfprh0000gn/T/devcontainercli/container-features/0.75.0-1744102171193/Dockerfile.extended -t vsc-devcontainers-template-starter-81d8f17e32abef6d434cbb5a37fe05e5c8a6f8ccede47a61197f002dcbf60566-features /var/folders/1y/cm8mblxd7_x9cljwl_jvfprh0000gn/T/devcontainercli/empty-folder | ||
#0 building with "orbstack" instance using docker driver | ||
|
||
#1 [internal] load build definition from Dockerfile.extended | ||
|
||
#1 transferring dockerfile: 3.09kB done | ||
#1 DONE 0.0s | ||
|
||
#2 resolve image config for docker-image://docker.io/docker/dockerfile:1.4 | ||
|
||
#2 DONE 1.3s | ||
|
||
|
||
#3 docker-image://docker.io/docker/dockerfile:1.4@sha256:9ba7531bd80fb0a858632727cf7a112fbfd19b17e94c4e84ced81e24ef1a0dbc | ||
#3 CACHED | ||
|
||
|
||
|
||
#4 [internal] load .dockerignore | ||
#4 transferring context: 2B done | ||
#4 DONE 0.0s | ||
|
||
#5 [internal] load metadata for mcr.microsoft.com/devcontainers/javascript-node:1-18-bullseye | ||
#5 DONE 0.0s | ||
|
||
#6 [context dev_containers_feature_content_source] load .dockerignore | ||
#6 transferring dev_containers_feature_content_source: 2B done | ||
#6 DONE 0.0s | ||
|
||
#7 [dev_containers_feature_content_normalize 1/3] FROM mcr.microsoft.com/devcontainers/javascript-node:1-18-bullseye | ||
#7 DONE 0.0s | ||
|
||
#8 [context dev_containers_feature_content_source] load from client | ||
#8 transferring dev_containers_feature_content_source: 82.11kB 0.0s done | ||
#8 DONE 0.0s | ||
|
||
#9 [dev_containers_feature_content_normalize 2/3] COPY --from=dev_containers_feature_content_source devcontainer-features.builtin.env /tmp/build-features/ | ||
#9 CACHED | ||
|
||
#10 [dev_containers_target_stage 2/5] RUN mkdir -p /tmp/dev-container-features | ||
#10 CACHED | ||
|
||
#11 [dev_containers_target_stage 3/5] COPY --from=dev_containers_feature_content_normalize /tmp/build-features/ /tmp/dev-container-features | ||
#11 CACHED | ||
|
||
#12 [dev_containers_target_stage 4/5] RUN echo "_CONTAINER_USER_HOME=$( (command -v getent >/dev/null 2>&1 && getent passwd 'root' || grep -E '^root|^[^:]*:[^:]*:root:' /etc/passwd || true) | cut -d: -f6)" >> /tmp/dev-container-features/devcontainer-features.builtin.env && echo "_REMOTE_USER_HOME=$( (command -v getent >/dev/null 2>&1 && getent passwd 'node' || grep -E '^node|^[^:]*:[^:]*:node:' /etc/passwd || true) | cut -d: -f6)" >> /tmp/dev-container-features/devcontainer-features.builtin.env | ||
#12 CACHED | ||
|
||
#13 [dev_containers_feature_content_normalize 3/3] RUN chmod -R 0755 /tmp/build-features/ | ||
#13 CACHED | ||
|
||
#14 [dev_containers_target_stage 5/5] RUN --mount=type=bind,from=dev_containers_feature_content_source,source=docker-in-docker_0,target=/tmp/build-features-src/docker-in-docker_0 cp -ar /tmp/build-features-src/docker-in-docker_0 /tmp/dev-container-features && chmod -R 0755 /tmp/dev-container-features/docker-in-docker_0 && cd /tmp/dev-container-features/docker-in-docker_0 && chmod +x ./devcontainer-features-install.sh && ./devcontainer-features-install.sh && rm -rf /tmp/dev-container-features/docker-in-docker_0 | ||
#14 CACHED | ||
|
||
#15 exporting to image | ||
#15 exporting layers done | ||
#15 writing image sha256:275dc193c905d448ef3945e3fc86220cc315fe0cb41013988d6ff9f8d6ef2357 done | ||
#15 naming to docker.io/library/vsc-devcontainers-template-starter-81d8f17e32abef6d434cbb5a37fe05e5c8a6f8ccede47a61197f002dcbf60566-features done | ||
#15 DONE 0.0s | ||
|
||
Run: docker buildx build --load --build-context dev_containers_feature_content_source=/var/folders/1y/cm8mblxd7_x9cljwl_jvfprh0000gn/T/devcontainercli/container-features/0.75.0-1744102171193 --build-arg _DEV_CONTAINERS_BASE_IMAGE=mcr.microsoft.com/devcontainers/javascript-node:1-18-bullseye --build-arg _DEV_CONTAINERS_IMAGE_USER=root --build-arg _DEV_CONTAINERS_FEATURE_CONTENT_SOURCE=dev_container_feature_content_temp --target dev_containers_target_stage -f /var/folders/1y/cm8mblxd7_x9cljwl_jvfprh0000gn/T/devcontainercli/container-features/0.75.0-1744102171193/Dockerfile.extended -t vsc-devcontainers-template-starter-81d8f17e32abef6d434cbb5a37fe05e5c8a6f8ccede47a61197f002dcbf60566-features /var/folders/1y/cm8mblxd7_x9cljwl_jvfprh0000gn/T/devcontainercli/empty-folder | ||
Run: docker run --sig-proxy=false -a STDOUT -a STDERR --mount type=bind,source=/code/devcontainers-template-starter,target=/workspaces/devcontainers-template-starter,consistency=cached --mount type=volume,src=dind-var-lib-docker-0pctifo8bbg3pd06g3j5s9ae8j7lp5qfcd67m25kuahurel7v7jm,dst=/var/lib/docker -l devcontainer.local_folder=/code/devcontainers-template-starter -l devcontainer.config_file=/code/devcontainers-template-starter/.devcontainer/devcontainer.json --privileged --entrypoint /bin/sh vsc-devcontainers-template-starter-81d8f17e32abef6d434cbb5a37fe05e5c8a6f8ccede47a61197f002dcbf60566-features -c echo Container started | ||
Container started | ||
|
||
Not setting dockerd DNS manually. | ||
|
||
[1mRunning the postCreateCommand from devcontainer.json...[0m | ||
|
||
|
||
|
||
added 1 package in 784ms | ||
|
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It might be beneficial to check the error returned by l.writer.Write rather than ignoring it. Handling any potential write failure could improve the reliability of the logging.
Copilot uses AI. Check for mistakes.