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
The error of failing to build an image and container using a Dockerfile in VS Code; the same Dockerfile content worked before. #9834
Comments
@chrmarti |
no follow up ? |
The context is set to |
Absolutely yes. Error message from above "=> ERROR [dev_container_auto_added_stage_label 3/5] COPY requirements.tx 0.0s". |
|
The zip file you attached does not have a devcontainer.json, are these files not in the same location? Maybe you are using a workspace folder with the requirements.txt and a separate user-data-dir folder for the devcontainer.json? |
Yes, my devcontainer.json is in different dir. But why previous version of VSCode did not have this problem ? |
The |
ok, thanks you @chrmarti |
[9101 ms] Start: Run: docker buildx build --load --build-arg BUILDKIT_INLINE_CACHE=1 -f /var/folders/_5/kxgshz757k9f6zk8jmdkdvz00000gn/T/devcontainercli/container-features/0.58.0-1714082052132/Dockerfile-with-features -t vsc-readingproject-fecfab0f449ba1d49dd05429d5576c325e4aa0ac5e807dcd86d3940fb7b9884a --target dev_containers_target_stage --build-arg _DEV_CONTAINERS_BASE_IMAGE=dev_container_auto_added_stage_label /Users/Alex/Library/Application Support/Code/User/globalStorage/ms-vscode-remote.remote-containers/configs/ReadingProject
[+] Building 3.6s (7/9)
=> [internal] load build definition from Dockerfile-with-features 0.0s
=> => transferring dockerfile: 806B 0.0s
=> [internal] load .dockerignore 0.0s
=> => transferring context: 2B 0.0s
=> [internal] load metadata for docker.io/library/python:3.9-slim-buster 3.4s
=> [dev_container_auto_added_stage_label 1/5] FROM docker.io/library/pyt 0.0s
=> [internal] load build context 0.0s
=> => transferring context: 201B 0.0s
=> CACHED [dev_container_auto_added_stage_label 2/5] WORKDIR /app 0.0s
=> ERROR [dev_container_auto_added_stage_label 3/5] COPY requirements.tx 0.0s
ERROR: failed to solve: failed to compute cache key: "/requirements.txt" not found: not found
[13922 ms] Error: Command failed: docker buildx build --load --build-arg BUILDKIT_INLINE_CACHE=1 -f /var/folders/_5/kxgshz757k9f6zk8jmdkdvz00000gn/T/devcontainercli/container-features/0.58.0-1714082052132/Dockerfile-with-features -t vsc-readingproject-fecfab0f449ba1d49dd05429d5576c325e4aa0ac5e807dcd86d3940fb7b9884a --target dev_containers_target_stage --build-arg _DEV_CONTAINERS_BASE_IMAGE=dev_container_auto_added_stage_label /Users/Alex/Library/Application Support/Code/User/globalStorage/ms-vscode-remote.remote-containers/configs/ReadingProject
[13923 ms] at ptA (/Users/Alex/.vscode/extensions/ms-vscode-remote.remote-containers-0.354.0/dist/spec-node/devContainersSpecCLI.js:465:1933)
[13923 ms] at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
[13923 ms] at async Pm (/Users/Alex/.vscode/extensions/ms-vscode-remote.remote-containers-0.354.0/dist/spec-node/devContainersSpecCLI.js:464:1841)
[13923 ms] at async kH (/Users/Alex/.vscode/extensions/ms-vscode-remote.remote-containers-0.354.0/dist/spec-node/devContainersSpecCLI.js:464:610)
[13923 ms] at async UtA (/Users/Alex/.vscode/extensions/ms-vscode-remote.remote-containers-0.354.0/dist/spec-node/devContainersSpecCLI.js:481:3692)
[13923 ms] at async $C (/Users/Alex/.vscode/extensions/ms-vscode-remote.remote-containers-0.354.0/dist/spec-node/devContainersSpecCLI.js:481:4807)
[13923 ms] at async QrA (/Users/Alex/.vscode/extensions/ms-vscode-remote.remote-containers-0.354.0/dist/spec-node/devContainersSpecCLI.js:661:13255)
[13924 ms] at async urA (/Users/Alex/.vscode/extensions/ms-vscode-remote.remote-containers-0.354.0/dist/spec-node/devContainersSpecCLI.js:661:12996)
[13940 ms] Exit code 1
[13949 ms] Command failed: /Applications/Visual Studio Code.app/Contents/Frameworks/Code Helper (Plugin).app/Contents/MacOS/Code Helper (Plugin) /Users/Alex/.vscode/extensions/ms-vscode-remote.remote-containers-0.354.0/dist/spec-node/devContainersSpecCLI.js up --user-data-folder /Users/Alex/Library/Application Support/Code/User/globalStorage/ms-vscode-remote.remote-containers/data --container-session-data-folder /tmp/devcontainers-0f3df60c-a104-41c5-aa3a-6569cd46b0b31714082040830 --workspace-folder /Users/Alex/Documents/2024/ReadingProject --workspace-mount-consistency cached --id-label devcontainer.local_folder=/Users/Alex/Documents/2024/ReadingProject --id-label devcontainer.config_file=/Users/Alex/Library/Application Support/Code/User/globalStorage/ms-vscode-remote.remote-containers/configs/ReadingProject/.devcontainer/devcontainer.json --log-level debug --log-format json --config /Users/Alex/Library/Application Support/Code/User/globalStorage/ms-vscode-remote.remote-containers/configs/ReadingProject/.devcontainer/devcontainer.json --default-user-env-probe loginInteractiveShell --mount type=volume,source=vscode,target=/vscode,external=true --skip-post-create --update-remote-user-uid-default on --mount-workspace-git-root
[13949 ms] Exit code 1
The text was updated successfully, but these errors were encountered: